[PATCH] D124066: [clang-tidy] Ignore macros defined within declarations in modernize-macro-to-enum

2022-04-22 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood updated this revision to Diff 424663. LegalizeAdulthood added a comment. Update from review comments CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124066/new/ https://reviews.llvm.org/D124066 Files: clang-tools-extra/clang-tidy/modernize/MacroToEnumCheck.cpp

[PATCH] D124066: [clang-tidy] Ignore macros defined within declarations in modernize-macro-to-enum

2022-04-22 Thread Richard via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGb985b6e3c15a: [clang-tidy] Ignore macros defined within declarations (authored by LegalizeAdulthood). Changed prior to commit:

[PATCH] D124066: [clang-tidy] Ignore macros defined within declarations in modernize-macro-to-enum

2022-04-22 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood marked an inline comment as done. LegalizeAdulthood added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/MacroToEnumCheck.cpp:561-567 + Finder->addMatcher(varDecl(TopLevelDecl).bind("top"), this); +

[PATCH] D124066: [clang-tidy] Ignore macros defined within declarations in modernize-macro-to-enum

2022-04-22 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood marked an inline comment as done. LegalizeAdulthood added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/MacroToEnumCheck.cpp:561-567 + Finder->addMatcher(varDecl(TopLevelDecl).bind("top"), this); +

[PATCH] D124066: [clang-tidy] Ignore macros defined within declarations in modernize-macro-to-enum

2022-04-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. In D124066#3463109 , @LegalizeAdulthood wrote: > In D124066#3463008 , @aaron.ballman >

[PATCH] D124066: [clang-tidy] Ignore macros defined within declarations in modernize-macro-to-enum

2022-04-20 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added a comment. The main problem with scenario 2) is the weird interaction between when PPCallbacks methods are invoked and AST traversal is invoked. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124066/new/ https://reviews.llvm.org/D124066

[PATCH] D124066: [clang-tidy] Ignore macros defined within declarations in modernize-macro-to-enum

2022-04-20 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added a comment. Should probably split that bug report into 2 bugs for the two phases of attack. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124066/new/ https://reviews.llvm.org/D124066 ___ cfe-commits mailing list

[PATCH] D124066: [clang-tidy] Ignore macros defined within declarations in modernize-macro-to-enum

2022-04-20 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added a comment. In D124066#3463008 , @aaron.ballman wrote: > This seems like a case where we might want a configuration option (maybe). > [...] > WDYT? In my bug report on this problem, I sketch out a plan of attack: 1. **DON'T

[PATCH] D124066: [clang-tidy] Ignore macros defined within declarations in modernize-macro-to-enum

2022-04-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. This seems like a case where we might want a configuration option (maybe). Some of the test cases where you silence the diagnostic look like places I would expect us to be able to use a (local) enumeration. e.g., void g(int x) { if (x != 0) { #define

[PATCH] D124066: [clang-tidy] Ignore macros defined within declarations in modernize-macro-to-enum

2022-04-19 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood updated this revision to Diff 423818. LegalizeAdulthood added a comment. Delete debugging aids CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124066/new/ https://reviews.llvm.org/D124066 Files: clang-tools-extra/clang-tidy/modernize/MacroToEnumCheck.cpp

[PATCH] D124066: [clang-tidy] Ignore macros defined within declarations in modernize-macro-to-enum

2022-04-19 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood updated this revision to Diff 423815. LegalizeAdulthood added a comment. Add comments describing test cases CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124066/new/ https://reviews.llvm.org/D124066 Files: clang-tools-extra/clang-tidy/modernize/MacroToEnumCheck.cpp

[PATCH] D124066: [clang-tidy] Ignore macros defined within declarations in modernize-macro-to-enum

2022-04-19 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood created this revision. LegalizeAdulthood added reviewers: aaron.ballman, alexfh. LegalizeAdulthood added a project: clang-tools-extra. Herald added subscribers: carlosgalvezp, xazax.hun. Herald added a project: All. LegalizeAdulthood requested review of this revision.