diff options
author | Chris Lattner <sabre@nondot.org> | 2009-09-23 06:06:36 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-09-23 06:06:36 +0000 |
commit | 21fb98ee003e992b0c4e204d98a19e0ef544cae3 (patch) | |
tree | fb74b2013454c3630bc397c5a8ba0c8f9b654b42 /test | |
parent | 6a3bc6df36848188e9d0c1d978170c2b0918c6a3 (diff) |
implement support for __builtin_eh_return_data_regno on x86-32 and x86-64.
This implements PR5034 and rdar://6836445.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82614 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/Sema/builtins.c | 10 |
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}} +} + |