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
This commit is contained in:
Francois Pichet 2011-01-31 04:54:32 +00:00
parent 221f4faa92
commit 79f3a87007
2 changed files with 12 additions and 0 deletions

View File

@ -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.

View File

@ -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()
{