http://llvm.org/bugs/show_bug.cgi?id=12325
Bug #: 12325
Summary: Wrong CFG for statement expression causes
-Wuninitialized false positive
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Static Analyzer
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
Classification: Unclassified
Much to my regret, this is reduced from real code:
int foo(int params) {
int x = ({
while (false)
;
int _v = params;
if (false)
;
_v;
});
return x;
}
/tmp/test.ii:8:5: warning: variable '_v' is uninitialized when used here
[-Wuninitialized]
_v;
^~
In the CFG for 'foo', if I'm reading it right, the block with the
initialization of '_v' is unreachable, yet the use of '_v' to initialize 'x' is
reachable.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs