[PATCH] D73090: [clang-tidy] Fix PR#44528 'modernize-use-using and enums'

2020-02-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. In D73090#1854031 , @f00kat wrote: > Sorry for my english. Sometimes it's more difficult than bug fixing It's not a problem at all, that's why we help one another out spotting those thin

[PATCH] D73090: [clang-tidy] Fix PR#44528 'modernize-use-using and enums'

2020-02-02 Thread Karasev Nikita via Phabricator via cfe-commits
f00kat added a comment. Sorry for my english. Sometimes it's more difficult than bug fixing Comment at: clang-tools-extra/clang-tidy/modernize/UseUsingCheck.cpp:74 if (ReplaceRange.getBegin().isMacroID() || - ReplaceRange.getBegin() >= LastReplacementEnd) { + (Resu

[PATCH] D73090: [clang-tidy] Fix PR#44528 'modernize-use-using and enums'

2020-02-02 Thread Karasev Nikita via Phabricator via cfe-commits
f00kat updated this revision to Diff 241971. f00kat marked an inline comment as done. f00kat added a comment. Clean up Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73090/new/ https://reviews.llvm.org/D73090 Files: clang-tools-extra/clang-tidy/m

[PATCH] D73090: [clang-tidy] Fix PR#44528 'modernize-use-using and enums'

2020-02-02 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. LGTM! I'm happy to commit on your behalf once the minor nits are fixed up. Comment at: clang-tools-extra/clang-tidy/modernize/UseUsingCheck.cpp:73 + // But als

[PATCH] D73090: [clang-tidy] Fix PR#44528 'modernize-use-using and enums'

2020-02-02 Thread Karasev Nikita via Phabricator via cfe-commits
f00kat updated this revision to Diff 241931. f00kat added a comment. 1. clang-format 2. Add comment for additional "files IDs equals" check 3. Add test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73090/new/ https://reviews.llvm.org/D73090 Files:

[PATCH] D73090: [clang-tidy] Fix PR#44528 'modernize-use-using and enums'

2020-02-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/UseUsingCheck.cpp:74 if (ReplaceRange.getBegin().isMacroID() || - ReplaceRange.getBegin() >= LastReplacementEnd) { + (Result.SourceManager->getFileID(ReplaceRange.getBegin()) !=

[PATCH] D73090: [clang-tidy] Fix PR#44528 'modernize-use-using and enums'

2020-01-30 Thread Karasev Nikita via Phabricator via cfe-commits
f00kat updated this revision to Diff 241448. f00kat added a comment. 1. Apply new tagDecl matcher 2. Trying to fix some bug Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73090/new/ https://reviews.llvm.org/D73090 Files: clang-tools-extra/clang-t

[PATCH] D73090: [clang-tidy] Fix PR#44528 'modernize-use-using and enums'

2020-01-30 Thread Karasev Nikita via Phabricator via cfe-commits
f00kat marked 4 inline comments as done. f00kat added a comment. I have changed the code to work with tagDecl. It`s work fine on simple test cases such as typedef enum { ea, eb } EnumT; But not work with #include typedef enum { ea, eb } EnumT; It is not related with new tagDecl matcher

[PATCH] D73090: [clang-tidy] Fix PR#44528 'modernize-use-using and enums'

2020-01-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/UseUsingCheck.cpp:28 this); - // This matcher used to find structs defined in source code within typedefs. + // This matcher`s used to find structs/enums defined in sou

[PATCH] D73090: [clang-tidy] Fix PR#44528 'modernize-use-using and enums'

2020-01-21 Thread Karasev Nikita via Phabricator via cfe-commits
f00kat updated this revision to Diff 239491. f00kat added a comment. Add new line in the end of file checkers/modernize-use-using.cpp CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73090/new/ https://reviews.llvm.org/D73090 Files: clang-tools-extra/clang-tidy/modernize/UseUsingCheck.c

[PATCH] D73090: [clang-tidy] Fix PR#44528 'modernize-use-using and enums'

2020-01-21 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. If you are using diff to create a patch, use `-U99` to get the full context of the patch Comment at: clang-tools-extra/test/clang-tidy/checkers/modernize-use-using.cpp:274 +// CHECK-FIXES: using EnumT = enum { ea, eb }; \ No newline at end of fil