[PATCH] D129061: [Lex] Diagnose macro in command lines

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Jul 9 23:21:48 PDT 2022


MaskRay added inline comments.


================
Comment at: clang/include/clang/Driver/Options.td:664
     HelpText<"Define <macro> to <value> (or 1 if <value> omitted)">;
+def DriverDefine : JoinedOrSeparate<["-"], "driver-define">, Group<Preprocessor_Group>,
+    Flags<[CC1Option, FlangOption, FC1Option]>, MetaVarName<"<macro>=<value>">,
----------------
Make this CC1 only  option `NoDriverOption` by moving it somewhere under `let Flags = [CC1Option, NoDriverOption] in {`

Don't add new `Separate` or `JoinedOrSeparate` options. They are legacy.


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

https://reviews.llvm.org/D129061



More information about the cfe-commits mailing list