[PATCH] D16517: ClangTidy check to flag uninitialized builtin and pointer fields.
Felix Berger via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 11 17:48:10 PST 2016
flx added inline comments.
================
Comment at: clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp:206
@@ +205,3 @@
+ // Do not propose fixes in macros since we cannot place them correctly.
+ if (Ctor->getLocStart().isMacroID())
+ return;
----------------
alexfh wrote:
> IIUC what this is doing, the offset should be `0` instead of `Field->getName().size()`. I've tried `Lexer::getLocForEndOfToken(Field->getSourceRange().getEnd(), 0, *Result.SourceManager, Result.Context->getLangOpts())` and it seems to work fine on your tests.
Great, that worked.
http://reviews.llvm.org/D16517
More information about the cfe-commits
mailing list