summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2015-06-16 20:03:47 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2015-06-16 20:03:47 +0000
commitf7ffec3b5fd9ee95ce19d7d11e648d8cb2b2c65c (patch)
tree34e7ae3110aee69ba1ff74ca1bc8df6611084275 /clang/test
parentc6afe0d4e9e0da1398a71c50bd88fbd2c700c025 (diff)
downloadbcm5719-llvm-f7ffec3b5fd9ee95ce19d7d11e648d8cb2b2c65c.tar.gz
bcm5719-llvm-f7ffec3b5fd9ee95ce19d7d11e648d8cb2b2c65c.zip
parser: diagnose empty attribute blocks
MS attributes do not permit empty attribute blocks. Correctly diagnose those. We continue to parse to ensure that we recover correctly. Because the block is empty, we do not need to skip any tokens. Bonus: tweak the comment that I updated but forgot to remove the function name in a previous commit. llvm-svn: 239846
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/Parser/MicrosoftExtensions.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/test/Parser/MicrosoftExtensions.c b/clang/test/Parser/MicrosoftExtensions.c
index a29f6c0b549..be46159f43a 100644
--- a/clang/test/Parser/MicrosoftExtensions.c
+++ b/clang/test/Parser/MicrosoftExtensions.c
@@ -55,6 +55,8 @@ int foo1([SA_Post(attr=1)] void *param);
[unbalanced(attribute) /* expected-note {{to match this '['}} */
void f(void); /* expected-error {{expected ']'}} */
+[] __interface I {}; /* expected-error {{empty attribute block is not allowed}} */
+
void ms_intrinsics(int a) {
__noop();
__assume(a);
OpenPOWER on IntegriCloud