aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Parse/ParseDecl.cpp4
-rw-r--r--test/Parser/MicrosoftExtensions.cpp8
2 files changed, 12 insertions, 0 deletions
diff --git a/lib/Parse/ParseDecl.cpp b/lib/Parse/ParseDecl.cpp
index c4fce66b65..24e41d0737 100644
--- a/lib/Parse/ParseDecl.cpp
+++ b/lib/Parse/ParseDecl.cpp
@@ -2512,6 +2512,10 @@ bool Parser::isConstructorDeclarator() {
if (SS.isSet() && Actions.ShouldEnterDeclaratorScope(getCurScope(), SS))
DeclScopeObj.EnterDeclaratorScope();
+ // Optionally skip Microsoft attributes.
+ ParsedAttributes Attrs;
+ MaybeParseMicrosoftAttributes(Attrs);
+
// Check whether the next token(s) are part of a declaration
// specifier, in which case we have the start of a parameter and,
// therefore, we know that this is a constructor.
diff --git a/test/Parser/MicrosoftExtensions.cpp b/test/Parser/MicrosoftExtensions.cpp
index 1d5811496a..fd0d7d50d0 100644
--- a/test/Parser/MicrosoftExtensions.cpp
+++ b/test/Parser/MicrosoftExtensions.cpp
@@ -22,6 +22,14 @@ extern "C" {
int foo5([SA_Post(attr=1)] void *param);
}
+class class_attr {
+public:
+ class_attr([SA_Pre(Null=SA_No,NullTerminated=SA_Yes)] int a)
+ {
+ }
+};
+
+
void uuidof_test1()
{