We shouldn't suggest replacements in macros anyway, as we can't see all
usages of the macro and ensure the replacement is safe for all of them.
Details
Details
Diff Detail
Diff Detail
Event Timeline
clang-tidy/google/GoogleTidyModule.cpp | ||
---|---|---|
37 | 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? |
Comment Actions
This seems a very conservative approach, as there seem to be many cases where we can provide a fix in a macro...
Do you know a way to ensure that a change to a macro is safe? We don't want to remove "explicit" from a definition of a compatibility macro, for example ;)
Also, this case is quite rare. I've found only one instance internally. So maybe we shouldn't worry much about it.
Perhaps we can use Lexer::makeFileCharRange?
This could be used to avoid problems with other (possible, but extremely rare) corner cases.
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?