summaryrefslogtreecommitdiffstats
path: root/clang/test/Parser/cxx-attributes.cpp
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2014-12-28 22:28:32 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2014-12-28 22:28:32 +0000
commit06039218f5ef078b7a815a68d2f9eca44658d7f0 (patch)
treedb51e2aaef185c11d0f646c1e8ca410a95b114b1 /clang/test/Parser/cxx-attributes.cpp
parent3087a2b949d7e952c1aecfd6579b40908380851b (diff)
downloadbcm5719-llvm-06039218f5ef078b7a815a68d2f9eca44658d7f0.tar.gz
bcm5719-llvm-06039218f5ef078b7a815a68d2f9eca44658d7f0.zip
Parse: Don't crash when 'typename' shows up in an attribute
isDeclarationSpecifier performs error recovers which jostles the token stream. Specifically, TryAnnotateTypeOrScopeToken will end up consuming a typename token which will confuse the attribute parsing machinery as we no-longer have something identifier-like. llvm-svn: 224903
Diffstat (limited to 'clang/test/Parser/cxx-attributes.cpp')
-rw-r--r--clang/test/Parser/cxx-attributes.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/test/Parser/cxx-attributes.cpp b/clang/test/Parser/cxx-attributes.cpp
index 6fd7f4f68a4..8cba5bc2a17 100644
--- a/clang/test/Parser/cxx-attributes.cpp
+++ b/clang/test/Parser/cxx-attributes.cpp
@@ -20,3 +20,5 @@ namespace PR17666 {
typedef int __attribute__((aligned(int(1)))) T1;
typedef int __attribute__((aligned(int))) T2; // expected-error {{expected '(' for function-style cast}}
}
+
+__attribute((typename)) int x; // expected-error {{expected ')'}}
OpenPOWER on IntegriCloud