[PATCH] D60853: clang-format converts a keyword macro definition to a macro function

Owen Pan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 18 09:36:26 PDT 2019


owenpan marked 2 inline comments as done.
owenpan added inline comments.


================
Comment at: clang/lib/Format/UnwrappedLineParser.cpp:808
 
-  if (FormatTok->Tok.getKind() != tok::identifier) {
+  if (!FormatTok->Tok.getIdentifierInfo()) {
     IncludeGuard = IG_Rejected;
----------------
MyDeveloperDay wrote:
> Is this equivalent to saying something that means `FormatTok->isKeyWord()` ? for those case where the #define <keyword>
The condition tests if `FormatTok` is neither a keyword (`true`, `false`, etc.) nor a non-keyword identifier.


Repository:
  rC Clang

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

https://reviews.llvm.org/D60853





More information about the cfe-commits mailing list