Skip to content

Commit e217c3d

Browse files
committed
Update based on review feedback
1 parent c79efa3 commit e217c3d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

clang/lib/Lex/LiteralSupport.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1420,7 +1420,7 @@ void NumericLiteralParser::ParseNumberStartingWithZero(SourceLocation TokLoc) {
14201420
}
14211421

14221422
// Parse a potential octal literal prefix.
1423-
bool SawOctalPrefix = false, IsNakedZero = false;
1423+
bool SawOctalPrefix = false, IsSingleZero = false;
14241424
if ((c1 == 'O' || c1 == 'o') && (s[1] >= '0' && s[1] <= '7')) {
14251425
unsigned DiagId;
14261426
if (LangOpts.C2y)
@@ -1439,7 +1439,7 @@ void NumericLiteralParser::ParseNumberStartingWithZero(SourceLocation TokLoc) {
14391439
// If we still have an octal value but we did not see an octal prefix,
14401440
// diagnose as being an obsolescent feature starting in C2y.
14411441
if (radix == 8 && LangOpts.C2y && !SawOctalPrefix && !hadError &&
1442-
!IsNakedZero)
1442+
!IsSingleZero)
14431443
Diags.Report(TokLoc, diag::warn_unprefixed_octal_deprecated);
14441444
});
14451445

@@ -1455,7 +1455,7 @@ void NumericLiteralParser::ParseNumberStartingWithZero(SourceLocation TokLoc) {
14551455
if (s != PossibleNewDigitStart)
14561456
DigitsBegin = PossibleNewDigitStart;
14571457
else
1458-
IsNakedZero = s == ThisTokEnd; // Is the only thing we've seen a 0?
1458+
IsSingleZero = (s == ThisTokEnd); // Is the only thing we've seen a 0?
14591459

14601460
if (s == ThisTokEnd)
14611461
return; // Done, simple octal number like 01234

0 commit comments

Comments
 (0)