[LLVMbugs] [Bug 13724] New: vector resize: object pointer is null
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Aug 29 08:14:51 PDT 2012
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: kremenek at apple.com
ReportedBy: roland at utk.edu
CC: llvmbugs at cs.uiuc.edu
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.
More information about the llvm-bugs
mailing list