[PATCH] D43798: [analyzer] UndefinedAssignment: Fix warning message on implicit copy/move constructors.
Aleksei Sidorin via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 27 00:33:07 PST 2018
a.sidorin added inline comments.
================
Comment at: lib/StaticAnalyzer/Checkers/UndefinedAssignmentChecker.cpp:60
// Generate a report for this bug.
+ std::string Str;
+ llvm::raw_string_ostream OS(Str);
----------------
SmallString<128>?
================
Comment at: lib/StaticAnalyzer/Checkers/UndefinedAssignmentChecker.cpp:98
+ if (I->getInit()->IgnoreImpCasts() == StoreE) {
+ OS << "Value assigned to field '" << I->getMember()->getName()
+ << "' is garbage or undefined";
----------------
May be it is better to print qualified name? Just name of member can be misleading if base classes have members with same names.
Repository:
rC Clang
https://reviews.llvm.org/D43798
More information about the cfe-commits
mailing list