[clang] [C2y] Correctly handle 0 in the preprocessor (PR #137844)

2025-04-30 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman closed https://github.com/llvm/llvm-project/pull/137844 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C2y] Correctly handle 0 in the preprocessor (PR #137844)

2025-04-29 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/137844 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C2y] Correctly handle 0 in the preprocessor (PR #137844)

2025-04-29 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: Good suggestions, I've applied them https://github.com/llvm/llvm-project/pull/137844 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C2y] Correctly handle 0 in the preprocessor (PR #137844)

2025-04-29 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/137844 504 Gateway Time-out The server didn't respond in time. ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/c

[clang] [C2y] Correctly handle 0 in the preprocessor (PR #137844)

2025-04-29 Thread Erich Keane via cfe-commits
@@ -1453,6 +1454,8 @@ void NumericLiteralParser::ParseNumberStartingWithZero(SourceLocation TokLoc) { // anything, we leave the digit start where it was. if (s != PossibleNewDigitStart) DigitsBegin = PossibleNewDigitStart; + else +IsNakedZero = s == ThisTokEnd; //

[clang] [C2y] Correctly handle 0 in the preprocessor (PR #137844)

2025-04-29 Thread Erich Keane via cfe-commits
@@ -1420,7 +1420,7 @@ void NumericLiteralParser::ParseNumberStartingWithZero(SourceLocation TokLoc) { } // Parse a potential octal literal prefix. - bool SawOctalPrefix = false; + bool SawOctalPrefix = false, IsNakedZero = false; erichkeane wrote: ```s

[clang] [C2y] Correctly handle 0 in the preprocessor (PR #137844)

2025-04-29 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: 2 suggestions, else LGTM. https://github.com/llvm/llvm-project/pull/137844 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C2y] Correctly handle 0 in the preprocessor (PR #137844)

2025-04-29 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/137844 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C2y] Correctly handle 0 in the preprocessor (PR #137844)

2025-04-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Aaron Ballman (AaronBallman) Changes We do not diagnose 0 as a deprecated octal literal outside of the preprocessor. This fixes a bug where we were accidentally diagnosing 0 from a preprocessor conditional, however. No release note becau

[clang] [C2y] Correctly handle 0 in the preprocessor (PR #137844)

2025-04-29 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman created https://github.com/llvm/llvm-project/pull/137844 We do not diagnose 0 as a deprecated octal literal outside of the preprocessor. This fixes a bug where we were accidentally diagnosing 0 from a preprocessor conditional, however. No release note because t