summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/pr21989.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGenCXX/pr21989.cpp')
-rw-r--r--test/CodeGenCXX/pr21989.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/CodeGenCXX/pr21989.cpp b/test/CodeGenCXX/pr21989.cpp
new file mode 100644
index 0000000..0b9bccb
--- /dev/null
+++ b/test/CodeGenCXX/pr21989.cpp
@@ -0,0 +1,9 @@
+// REQUIRES: asserts
+// RUN: not %clang_cc1 -emit-llvm -triple %itanium_abi_triple -o - %s 2>&1 | FileCheck %s
+
+struct {
+ void __attribute__((used)) f() {}
+};
+// CHECK: 2 errors generated.
+
+// Emit the errors, but don't assert.
OpenPOWER on IntegriCloud