aboutsummaryrefslogtreecommitdiff
path: root/test/Sema/builtins.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Sema/builtins.c')
-rw-r--r--test/Sema/builtins.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/Sema/builtins.c b/test/Sema/builtins.c
index c3daa667d8..04a56bd5ed 100644
--- a/test/Sema/builtins.c
+++ b/test/Sema/builtins.c
@@ -52,3 +52,13 @@ void test10(void) {
// No warning about falling off the end of a noreturn function.
}
+
+void test11(int X) {
+ switch (X) {
+ case __builtin_eh_return_data_regno(0): // constant foldable.
+ break;
+ }
+
+ __builtin_eh_return_data_regno(X); // expected-error {{not an integer constant expression}}
+}
+