diff options
Diffstat (limited to 'test/Analysis/reinterpret-cast.cpp')
-rw-r--r-- | test/Analysis/reinterpret-cast.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/Analysis/reinterpret-cast.cpp b/test/Analysis/reinterpret-cast.cpp index 59e6a53..cb7cbfd 100644 --- a/test/Analysis/reinterpret-cast.cpp +++ b/test/Analysis/reinterpret-cast.cpp @@ -86,3 +86,20 @@ namespace PR15345 { clang_analyzer_eval(p->x == 42); // expected-warning{{TRUE}} }; } + +int trackpointer_std_addressof() { + int x; + int *p = (int*)&reinterpret_cast<const volatile char&>(x); + *p = 6; + return x; // no warning +} + +void set_x1(int *&); +void set_x2(void *&); +int radar_13146953(void) { + int *x = 0, *y = 0; + + set_x1(x); + set_x2((void *&)y); + return *x + *y; // no warning +}
\ No newline at end of file |