http://llvm.org/bugs/show_bug.cgi?id=13724
Bug #: 13724
Summary: vector resize: object pointer is null
Product: clang
Version: trunk
Platform: PC
OS/Version: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: Static Analyzer
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
Classification: Unclassified
#include <vector>
class c
{
public:
void f() {};
};
int main()
{
std::vector<c> v;
v.resize(1);
v[0].f();
return 0;
}
gives:
test4.cc:12:5: warning: Called C++ object pointer is null
v[0].f();
^~~~
Without the resize the program is incorrect but then no warning is printed.
--
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