Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Infra] Upgrade to clang-format@19 #13656

Merged
merged 2 commits into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ - (instancetype)initWithRequestSender:(FIRIAMClearcutHttpRequestSender *)request
_userDefaults = userDefaults ? userDefaults : [GULUserDefaults standardUserDefaults];
// it would be 0 if it does not exist, which is equvilent to saying that
// you can send now
_nextValidSendTimeInMills = (int64_t)
[_userDefaults doubleForKey:FIRIAM_UserDefaultsKeyForNextValidClearcutUploadTimeInMills];
_nextValidSendTimeInMills = (int64_t)[_userDefaults
doubleForKey:FIRIAM_UserDefaultsKeyForNextValidClearcutUploadTimeInMills];

NSArray<FIRIAMClearcutLogRecord *> *availableLogs =
[logStorage popStillValidRecordsForUpTo:strategy.batchSendSize];
Expand Down
4 changes: 2 additions & 2 deletions Firestore/core/src/immutable/keys_view.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ auto KeysView(const Range& range) -> KeysRange<decltype(std::begin(range))> {
}

template <typename Range, typename K>
auto KeysViewFrom(const Range& range,
const K& key) -> KeysRange<decltype(range.lower_bound(key))> {
auto KeysViewFrom(const Range& range, const K& key)
-> KeysRange<decltype(range.lower_bound(key))> {
auto keys_begin = util::make_iterator_first(range.lower_bound(key));
auto keys_end = util::make_iterator_first(std::end(range));
return util::make_range(keys_begin, keys_end);
Expand Down
4 changes: 2 additions & 2 deletions Firestore/core/src/util/filesystem_posix.cc
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ Path Filesystem::TempDir() {

#if !__APPLE__
Status Filesystem::IsDirectory(const Path& path) {
struct stat buffer {};
struct stat buffer{};
if (::stat(path.c_str(), &buffer)) {
if (errno == ENOENT) {
// Expected common error case.
Expand Down Expand Up @@ -168,7 +168,7 @@ Status Filesystem::IsDirectory(const Path& path) {
}

StatusOr<int64_t> Filesystem::FileSize(const Path& path) {
struct stat st {};
struct stat st{};
if (::stat(path.c_str(), &st) == 0) {
return st.st_size;
} else {
Expand Down
8 changes: 4 additions & 4 deletions Firestore/core/src/util/hashing.h
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,8 @@ auto RankedInvokeHash(const Range& range, HashChoice<3>)
* value can itself be hashed.
*/
template <typename K>
auto RankedInvokeHash(const absl::optional<K>& option,
HashChoice<4>) -> decltype(InvokeHash(*option)) {
auto RankedInvokeHash(const absl::optional<K>& option, HashChoice<4>)
-> decltype(InvokeHash(*option)) {
return option ? InvokeHash(*option) : -1171;
}

Expand All @@ -202,8 +202,8 @@ size_t RankedInvokeHash(K value, HashChoice<5>) {
}

template <typename K>
auto RankedInvokeHash(const std::unique_ptr<K>& ptr,
HashChoice<6>) -> decltype(InvokeHash(*ptr)) {
auto RankedInvokeHash(const std::unique_ptr<K>& ptr, HashChoice<6>)
-> decltype(InvokeHash(*ptr)) {
return ptr ? InvokeHash(*ptr) : 23631;
}

Expand Down
2 changes: 1 addition & 1 deletion scripts/setup_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ fi

# install clang-format
brew update
brew install clang-format@18
brew install clang-format@19

# mint installs tools from Mintfile on demand.
brew install mint
Expand Down
2 changes: 1 addition & 1 deletion scripts/style.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ version="${version/ (*)/}"
version="${version/.*/}"

case "$version" in
18)
19)
;;
google3-trunk)
echo "Please use a publicly released clang-format; a recent LLVM release"
Expand Down
Loading