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

2023-08-16 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/include/clang/Driver/Options.td:664 HelpText<"Define to (or 1 if omitted)">; +def DriverDefine : JoinedOrSeparate<["-"], "driver-define">, Group, +Flags<[CC1Option, FlangOption, FC1Option]>, MetaVarName<"=">, -

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

2023-08-16 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. This review went cold for about a year now (sorry for not noticing we hadn't answered your question!), so I'm uncertain if @jackhong12 is still interested in pursuing this. If not, that's totally fine, just let us know so we can remove you as the assignee on the i

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

2022-07-10 Thread Jack Huang via Phabricator via cfe-commits
jackhong12 added inline comments. Comment at: clang/include/clang/Driver/Options.td:664 HelpText<"Define to (or 1 if omitted)">; +def DriverDefine : JoinedOrSeparate<["-"], "driver-define">, Group, +Flags<[CC1Option, FlangOption, FC1Option]>, MetaVarName<"=">, --

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

2022-07-10 Thread Jack Huang via Phabricator via cfe-commits
jackhong12 updated this revision to Diff 443516. jackhong12 added a comment. - modify option names - only allow driver-defined macros used in cc1 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129061/new/ https://reviews.llvm.org/D129061 Files: clang-tools-extra/test/pp-trace/pp-trace

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

2022-07-09 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/include/clang/Driver/Options.td:664 HelpText<"Define to (or 1 if omitted)">; +def DriverDefine : JoinedOrSeparate<["-"], "driver-define">, Group, +Flags<[CC1Option, FlangOption, FC1Option]>, MetaVarName<"=">, -

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

2022-07-09 Thread Jack Huang via Phabricator via cfe-commits
jackhong12 updated this revision to Diff 443447. jackhong12 added a comment. Herald added subscribers: mstorsjo, MaskRay. Herald added a reviewer: sscalpone. Herald added a project: clang-tools-extra. I added two flags, `-driver-define` and `-driver-undefine`, to indicate macros that the driver d

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

2022-07-05 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. great addition. Missing a test case though, which would probably trigger @aaron.ballman scenario Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129061/new/ https://reviews.llvm.org/D129061 ___

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

2022-07-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a reviewer: serge-sans-paille. aaron.ballman added a comment. Thank you for looking into this! I think we may need to figure out something better for handling macros defined by the driver, because otherwise we're going to get a bunch of false positives from this. For example,

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

2022-07-04 Thread Jack Huang via Phabricator via cfe-commits
jackhong12 added a comment. Sorry, I didn't consider some cases. I'll fix it soon! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129061/new/ https://reviews.llvm.org/D129061 ___ cfe-commits mailing list

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

2022-07-03 Thread Jack Huang via Phabricator via cfe-commits
jackhong12 created this revision. jackhong12 added a reviewer: aaron.ballman. Herald added a project: All. jackhong12 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. - Fixes https://github.com/llvm/llvm-project/issues/56159 Description ---