]> granicus.if.org Git - clang/commitdiff
[analyzer] Disable a test until inlining CXXConstructExprs is fully investigated.
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Sat, 19 Feb 2011 01:08:37 +0000 (01:08 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Sat, 19 Feb 2011 01:08:37 +0000 (01:08 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126006 91177308-0d34-0410-b5e6-96231b3b80d8

test/Analysis/method-call.cpp

index 8c6b9da0f40163d8026b30a6a5673c65f84b16c3..b5b81e3402a1af3b713704be15213592015c7a9a 100644 (file)
@@ -1,4 +1,5 @@
 // RUN: %clang_cc1 -analyze -analyzer-check-objc-mem -analyzer-inline-call -analyzer-store region -verify %s
+// XFAIL: *
 
 struct A {
   int x;
@@ -28,3 +29,13 @@ void f2() {
   }
 }
 
+void f3() {
+  const A &x = (A)3;
+  if (x.getx() == 3) {
+    int *p = 0;
+    *p = 3;  // expected-warning{{Dereference of null pointer}}
+  } else {
+    int *p = 0;
+    *p = 3;  // no-warning
+  }
+}