[PATCH] D121753: [clang-format] Use a macro for non-C keywords

MyDeveloperDay via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 18 01:38:17 PDT 2022


MyDeveloperDay requested changes to this revision.
MyDeveloperDay added inline comments.
This revision now requires changes to proceed.


================
Comment at: clang/lib/Format/FormatToken.h:884
 struct AdditionalKeywords {
+#define LIST_ADDITIONAL_KEYWORDS                                               \
+  /* Context-sensitive ones that appear in C++ or ObjC.  The lexer lexes them  \
----------------
I didn't see this before... for me this is a hard no, I think macro code is ugly, it causes clang-format itself a whole host of issues, and I don't want to proliferate it. plus it begins a path of you using flags and I think that is unstructure C way of coding.

I know you want to add other keywords for Verilog but this to me isn't nice I don't understand why you couldn't have added the Verilog keywords like we did for JavaScript and C# 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D121753



More information about the cfe-commits mailing list