[PATCH] D11677: [clang-tidy] Support replacements in macro arguments in misc-inefficient-algorithm
Manuel Klimek
klimek at google.com
Fri Jul 31 05:36:56 PDT 2015
klimek added inline comments.
================
Comment at: clang-tidy/misc/InefficientAlgorithmCheck.cpp:114-118
@@ +113,7 @@
+
+ if (SM.isMacroArgExpansion(CallRange.getBegin()) &&
+ SM.isMacroArgExpansion(CallRange.getEnd())) {
+ CallRange.setBegin(SM.getSpellingLoc(CallRange.getBegin()));
+ CallRange.setEnd(SM.getSpellingLoc(CallRange.getEnd()));
+ }
+
----------------
Any reason we don't want to use Lexer::makeFileCharRange here (which should handle all the cases correctly).
http://reviews.llvm.org/D11677
More information about the cfe-commits
mailing list