[cfe-commits] r86273 - /cfe/trunk/test/Analysis/PR3135.c
Nuno Lopes
nunoplopes at sapo.pt
Fri Nov 6 10:42:13 PST 2009
Author: nlopes
Date: Fri Nov 6 12:42:13 2009
New Revision: 86273
URL: http://llvm.org/viewvc/llvm-project?rev=86273&view=rev
Log:
add test case for PR3135 which was already fixed
Added:
cfe/trunk/test/Analysis/PR3135.c
Added: cfe/trunk/test/Analysis/PR3135.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/PR3135.c?rev=86273&view=auto
==============================================================================
--- cfe/trunk/test/Analysis/PR3135.c (added)
+++ cfe/trunk/test/Analysis/PR3135.c Fri Nov 6 12:42:13 2009
@@ -0,0 +1,20 @@
+// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -verify %s
+// PR3135
+
+typedef struct {
+ int *a;
+} structure;
+
+int bar(structure *x);
+
+int foo()
+{
+ int x;
+ structure y = {&x};
+
+ // the call to bar may initialize x
+ if (bar(&y) && x) // no-warning
+ return 1;
+
+ return 0;
+}
More information about the cfe-commits
mailing list