diff options
Diffstat (limited to 'test/Analysis/reference.cpp')
-rw-r--r-- | test/Analysis/reference.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/test/Analysis/reference.cpp b/test/Analysis/reference.cpp index 4a2cbb8e25..ce0ee8ed57 100644 --- a/test/Analysis/reference.cpp +++ b/test/Analysis/reference.cpp @@ -116,8 +116,11 @@ void testReferenceAddress(int &x) { struct S { int &x; }; - extern S *getS(); - clang_analyzer_eval(&getS()->x != 0); // expected-warning{{TRUE}} + extern S getS(); + clang_analyzer_eval(&getS().x != 0); // expected-warning{{TRUE}} + + extern S *getSP(); + clang_analyzer_eval(&getSP()->x != 0); // expected-warning{{TRUE}} } @@ -150,10 +153,3 @@ namespace rdar11212286 { return *x; // should warn here! } } - -void testReferenceFieldAddress() { - struct S { int &x; }; - - extern S getS(); - clang_analyzer_eval(&getS().x != 0); // expected-warning{{UNKNOWN}} -} |