[LLVMbugs] [Bug 19433] New: Control-flow gets confused when assert(false) is in a try-block.
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Apr 14 21:32:10 PDT 2014
http://llvm.org/bugs/show_bug.cgi?id=19433
Bug ID: 19433
Summary: Control-flow gets confused when assert(false) is in a
try-block.
Product: clang
Version: trunk
Hardware: Macintosh
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Static Analyzer
Assignee: kremenek at apple.com
Reporter: mclow.lists at gmail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 12372
--> http://llvm.org/bugs/attachment.cgi?id=12372&action=edit
Small program demonstrating the problem.
I tried running scan_build on the libc++ test suite, and got a false positive.
there's a reduced example attached, but basically, the code in question looks
like:
list<int> l;
int foo = l.count();
try {
l.insert(5);
assert(false);
}
catch (...) {}
assert ( foo == l.count());
where the call to "l.insert" will throw.
scan-build complains that "foo" is initialized but never read.
[ and yes, I have exceptions enabled ]
If I remove the assert(false), then the warning goes away.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140415/de039563/attachment.html>
More information about the llvm-bugs
mailing list