Skip to content

Commit

Permalink
Upgrade to clang-format v17 (#11824)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewheard authored Sep 19, 2023
1 parent f49a14c commit a69962d
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ To develop Firebase software, **install**:
To install [clang-format] and [mint] using [Homebrew]:

```console
brew install clang-format@16
brew install clang-format@17
brew install mint
```

Expand Down
6 changes: 3 additions & 3 deletions FirebaseAuth/Sources/Auth/FIRAuth.m
Original file line number Diff line number Diff line change
Expand Up @@ -2373,7 +2373,7 @@ - (BOOL)saveUser:(nullable FIRUser *)user error:(NSError *_Nullable *_Nullable)o
#else
// Encode the user object.
NSMutableData *archiveData = [NSMutableData data];
// iOS 12 deprecation
// iOS 12 deprecation
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
NSKeyedArchiver *archiver =
Expand Down Expand Up @@ -2439,7 +2439,7 @@ - (BOOL)getUser:(FIRUser *_Nullable *)outUser error:(NSError *_Nullable *_Nullab
return NO;
}
#else
// iOS 12 deprecation
// iOS 12 deprecation
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
NSKeyedUnarchiver *unarchiver =
Expand Down Expand Up @@ -2621,7 +2621,7 @@ - (nullable FIRUser *)getStoredUserForAccessGroup:(NSString *_Nullable)accessGro
return nil;
}
#else
// iOS 12 deprecation
// iOS 12 deprecation
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
NSKeyedUnarchiver *unarchiver =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ - (instancetype)initWithKeychain:(FIRAuthKeychainServices *)keychain {
NSKeyedUnarchiver *unarchiver = [[NSKeyedUnarchiver alloc] initForReadingFromData:encodedData
error:&error];
#else
// iOS 12 deprecation
// iOS 12 deprecation
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
NSKeyedUnarchiver *unarchiver =
Expand Down
4 changes: 2 additions & 2 deletions FirebaseAuth/Sources/SystemService/FIRAuthStoredUserManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ - (FIRUser *)getStoredUserForAccessGroup:(NSString *)accessGroup
return nil;
}
#else
// iOS 12 deprecation
// iOS 12 deprecation
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
NSKeyedUnarchiver *unarchiver = [[NSKeyedUnarchiver alloc] initForReadingWithData:data];
Expand Down Expand Up @@ -118,7 +118,7 @@ - (BOOL)setStoredUser:(FIRUser *)user
NSKeyedArchiver *archiver = [[NSKeyedArchiver alloc] initRequiringSecureCoding:false];
#else
NSMutableData *data = [NSMutableData data];
// iOS 12 deprecation
// iOS 12 deprecation
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
NSKeyedArchiver *archiver = [[NSKeyedArchiver alloc] initForWritingWithMutableData:data];
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ GitHub Actions will verify that any code changes are done in a style-compliant
way. Install `clang-format` and `mint`:

```console
brew install clang-format@16
brew install clang-format@17
brew install mint
```

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@16
brew install clang-format@17

# mint installs tools from Mintfile on demand.
brew install mint
Expand Down
4 changes: 2 additions & 2 deletions 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
16)
17)
;;
google3-trunk)
echo "Please use a publicly released clang-format; a recent LLVM release"
Expand All @@ -65,7 +65,7 @@ case "$version" in
exit 1
;;
*)
echo "Please upgrade to clang-format version 16."
echo "Please upgrade to clang-format version 17."
echo "If it's installed via homebrew you can run:"
echo "brew upgrade clang-format"
exit 1
Expand Down

0 comments on commit a69962d

Please sign in to comment.