diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/Analysis/diagnostics/deref-track-symbolic-region.cpp | 1 | ||||
-rw-r--r-- | test/Analysis/method-call-path-notes.cpp | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/test/Analysis/diagnostics/deref-track-symbolic-region.cpp b/test/Analysis/diagnostics/deref-track-symbolic-region.cpp index 87313de13a..4a5f0cfa3f 100644 --- a/test/Analysis/diagnostics/deref-track-symbolic-region.cpp +++ b/test/Analysis/diagnostics/deref-track-symbolic-region.cpp @@ -11,6 +11,7 @@ void test(S *p) { if (p) return; //expected-note@-1{{Taking false branch}} //expected-note@-2{{Assuming pointer value is null}} + //expected-note@-3{{Assuming 'p' is null}} r.y = 5; // expected-warning {{Access to field 'y' results in a dereference of a null pointer (loaded from variable 'r')}} // expected-note@-1{{Access to field 'y' results in a dereference of a null pointer (loaded from variable 'r')}} } diff --git a/test/Analysis/method-call-path-notes.cpp b/test/Analysis/method-call-path-notes.cpp index 17034b9b00..b95ec98ec8 100644 --- a/test/Analysis/method-call-path-notes.cpp +++ b/test/Analysis/method-call-path-notes.cpp @@ -25,7 +25,7 @@ void test_ic_set_to_null() { } void test_ic_null(TestInstanceCall *p) { - if (!p) // expected-note {{Assuming pointer value is null}} expected-note {{Taking true branch}} + if (!p) // expected-note {{Assuming pointer value is null}} expected-note {{Assuming 'p' is null}} expected-note {{Taking true branch}} p->foo(); // expected-warning {{Called C++ object pointer is null}} expected-note{{Called C++ object pointer is null}} } @@ -37,7 +37,7 @@ void test_ic_member_ptr() { } void test_cast(const TestInstanceCall *p) { - if (!p) // expected-note {{Assuming pointer value is null}} expected-note {{Taking true branch}} + if (!p) // expected-note {{Assuming pointer value is null}} expected-note {{Assuming 'p' is null}} expected-note {{Taking true branch}} const_cast<TestInstanceCall *>(p)->foo(); // expected-warning {{Called C++ object pointer is null}} expected-note {{Called C++ object pointer is null}} } |