[PATCH] D16517: ClangTidy check to flag uninitialized builtin and pointer fields.
Felix Berger via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 10 20:54:48 PST 2016
flx added inline comments.
================
Comment at: clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp:205
@@ +204,3 @@
+ Diag << FixItHint::CreateInsertion(
+ Field->getSourceRange().getEnd().getLocWithOffset(
+ Field->getName().size()),
----------------
alexfh wrote:
> Maybe Lexer::getLocForEndOfToken?
Tried:
Lexer::getLocForEndOfToken(Field->getSourceRange().getEnd(),
Field->getName().size(),
Result.Context->getSourceManager(),
Result.Context->getLangOpts()),
but that placed the {} before the field name:
- bool G /* with comment */;
+ bool {}G /* with comment */;
http://reviews.llvm.org/D16517
More information about the cfe-commits
mailing list