forked from OSchip/llvm-project
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:
parent
221f4faa92
commit
79f3a87007
|
@ -2512,6 +2512,10 @@ bool Parser::isConstructorDeclarator() {
|
||||||
if (SS.isSet() && Actions.ShouldEnterDeclaratorScope(getCurScope(), SS))
|
if (SS.isSet() && Actions.ShouldEnterDeclaratorScope(getCurScope(), SS))
|
||||||
DeclScopeObj.EnterDeclaratorScope();
|
DeclScopeObj.EnterDeclaratorScope();
|
||||||
|
|
||||||
|
// Optionally skip Microsoft attributes.
|
||||||
|
ParsedAttributes Attrs;
|
||||||
|
MaybeParseMicrosoftAttributes(Attrs);
|
||||||
|
|
||||||
// Check whether the next token(s) are part of a declaration
|
// Check whether the next token(s) are part of a declaration
|
||||||
// specifier, in which case we have the start of a parameter and,
|
// specifier, in which case we have the start of a parameter and,
|
||||||
// therefore, we know that this is a constructor.
|
// therefore, we know that this is a constructor.
|
||||||
|
|
|
@ -22,6 +22,14 @@ extern "C" {
|
||||||
int foo5([SA_Post(attr=1)] void *param);
|
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()
|
void uuidof_test1()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue