diff options
author | Chris Lattner <sabre@nondot.org> | 2009-04-18 06:51:21 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-04-18 06:51:21 +0000 |
commit | 40c56f7129bdaf8a01e2ffe7ddde714a586eb45d (patch) | |
tree | 3d75b2053e35fc5e91a94bf0532b6a5f64338eab | |
parent | 885b6d8dbe5e5b3a39ea2ac7383c584f297ae03c (diff) |
__builtin_prefetch should be declared as "void __builtin_prefetch(const void *)",
not "const void __builtin_prefetch(void *)". This fixes PR3912.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69425 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/clang/AST/Builtins.def | 2 | ||||
-rw-r--r-- | test/Sema/statements.c | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/include/clang/AST/Builtins.def b/include/clang/AST/Builtins.def index 9e2e7859ee..766cb1143d 100644 --- a/include/clang/AST/Builtins.def +++ b/include/clang/AST/Builtins.def @@ -186,7 +186,7 @@ BUILTIN(__builtin___vfprintf_chk, "iP*icC*a", "FP:2:") 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") diff --git a/test/Sema/statements.c b/test/Sema/statements.c index 3af984ada4..9a71a40370 100644 --- a/test/Sema/statements.c +++ b/test/Sema/statements.c @@ -21,4 +21,9 @@ int test6() { return ({5;}); } 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); +} |