aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/Analysis/fields.c11
-rw-r--r--test/Analysis/reference.cpp4
2 files changed, 4 insertions, 11 deletions
diff --git a/test/Analysis/fields.c b/test/Analysis/fields.c
index a2b3dcf738..a10d5a8060 100644
--- a/test/Analysis/fields.c
+++ b/test/Analysis/fields.c
@@ -1,6 +1,4 @@
-// RUN: %clang_cc1 -analyze -analyzer-checker=core,alpha.core,debug.ExprInspection %s -analyzer-store=region -verify
-
-void clang_analyzer_eval(int);
+// RUN: %clang_cc1 -analyze -analyzer-checker=core,alpha.core %s -analyzer-store=region -verify
unsigned foo();
typedef struct bf { unsigned x:2; } bf;
@@ -35,10 +33,3 @@ void testNullAddress() {
int *px = &p->x; // expected-warning{{Access to field 'x' results in a dereference of a null pointer (loaded from variable 'p')}}
*px = 1; // No warning because analysis stops at the previous line.
}
-
-void testLazyCompoundVal() {
- Point p = {42, 0};
- Point q;
- clang_analyzer_eval((q = p).x == 42); // expected-warning{{TRUE}}
- clang_analyzer_eval(q.x == 42); // expected-warning{{TRUE}}
-}
diff --git a/test/Analysis/reference.cpp b/test/Analysis/reference.cpp
index ce0ee8ed57..374f3f7261 100644
--- a/test/Analysis/reference.cpp
+++ b/test/Analysis/reference.cpp
@@ -116,8 +116,10 @@ void testReferenceAddress(int &x) {
struct S { int &x; };
+ // FIXME: Should be TRUE. Fields of return-by-value structs are not yet
+ // symbolicated. Tracked by <rdar://problem/12137950>.
extern S getS();
- clang_analyzer_eval(&getS().x != 0); // expected-warning{{TRUE}}
+ clang_analyzer_eval(&getS().x != 0); // expected-warning{{UNKNOWN}}
extern S *getSP();
clang_analyzer_eval(&getSP()->x != 0); // expected-warning{{TRUE}}