summaryrefslogtreecommitdiff
path: root/clang/test/Sema/invalid-init-diag.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Sema/invalid-init-diag.c')
-rw-r--r--clang/test/Sema/invalid-init-diag.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/test/Sema/invalid-init-diag.c b/clang/test/Sema/invalid-init-diag.c
new file mode 100644
index 0000000..3e4870e
--- /dev/null
+++ b/clang/test/Sema/invalid-init-diag.c
@@ -0,0 +1,4 @@
+// RUN: %clang_cc1 %s -verify -fsyntax-only
+
+int a;
+struct {int x;} x = a; // expected-error {{with an expression of incompatible type 'int'}}