[PATCH] D131683: Diagnosing the Future Keywords

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 17 06:36:43 PDT 2022


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/clang/Basic/TokenKinds.def:82
 #endif
+#ifndef C99_KEYWORD
+#define C99_KEYWORD(X,Y) KEYWORD(X,KEYC99|(Y))
----------------
NiT: Would be nice to put these next to the OTHER language standards 


================
Comment at: clang/lib/Basic/IdentifierTable.cpp:852
+
+//===----------------------------------------------------------------------===//
+// IdentifierTable Implementation
----------------
This comment block shouldn't be here at all.


================
Comment at: clang/lib/Basic/IdentifierTable.cpp:863
+
+  // Getting the flag value. i.e bool keyword passing it name to the function
+  // and will return the flag value that which keys are used then will use for
----------------
This comment doesn't really make any sense here.  I dont understand what you're trying to say.


================
Comment at: clang/lib/Basic/IdentifierTable.cpp:874
+
+  // If C++.
+  if (LangOpts.CPlusPlus) {
----------------
This comment isn't helpful.


================
Comment at: clang/lib/Basic/IdentifierTable.cpp:884
+  // If C.
+  if (!LangOpts.CPlusPlus) {
+    if ((Flags & KEYC99) == KEYC99)
----------------
just make this an 'else'.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131683/new/

https://reviews.llvm.org/D131683



More information about the cfe-commits mailing list