summaryrefslogtreecommitdiffstats
path: root/test/Analysis/redecl.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Analysis/redecl.c')
-rw-r--r--test/Analysis/redecl.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/Analysis/redecl.c b/test/Analysis/redecl.c
new file mode 100644
index 0000000000..f5771a7317
--- /dev/null
+++ b/test/Analysis/redecl.c
@@ -0,0 +1,13 @@
+// RUN: %clang_analyze_cc1 -analyzer-checker=core,debug.ExprInspection -verify %s
+// XFAIL: *
+
+void clang_analyzer_eval(int);
+
+extern const int extInt;
+
+int main()
+{
+ clang_analyzer_eval(extInt == 2); // expected-warning{{TRUE}}
+}
+
+extern const int extInt = 2;