[PATCH] D73090: [clang-tidy] Fix PR#44528 'modernize-use-using and enums'
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Feb 1 08:23:46 PST 2020
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()) != Result.SourceManager->getFileID(LastReplacementEnd)) ||
+ (ReplaceRange.getBegin() >= LastReplacementEnd)) {
----------------
Be sure to run clang-format over the patch; this looks well beyond the usual 80-col limit. You can also drop the unnecessary parens around the sub expressions.
Also, a comment explaining why this code is needed would help future folks as would a test case showing what this corrects.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D73090/new/
https://reviews.llvm.org/D73090
More information about the cfe-commits
mailing list