[PATCH] Fix assertion in google-explicit-constructor check when the constructor isdefined in a macro.
Manuel Klimek
klimek at google.com
Mon May 5 11:28:58 PDT 2014
================
Comment at: clang-tidy/google/GoogleTidyModule.cpp:37
@@ -36,1 +36,3 @@
bool (*Pred)(const Token &)) {
+ if (StartLoc.isMacroID() || EndLoc.isMacroID())
+ return SourceRange();
----------------
This seems a very conservative approach, as there seem to be many cases where we can provide a fix in a macro... Perhaps we can use Lexer::makeFileCharRange?
http://reviews.llvm.org/D3611
More information about the cfe-commits
mailing list