diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2012-08-14 13:13:47 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2012-08-14 13:13:47 +0000 |
commit | 833fb9f7e39e7aa6f60fbac341968e5a6fdafb81 (patch) | |
tree | 65d46c3704201db15183565b8a97d958ab3d3636 /clang/test/Sema/callingconv.c | |
parent | ef7758f561838a966113a725d18a11f5ef57fab4 (diff) | |
download | bcm5719-llvm-833fb9f7e39e7aa6f60fbac341968e5a6fdafb81.tar.gz bcm5719-llvm-833fb9f7e39e7aa6f60fbac341968e5a6fdafb81.zip |
Fix horribly broken sema of __attribute__((pcs())).
llvm-svn: 161863
Diffstat (limited to 'clang/test/Sema/callingconv.c')
-rw-r--r-- | clang/test/Sema/callingconv.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/test/Sema/callingconv.c b/clang/test/Sema/callingconv.c index 25669f08ae2..6c844a37331 100644 --- a/clang/test/Sema/callingconv.c +++ b/clang/test/Sema/callingconv.c @@ -36,6 +36,14 @@ void (__attribute__((cdecl)) *pctest2)() = ctest2; typedef void (__attribute__((fastcall)) *Handler) (float *); Handler H = foo; +int __attribute__((pcs("aapcs", "aapcs"))) pcs1(void); // expected-error {{attribute takes one argument}} +int __attribute__((pcs())) pcs2(void); // expected-error {{attribute takes one argument}} +int __attribute__((pcs(pcs1))) pcs3(void); // expected-error {{attribute takes one argument}} +int __attribute__((pcs(0))) pcs4(void); // expected-error {{'pcs' attribute requires parameter 1 to be a string}} +int __attribute__((pcs("aapcs"))) pcs5(void); // no-error +int __attribute__((pcs("aapcs-vfp"))) pcs6(void); // no-error +int __attribute__((pcs("foo"))) pcs7(void); // expected-error {{Invalid PCS type}} + // PR6361 void ctest3(); void __attribute__((cdecl)) ctest3() {} |