http://llvm.org/bugs/show_bug.cgi?id=19539
Bug ID: 19539
Summary: Analyzer crashes on temporaries life-extended via
members
Product: clang
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Static Analyzer
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
struct S {
~S(){}
};
struct A {
int i;
S s;
};
void f() {
const int& i = A().i;
}
When analyzing the code above, static analyzer crashes with the assertion in
lib/StaticAnalyzer/Core/ExprEngineCXX.cpp:317: "RecordDecl && \"Only
CXXRecordDecls should have destructors\"".
The reason is that ExprEngine::ProcessAutomaticObjDtor tries to get destructor
of the type of the variable. Instead, it should determine all life-extended
temporaries from the variable initializer expression (probably, by getting all
CXXBindTemporaryExpr nodes in the initializer expression?).
--
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