mirror of
https://github.com/firebase/firebase-ios-sdk
synced 2026-11-09 22:36:01 +05:45
Update to clang-format 23 (#16562)
This commit is contained in:
1 parent
892da938be
commit
2a6dc1b7f5
11 files changed
+20
-20
No files matched your search
+1
-1
@@ -136,7 +136,7 @@ To develop Firebase software, **install**:
|
||||
To install [clang-format] and [mint] using [Homebrew]:
|
||||
|
||||
```console
|
||||
brew install clang-format@22
|
||||
brew install clang-format@23
|
||||
brew install mint
|
||||
```
|
||||
|
||||
|
||||
@@ -74,8 +74,8 @@ FOUNDATION_EXPORT NSString *const kFPersistenceLogTag;
|
||||
#define FFWarn(code, format, ...) \
|
||||
do { \
|
||||
if (FFIsLoggingEnabled(FLogLevelWarn)) { \
|
||||
FIRLogWarning(kFIRLoggerDatabase, (code), (format), \
|
||||
##__VA_ARGS__); \
|
||||
FIRLogWarning(kFIRLoggerDatabase, (code), \
|
||||
(format), ##__VA_ARGS__); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
|
||||
@@ -14,10 +14,10 @@
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#define PerfLog(fmt, ...) \
|
||||
[[PerfLogger sharedInstance] \
|
||||
log:[NSString stringWithFormat:(@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, \
|
||||
##__VA_ARGS__]];
|
||||
#define PerfLog(fmt, ...) \
|
||||
[[PerfLogger sharedInstance] \
|
||||
log:[NSString stringWithFormat:(@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, \
|
||||
__LINE__, ##__VA_ARGS__]];
|
||||
|
||||
@interface PerfLogger : NSObject
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ ComparisonResult Bound::CompareToDocument(
|
||||
ComparisonResult comparison;
|
||||
if (ordering_component.field() == FieldPath::KeyFieldPath()) {
|
||||
HARD_ASSERT(
|
||||
GetTypeOrder(field_value) == TypeOrder ::kReference,
|
||||
GetTypeOrder(field_value) == TypeOrder::kReference,
|
||||
"Bound has a non-key value where the key path is being used %s",
|
||||
field_value.ToString());
|
||||
auto key = DocumentKey::FromName(
|
||||
|
||||
@@ -194,19 +194,19 @@ class MutableDocument {
|
||||
}
|
||||
|
||||
bool is_valid_document() const {
|
||||
return document_type_ != DocumentType ::kInvalid;
|
||||
return document_type_ != DocumentType::kInvalid;
|
||||
}
|
||||
|
||||
bool is_found_document() const {
|
||||
return document_type_ == DocumentType ::kFoundDocument;
|
||||
return document_type_ == DocumentType::kFoundDocument;
|
||||
}
|
||||
|
||||
bool is_no_document() const {
|
||||
return document_type_ == DocumentType ::kNoDocument;
|
||||
return document_type_ == DocumentType::kNoDocument;
|
||||
}
|
||||
|
||||
bool is_unknown_document() const {
|
||||
return document_type_ == DocumentType ::kUnknownDocument;
|
||||
return document_type_ == DocumentType::kUnknownDocument;
|
||||
}
|
||||
|
||||
size_t Hash() const;
|
||||
|
||||
@@ -73,7 +73,7 @@ struct has_std_hash {
|
||||
// matter for our purposes.
|
||||
enum {
|
||||
value = std::is_arithmetic<T>{} || std::is_pointer<T>{} ||
|
||||
std::is_same<T, std::string>{}
|
||||
std::is_same<T, std::string>{}
|
||||
};
|
||||
|
||||
constexpr operator bool() const {
|
||||
|
||||
@@ -1638,7 +1638,7 @@ TEST_F(SerializerTest, EncodesListenRequestLabels) {
|
||||
{{"goog-listen-tags", "limbo-document"}}},
|
||||
{QueryPurpose::ExistenceFilterMismatch,
|
||||
{{"goog-listen-tags", "existence-filter-mismatch"}}},
|
||||
};
|
||||
};
|
||||
|
||||
for (const auto& p : purpose_to_label) {
|
||||
TargetData model(core::TargetOrPipeline(q.ToTarget()), 1, 0, p.first);
|
||||
|
||||
@@ -88,7 +88,7 @@ const std::vector<std::shared_ptr<Expr>> ComparisonValueTestData::BYTE_VALUES =
|
||||
SharedConstant(*BlobValue(2, 26)), // Use variadic args
|
||||
SharedConstant(*BlobValue(2, 26, 31)), // Use variadic args
|
||||
// SharedConstant(*BlobValue(std::vector<uint8_t>(...))), // Large blob
|
||||
};
|
||||
};
|
||||
|
||||
const std::vector<std::shared_ptr<Expr>>
|
||||
ComparisonValueTestData::ENTITY_REF_VALUES = {
|
||||
|
||||
@@ -13,11 +13,11 @@ following setup is beneficial.
|
||||
|
||||
1. **Xcode**: The development environment relies on Xcode 26.2 or above.
|
||||
2. **Command-Line Tools**:
|
||||
* `clang-format`: Used for C, C++, and Objective-C code formatting. Version 22 is
|
||||
* `clang-format`: Used for C, C++, and Objective-C code formatting. Version 23 is
|
||||
specifically mentioned.
|
||||
* `mint`: Used to install and run Swift command-line tools, including `swiftformat` for
|
||||
Swift code styling.
|
||||
* Note: The build environment uses `clang-format` (version 22) and `mint` (for
|
||||
* Note: The build environment uses `clang-format` (version 23) and `mint` (for
|
||||
`swiftformat`) for code styling. Ensure any generated or modified code adheres to these
|
||||
styling requirements.
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ fi
|
||||
|
||||
# install clang-format
|
||||
brew update
|
||||
brew install clang-format@22
|
||||
brew install clang-format@23
|
||||
|
||||
# mint installs tools from Mintfile on demand.
|
||||
brew install mint
|
||||
|
||||
+2
-2
@@ -58,7 +58,7 @@ version="${version/ (*)/}"
|
||||
version="${version/.*/}"
|
||||
|
||||
case "$version" in
|
||||
22)
|
||||
23)
|
||||
;;
|
||||
google3-trunk)
|
||||
echo "Please use a publicly released clang-format; a recent LLVM release"
|
||||
@@ -67,7 +67,7 @@ case "$version" in
|
||||
exit 1
|
||||
;;
|
||||
*)
|
||||
echo "Please upgrade to clang-format version 22."
|
||||
echo "Please upgrade to clang-format version 23."
|
||||
echo "If it's installed via homebrew you can run:"
|
||||
echo "brew upgrade clang-format"
|
||||
exit 1
|
||||
|
||||
Reference in new issue
Block a user