diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-09-28 21:14:19 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-09-28 21:14:19 +0000 |
commit | 9a8c9a2eacd80437f18edb339a37516ab7e773cd (patch) | |
tree | c4cf54d907a9538c7d0eca3007e9495d6c3b9eaa /test/Sema | |
parent | 99d6c445cc968bdf08c53a6bd4e9044bde43bdd1 (diff) |
Provide a custom diagnostic when code tries to use an unknown builtin
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83014 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema')
-rw-r--r-- | test/Sema/builtins.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/Sema/builtins.c b/test/Sema/builtins.c index 912a6b385c..e133d626ee 100644 --- a/test/Sema/builtins.c +++ b/test/Sema/builtins.c @@ -67,3 +67,7 @@ void test12(void) __attribute__((__noreturn__)); void test12(void) { __builtin_trap(); // no warning because trap is noreturn. } + +void test_unknown_builtin(int a, int b) { + __builtin_foo(a, b); // expected-error{{use of unknown builtin}} +} |