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
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
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
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
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
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
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
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
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
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
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
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
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
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
-
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
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
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
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
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
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
//
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?
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
22 matches
Mail list logo