1 // RUN: %clang_analyze_cc1 -analyzer-checker=core,unix.Malloc,debug.ExprInspection -verify %s
4 void clang_analyzer_eval(bool);
21 return reinterpret_cast<void*&>(w
);
28 operator A() { return A(); }
45 return &reinterpret_cast<void*&>(*w
);
65 clang_analyzer_eval(nums
[0] == 1); // expected-warning{{TRUE}}
67 // This used to fail with MallocChecker on, and /only/ in C++ mode.
68 // This struct is POD, though, so it should be fine to put it in a VLA.
69 struct { int x
; } structs
[n
];
71 clang_analyzer_eval(structs
[0].x
== 1); // expected-warning{{TRUE}}
74 void useIntArray(int []);
75 void testIntArrayLiteral() {
76 useIntArray((int []){ 1, 2, 3 });