void testCastViaNew(B *b) { Grandchild *g = new (b) Grandchild(); clang_analyzer_eval(g->foo() == 42); // expected-warning{{TRUE}} g->x = 42; clang_analyzer_eval(g->x == 42); // expected-warning{{TRUE}} }
void testDevirtualizeToMiddle() { Grandchild x; x.m_child = 42; // Don't crash when inlining and devirtualizing. x.interface(); }
void testCastViaNew(B *b) { Grandchild *g = new (b) Grandchild(); // FIXME: We actually now have perfect type info because of 'new'. // This should be TRUE. clang_analyzer_eval(g->foo() == 42); // expected-warning{{UNKNOWN}} g->x = 42; clang_analyzer_eval(g->x == 42); // expected-warning{{TRUE}} }