Move policy on unnamed fields (a Microsoft extension) from Parser::ParseStructDeclaration() to the driver.
llvm-svn: 46974
This commit is contained in:
parent
5915777fca
commit
bff738543d
|
@ -440,6 +440,9 @@ static void InitializeDiagnostics(Diagnostic &Diags) {
|
|||
diag::MAP_IGNORE);
|
||||
if (!WarnUndefMacros)
|
||||
Diags.setDiagnosticMapping(diag::warn_pp_undef_identifier,diag::MAP_IGNORE);
|
||||
|
||||
if (MSExtensions) // MS allows unnamed struct/union fields.
|
||||
Diags.setDiagnosticMapping(diag::w_no_declarators, diag::MAP_IGNORE);
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
|
|
@ -671,8 +671,7 @@ void Parser::ParseStructDeclaration(DeclTy *TagDecl,
|
|||
|
||||
// If there are no declarators, issue a warning.
|
||||
if (Tok.is(tok::semi)) {
|
||||
if (!getLang().Microsoft) // MS allows unnamed struct/union fields.
|
||||
Diag(SpecQualLoc, diag::w_no_declarators);
|
||||
Diag(SpecQualLoc, diag::w_no_declarators);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue