summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2011-01-05 12:14:39 +0000
committerJohn McCall <rjmccall@apple.com>2011-01-05 12:14:39 +0000
commit3882ace207c646a5081047552946b03170510a77 (patch)
treea406788b6a637201533dd289127af58fc76bd1dc /clang/test
parent5a2bb998ac41a85b5b6dfd04f2c116f2c6891ef8 (diff)
downloadbcm5719-llvm-3882ace207c646a5081047552946b03170510a77.tar.gz
bcm5719-llvm-3882ace207c646a5081047552946b03170510a77.zip
Refactor the application of type attributes so that attributes from
the declaration-specifiers and on the declarator itself are moved to the appropriate declarator chunk. This permits a greatly simplified model for how to apply these attributes, as well as allowing a much more efficient query for the GC attribute. Now all qualifier queries follow the same basic strategy of "local qualifiers, local qualifiers on the canonical type, then look through arrays". This can be easily optimized by changing the canonical qualified-array-type representation. Do not process type attributes as decl attributes on declarations with declarators. When computing the type of a block, synthesize a prototype function declarator chunk if the decl-spec type was not a function. This simplifies the logic for building block signatures. Change the logic which inserts an objc_read_weak on a block literal to only fire if the block has a __weak __block variable, rather than if the return type of the block is __weak qualified, which is not actually a sensible thing to ask. llvm-svn: 122871
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/Sema/block-return.c2
-rw-r--r--clang/test/Sema/stdcall-fastcall.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/clang/test/Sema/block-return.c b/clang/test/Sema/block-return.c
index c6fcbe78eed..5741fc9c6df 100644
--- a/clang/test/Sema/block-return.c
+++ b/clang/test/Sema/block-return.c
@@ -97,7 +97,7 @@ bptr foo5(int j) {
}
int (*funcptr3[5])(long);
-int sz8 = sizeof(^int (*[5])(long) {return funcptr3;}); // expected-error {{block declared as returning an array}}
+int sz8 = sizeof(^int (*[5])(long) {return funcptr3;}); // expected-error {{function cannot return array type}} expected-warning {{incompatible pointer to integer conversion}}
void foo6() {
int (^b)(int) __attribute__((noreturn));
diff --git a/clang/test/Sema/stdcall-fastcall.c b/clang/test/Sema/stdcall-fastcall.c
index a0695264798..dffcb969a99 100644
--- a/clang/test/Sema/stdcall-fastcall.c
+++ b/clang/test/Sema/stdcall-fastcall.c
@@ -5,6 +5,6 @@ int __attribute__((stdcall)) var1; // expected-warning{{'stdcall' only applies t
int __attribute__((fastcall)) var2; // expected-warning{{'fastcall' only applies to function types; type here is 'int'}}
// Different CC qualifiers are not compatible
-void __attribute__((stdcall, fastcall)) foo3(void); // expected-error{{stdcall and fastcall attributes are not compatible}}
+void __attribute__((stdcall, fastcall)) foo3(void); // expected-error{{fastcall and stdcall attributes are not compatible}}
void __attribute__((stdcall)) foo4(); // expected-note{{previous declaration is here}}
void __attribute__((fastcall)) foo4(void); // expected-error{{function declared 'fastcall' here was previously declared 'stdcall'}}
OpenPOWER on IntegriCloud