summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseDecl.cpp
diff options
context:
space:
mode:
authorFrancois Pichet <pichet2000@gmail.com>2011-01-31 04:54:32 +0000
committerFrancois Pichet <pichet2000@gmail.com>2011-01-31 04:54:32 +0000
commit79f3a8700759c33c6a4cb5b8ce9fd0ad0bf57bcf (patch)
tree559c0b276002d1b317ad9f651953edd3adb2fc4b /clang/lib/Parse/ParseDecl.cpp
parent221f4faa92ab90321083fb690e683738c411bc29 (diff)
downloadbcm5719-llvm-79f3a8700759c33c6a4cb5b8ce9fd0ad0bf57bcf.tar.gz
bcm5719-llvm-79f3a8700759c33c6a4cb5b8ce9fd0ad0bf57bcf.zip
Allow Microsoft attributes in a constructor's parameter list.
This fixes a few compile errors when parsing <regex> from MSVC 2008 with clang. llvm-svn: 124573
Diffstat (limited to 'clang/lib/Parse/ParseDecl.cpp')
-rw-r--r--clang/lib/Parse/ParseDecl.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp
index c4fce66b657..24e41d07379 100644
--- a/clang/lib/Parse/ParseDecl.cpp
+++ b/clang/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.
OpenPOWER on IntegriCloud