@@ -25,8 +25,9 @@ void roundTrip(SourceLocation::UIntTy Loc,
25
25
std::optional<uint64_t > ExpectedEncoded = std::nullopt) {
26
26
uint64_t ActualEncoded =
27
27
SourceLocationEncoding::encode (SourceLocation::getFromRawEncoding (Loc));
28
- if (ExpectedEncoded)
28
+ if (ExpectedEncoded) {
29
29
ASSERT_EQ (ActualEncoded, *ExpectedEncoded) << " Encoding " << Loc;
30
+ }
30
31
SourceLocation::UIntTy DecodedEncoded =
31
32
SourceLocationEncoding::decode (ActualEncoded).getRawEncoding ();
32
33
ASSERT_EQ (DecodedEncoded, Loc) << " Decoding " << ActualEncoded;
@@ -41,9 +42,10 @@ void roundTrip(std::vector<SourceLocation::UIntTy> Locs,
41
42
for (auto L : Locs)
42
43
ActualEncoded.push_back (SourceLocationEncoding::encode (
43
44
SourceLocation::getFromRawEncoding (L), Seq));
44
- if (!ExpectedEncoded.empty ())
45
+ if (!ExpectedEncoded.empty ()) {
45
46
ASSERT_EQ (ActualEncoded, ExpectedEncoded)
46
47
<< " Encoding " << testing::PrintToString (Locs);
48
+ }
47
49
}
48
50
std::vector<SourceLocation::UIntTy> DecodedEncoded;
49
51
{
@@ -70,7 +72,7 @@ TEST(SourceLocationEncoding, Individual) {
70
72
roundTrip (Big);
71
73
roundTrip (Big + 1 );
72
74
roundTrip (MacroBit | Big);
73
- roundTrip (MacroBit | Big + 1 );
75
+ roundTrip (MacroBit | ( Big + 1 ) );
74
76
}
75
77
76
78
TEST (SourceLocationEncoding, Sequence) {
0 commit comments