summaryrefslogtreecommitdiffstats
path: root/clang/test/Parser/attributes.c
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2011-10-17 21:20:17 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2011-10-17 21:20:17 +0000
commitb12bf697697210e183393dc47f38f6aa15d51571 (patch)
treed7b55d548486adecd7e356d19a49435810f2bbb3 /clang/test/Parser/attributes.c
parent4373c21205bde6363c279c50cb7aafbf92d99e18 (diff)
downloadbcm5719-llvm-b12bf697697210e183393dc47f38f6aa15d51571.tar.gz
bcm5719-llvm-b12bf697697210e183393dc47f38f6aa15d51571.zip
Refactor __attribute__ parsing, and add a diagnostic if the r_paren at the end
of an attrib is missing. gcc does not allow the closing parenthesis to be omitted. llvm-svn: 142255
Diffstat (limited to 'clang/test/Parser/attributes.c')
-rw-r--r--clang/test/Parser/attributes.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/test/Parser/attributes.c b/clang/test/Parser/attributes.c
index b2873638cdb..36bd8071ac5 100644
--- a/clang/test/Parser/attributes.c
+++ b/clang/test/Parser/attributes.c
@@ -56,3 +56,8 @@ void d2(void) __attribute__((noreturn)), d3(void) __attribute__((noreturn));
// PR6287
void __attribute__((returns_twice)) returns_twice_test();
+
+int aligned(int);
+int __attribute__((vec_type_hint(char, aligned(16) )) missing_rparen_1; // expected-error {{expected ')'}}
+int __attribute__((mode(x aligned(16) )) missing_rparen_2; // expected-error {{expected ')'}}
+int __attribute__((format(printf, 0 aligned(16) )) missing_rparen_3; // expected-error {{expected ')'}}
OpenPOWER on IntegriCloud