http://llvm.org/bugs/show_bug.cgi?id=16331
Bug ID: 16331
Summary: Static analyzer does not honor attribute noreturn in
destructors
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Static Analyzer
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
On the following input file, the static analyzer reports a "Called C++ object
pointer is null" warning, even though the offending statement is never reached,
since the destructor of A never returns.
$ cat a.cc
struct Fatal { ~Fatal() __attribute__((noreturn)); };
struct A { void a(); };
void f(A* a) {
a ? (void) 0 : (void)Fatal();
a->a();
}
$ ~/llvm/build/bin/clang --analyze a.cc
a.cc:7:3: warning: Called C++ object pointer is null
a->a();
^~~~~~
1 warning generated.
--
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