[cfe-commits] r69425 - in /cfe/trunk: include/clang/AST/Builtins.def test/Sema/statements.c
Chris Lattner
sabre at nondot.org
Fri Apr 17 23:51:21 PDT 2009
Author: lattner
Date: Sat Apr 18 01:51:21 2009
New Revision: 69425
URL: http://llvm.org/viewvc/llvm-project?rev=69425&view=rev
Log:
__builtin_prefetch should be declared as "void __builtin_prefetch(const void *)",
not "const void __builtin_prefetch(void *)". This fixes PR3912.
Modified:
cfe/trunk/include/clang/AST/Builtins.def
cfe/trunk/test/Sema/statements.c
Modified: cfe/trunk/include/clang/AST/Builtins.def
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Builtins.def?rev=69425&r1=69424&r2=69425&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/Builtins.def (original)
+++ cfe/trunk/include/clang/AST/Builtins.def Sat Apr 18 01:51:21 2009
@@ -186,7 +186,7 @@
BUILTIN(__builtin___vprintf_chk, "iicC*a", "FP:1:")
BUILTIN(__builtin_expect, "iii" , "nc")
-BUILTIN(__builtin_prefetch, "vCv*.", "nc")
+BUILTIN(__builtin_prefetch, "vvC*.", "nc")
BUILTIN(__builtin_trap, "v", "n")
BUILTIN(__builtin_shufflevector, "v." , "nc")
Modified: cfe/trunk/test/Sema/statements.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/statements.c?rev=69425&r1=69424&r2=69425&view=diff
==============================================================================
--- cfe/trunk/test/Sema/statements.c (original)
+++ cfe/trunk/test/Sema/statements.c Sat Apr 18 01:51:21 2009
@@ -21,4 +21,9 @@
void test7() { ({5;}); } // expected-warning {{expression result unused}}
// PR3062
-int x[({10;})]; // expected-error {{statement expression not allowed at file scope}}
+int test8[({10;})]; // expected-error {{statement expression not allowed at file scope}}
+
+// PR3912
+void test9(const void *P) {
+ __builtin_prefetch(P);
+}
More information about the cfe-commits
mailing list