[PATCH] D131683: Diagnosing the Future Keywords

2022-08-26 Thread Aaron Ballman via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG41667a8b9b62: Diagnosing the Future Keywords (authored by Codesbyusman, committed by aaron.ballman). Changed prior to commit: https://reviews.llvm

[PATCH] D131683: Diagnosing the Future Keywords

2022-08-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! There's a minor thing left to be fixed, but I'll handle it on commit. I wanted to drop the `|KEYC2X` for the Boolean keywords so it relies solely on `BOOLSUPPORT`, but then

[PATCH] D131683: Diagnosing the Future Keywords

2022-08-26 Thread Muhammad Usman Shahid via Phabricator via cfe-commits
Codesbyusman updated this revision to Diff 455841. Codesbyusman added a comment. updated. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131683/new/ https://reviews.llvm.org/D131683 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Basic/D

[PATCH] D131683: Diagnosing the Future Keywords

2022-08-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I spotted one last (hopefully) concern, but otherwise this LG for functionality. Can you also add a release note for the improved diagnostic behavior? Comment at: clang/include/clang/Basic/TokenKinds.def:381-383 +C2X_KEYWORD(bool

[PATCH] D131683: Diagnosing the Future Keywords

2022-08-25 Thread Muhammad Usman Shahid via Phabricator via cfe-commits
Codesbyusman updated this revision to Diff 455607. Codesbyusman added a comment. updated Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131683/new/ https://reviews.llvm.org/D131683 Files: clang/include/clang/Basic/DiagnosticGroups.td clang/incl

[PATCH] D131683: Diagnosing the Future Keywords

2022-08-24 Thread Muhammad Usman Shahid via Phabricator via cfe-commits
Codesbyusman added inline comments. Comment at: clang/test/Parser/static_assert.c:1 -// RUN: %clang_cc1 -fsyntax-only -std=c2x -DTEST_SPELLING -verify=c2x %s -// RUN: %clang_cc1 -fsyntax-only -std=c2x -DTEST_SPELLING -fms-compatibility -verify=c2x-ms %s +// RUN: %clang_cc1 -fsyn

[PATCH] D131683: Diagnosing the Future Keywords

2022-08-24 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/TokenKinds.def:384 +C2X_KEYWORD(true, BOOLSUPPORT) +C2X_KEYWORD(remove_quals, KEYC2X) + Codesbyusman wrote: > aaron.ballman wrote: > > This is techn

[PATCH] D131683: Diagnosing the Future Keywords

2022-08-24 Thread Muhammad Usman Shahid via Phabricator via cfe-commits
Codesbyusman added inline comments. Comment at: clang/include/clang/Basic/TokenKinds.def:384 +C2X_KEYWORD(true, BOOLSUPPORT) +C2X_KEYWORD(remove_quals, KEYC2X) + aaron.ballman wrote: > This is technically correct, but I thi

[PATCH] D131683: Diagnosing the Future Keywords

2022-08-24 Thread Muhammad Usman Shahid via Phabricator via cfe-commits
Codesbyusman updated this revision to Diff 455147. Codesbyusman added a comment. updated test cases and suggestions. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131683/new/ https://reviews.llvm.org/D131683 Files: clang/include/clang/Basic/Diag

[PATCH] D131683: Diagnosing the Future Keywords

2022-08-24 Thread Muhammad Usman Shahid via Phabricator via cfe-commits
Codesbyusman updated this revision to Diff 455141. Codesbyusman added a comment. updated with suggestions and test cases. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131683/new/ https://reviews.llvm.org/D131683 Files: clang/include/clang/Basic

[PATCH] D131683: Diagnosing the Future Keywords

2022-08-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/DiagnosticLexKinds.td:85 + InGroup, DefaultIgnore; +def warn_c23_keyword : Warning<"'%0' is a keyword in C23">, + InGroup, DefaultIgnore; Comment at: clang/include/cl

[PATCH] D131683: Diagnosing the Future Keywords

2022-08-22 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. Looks about right, please see if you can do more work on the static-assert test to make sure we don't lose other testing behavior, AND see the other comment. Comment at: clang/lib/Lex/Preprocessor.cpp:847 if (II.isFutureCompatKeyword() && !Disabl

[PATCH] D131683: Diagnosing the Future Keywords

2022-08-22 Thread Muhammad Usman Shahid via Phabricator via cfe-commits
Codesbyusman updated this revision to Diff 454612. Codesbyusman marked 5 inline comments as done. Codesbyusman added a comment. updated with suggestios Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131683/new/ https://reviews.llvm.org/D131683 File

[PATCH] D131683: Diagnosing the Future Keywords

2022-08-17 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Precommit CI is failing with a failure that looks like it's relevant: TEST 'Clang :: Parser/static_assert.c' FAILED Script: -- : 'RUN: at line 1'; c:\ws\w9\llvm-project\premerge-checks\build\bin\clang.exe -cc1 -

[PATCH] D131683: Diagnosing the Future Keywords

2022-08-17 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. I didn't have time to dig into the correctness of the TokenKinds or test changes (hopefully @aaron.ballman can take some time on that), but implementation overall looks correct, just with some style/formatting issues. Comment at: clang/include/clan

[PATCH] D131683: Diagnosing the Future Keywords

2022-08-16 Thread Muhammad Usman Shahid via Phabricator via cfe-commits
Codesbyusman updated this revision to Diff 453110. Codesbyusman edited the summary of this revision. Codesbyusman added a comment. updated. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131683/new/ https://reviews.llvm.org/D131683 Files: clang/i

[PATCH] D131683: Diagnosing the Future Keywords

2022-08-11 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/include/clang/Basic/TokenKinds.def:387 // C++11 keywords -CXX11_KEYWORD(alignas , 0) +CXX11_KEYWORD(alignas , KEYC23) // alignof and _Alignof return the required ABI alignment Codes

[PATCH] D131683: Diagnosing the Future Keywords

2022-08-11 Thread Muhammad Usman Shahid via Phabricator via cfe-commits
Codesbyusman added inline comments. Comment at: clang/include/clang/Basic/TokenKinds.def:387 // C++11 keywords -CXX11_KEYWORD(alignas , 0) +CXX11_KEYWORD(alignas , KEYC23) // alignof and _Alignof return the required ABI alignment eri

[PATCH] D131683: Diagnosing the Future Keywords

2022-08-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/TokenKinds.def:395 CXX11_KEYWORD(noexcept , 0) CXX11_KEYWORD(nullptr , 0) +CXX11_KEYWORD(static_assert , KEYMSCOMPAT|KEYC23) xbolva00 wrote: > nullptr

[PATCH] D131683: Diagnosing the Future Keywords

2022-08-11 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. I believe you need tests here desperately. I also believe the `define` logic that you have here isn't going to be sufficient for the C future flags thanks to it getting some C keywords. Comment at: clang/include/clang/Basic/TokenKinds.def:387 //

[PATCH] D131683: "Diagnosing the Future Keywords"

2022-08-11 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added inline comments. Comment at: clang/include/clang/Basic/TokenKinds.def:395 CXX11_KEYWORD(noexcept , 0) CXX11_KEYWORD(nullptr , 0) +CXX11_KEYWORD(static_assert , KEYMSCOMPAT|KEYC23) nullptr is now in C23, right?

[PATCH] D131683: "Diagnosing the Future Keywords"

2022-08-11 Thread Muhammad Usman Shahid via Phabricator via cfe-commits
Codesbyusman created this revision. Herald added a project: All. Codesbyusman requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D131683 Files: clang/include/clang/Basic/Diagno