aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse/ParseTentative.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2012-04-11 04:01:28 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2012-04-11 04:01:28 +0000
commit6ce48a70ace62eb0eaf7b2769d05c5f13b7c7b6c (patch)
tree310b1017ddd95837784986b6a49f1962f417fb59 /lib/Parse/ParseTentative.cpp
parent9793428697f01b139443b7a0a882ea5dd1967e56 (diff)
Support C++11 attributes at the start of a parameter-declaration.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154476 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseTentative.cpp')
-rw-r--r--lib/Parse/ParseTentative.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Parse/ParseTentative.cpp b/lib/Parse/ParseTentative.cpp
index 5ce6b2b91c..28c5e8b673 100644
--- a/lib/Parse/ParseTentative.cpp
+++ b/lib/Parse/ParseTentative.cpp
@@ -1322,6 +1322,11 @@ Parser::TPResult Parser::TryParseParameterDeclarationClause() {
return TPResult::False();
}
+ // An attribute-specifier-seq here is a sign of a function declarator.
+ if (isCXX11AttributeSpecifier(/*Disambiguate*/false,
+ /*OuterMightBeMessageSend*/true))
+ return TPResult::True();
+
ParsedAttributes attrs(AttrFactory);
MaybeParseMicrosoftAttributes(attrs);