@@ -25,8 +25,9 @@ void roundTrip(SourceLocation::UIntTy Loc,
2525 std::optional<uint64_t > ExpectedEncoded = std::nullopt ) {
2626 uint64_t ActualEncoded =
2727 SourceLocationEncoding::encode (SourceLocation::getFromRawEncoding (Loc));
28- if (ExpectedEncoded)
28+ if (ExpectedEncoded) {
2929 ASSERT_EQ (ActualEncoded, *ExpectedEncoded) << " Encoding " << Loc;
30+ }
3031 SourceLocation::UIntTy DecodedEncoded =
3132 SourceLocationEncoding::decode (ActualEncoded).getRawEncoding ();
3233 ASSERT_EQ (DecodedEncoded, Loc) << " Decoding " << ActualEncoded;
@@ -41,9 +42,10 @@ void roundTrip(std::vector<SourceLocation::UIntTy> Locs,
4142 for (auto L : Locs)
4243 ActualEncoded.push_back (SourceLocationEncoding::encode (
4344 SourceLocation::getFromRawEncoding (L), Seq));
44- if (!ExpectedEncoded.empty ())
45+ if (!ExpectedEncoded.empty ()) {
4546 ASSERT_EQ (ActualEncoded, ExpectedEncoded)
4647 << " Encoding " << testing::PrintToString (Locs);
48+ }
4749 }
4850 std::vector<SourceLocation::UIntTy> DecodedEncoded;
4951 {
@@ -70,7 +72,7 @@ TEST(SourceLocationEncoding, Individual) {
7072 roundTrip (Big);
7173 roundTrip (Big + 1 );
7274 roundTrip (MacroBit | Big);
73- roundTrip (MacroBit | Big + 1 );
75+ roundTrip (MacroBit | ( Big + 1 ) );
7476}
7577
7678TEST (SourceLocationEncoding, Sequence) {
0 commit comments