[cfe-commits] r109452 - in /cfe/trunk: include/clang/Basic/Builtins.def test/Sema/builtins.c

Benjamin Kramer benny.kra at googlemail.com
Mon Jul 26 15:04:15 PDT 2010


Author: d0k
Date: Mon Jul 26 17:04:15 2010
New Revision: 109452

URL: http://llvm.org/viewvc/llvm-project?rev=109452&view=rev
Log:
Mark __builtin_eh_return as noreturn. Patch by Dimitry Andric.

Modified:
    cfe/trunk/include/clang/Basic/Builtins.def
    cfe/trunk/test/Sema/builtins.c

Modified: cfe/trunk/include/clang/Basic/Builtins.def
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/Builtins.def?rev=109452&r1=109451&r2=109452&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/Builtins.def (original)
+++ cfe/trunk/include/clang/Basic/Builtins.def Mon Jul 26 17:04:15 2010
@@ -324,7 +324,7 @@
 BUILTIN(__builtin_vsnprintf, "ic*zcC*a", "nFP:2:")
 
 // GCC exception builtins
-BUILTIN(__builtin_eh_return, "vzv*", "") // FIXME: Takes intptr_t, not size_t!
+BUILTIN(__builtin_eh_return, "vzv*", "r") // FIXME: Takes intptr_t, not size_t!
 BUILTIN(__builtin_frob_return_addr, "v*v*", "n")
 BUILTIN(__builtin_dwarf_cfa, "v*", "n")
 BUILTIN(__builtin_init_dwarf_reg_size_table, "vv*", "n")

Modified: cfe/trunk/test/Sema/builtins.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/builtins.c?rev=109452&r1=109451&r2=109452&view=diff
==============================================================================
--- cfe/trunk/test/Sema/builtins.c (original)
+++ cfe/trunk/test/Sema/builtins.c Mon Jul 26 17:04:15 2010
@@ -80,3 +80,7 @@
 void test_unknown_builtin(int a, int b) {
   __builtin_foo(a, b); // expected-error{{use of unknown builtin}}
 }
+
+int test13() {
+  __builtin_eh_return(0, 0); // no warning, eh_return never returns.
+}





More information about the cfe-commits mailing list