[PATCH] D40463: [analyzer] Fix false negative on post-increment of uninitialized variable.
Gábor Horváth via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 29 07:14:43 PST 2017
xazax.hun added inline comments.
================
Comment at: lib/StaticAnalyzer/Checkers/UndefinedAssignmentChecker.cpp:64
+ if (const UnaryOperator *U = dyn_cast<UnaryOperator>(StoreE)) {
+ str = "The expression of the unary operator is an uninitialized value. "
+ "The computed value will also be garbage";
----------------
lebedev.ri wrote:
> dcoughlin wrote:
> > "Unary operator" is probably not something we should expect users to know about. How about just "The expression is an uninitialized value. The computed value will also be garbage."
> >
> Yep, i did not like my wording either :)
A value being undefined does nt mean uninitialized. E.g.: the result of a bad shift operation might be UndefVal as well.
Aren't these diagnostics misleading in those cases? Or we do not care about those?
Repository:
rC Clang
https://reviews.llvm.org/D40463
More information about the cfe-commits
mailing list