aboutsummaryrefslogtreecommitdiff
path: root/test/Analysis/compound-literals.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Analysis/compound-literals.c')
-rw-r--r--test/Analysis/compound-literals.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/Analysis/compound-literals.c b/test/Analysis/compound-literals.c
new file mode 100644
index 000000000000..a2556d2a7950
--- /dev/null
+++ b/test/Analysis/compound-literals.c
@@ -0,0 +1,9 @@
+// RUN: %clang_cc1 -triple=i386-apple-darwin10 -analyze -analyzer-checker=debug.ExprInspection -verify %s
+void clang_analyzer_eval(int);
+
+// pr28449: Used to crash.
+void foo(void) {
+ static const unsigned short array[] = (const unsigned short[]){0x0F00};
+ // FIXME: Should be true.
+ clang_analyzer_eval(array[0] == 0x0F00); // expected-warning{{UNKNOWN}}
+}