IdentifierInfo.
Ee: C++ copy constructors.
llvm-svn: 167092
const IdentifierInfo *II = D->getIdentifier();
if (!II)
- return true;
+ return false;
// This set of "escaping" APIs is
int getx() const { return x; }
};
+struct B{
+ int x;
+};
+
void testNullObject(A *a) {
clang_analyzer_eval(a); // expected-warning{{UNKNOWN}}
(void)a->getx(); // assume we know what we're doing
A x = 3;
clang_analyzer_eval(x.getx() == 3); // expected-warning{{TRUE}}
}
+
+void checkThatCopyConstructorDoesNotInvalidateObjectBeingCopied() {
+ B t;
+ t.x = 0;
+ B t2(t);
+ clang_analyzer_eval(t.x == 0); // expected-warning{{TRUE}}
+}