[modules] Skip trailing attributes when skipping a class definition during parse-merging.

llvm-svn: 241180
This commit is contained in:
Richard Smith 2015-07-01 18:56:50 +00:00
parent 943829a1ad
commit 04c6c1f3a5
2 changed files with 9 additions and 0 deletions

View File

@ -2769,6 +2769,11 @@ void Parser::SkipCXXMemberSpecification(SourceLocation RecordLoc,
BalancedDelimiterTracker T(*this, tok::l_brace);
T.consumeOpen();
T.skipToEnd();
// Parse and discard any trailing attributes.
ParsedAttributes Attrs(AttrFactory);
if (Tok.is(tok::kw___attribute))
MaybeParseGNUAttributes(Attrs);
}
/// ParseCXXMemberSpecification - Parse the class definition.

View File

@ -80,3 +80,7 @@ namespace SeparateInline {
void f() {}
constexpr int g() { return 0; }
}
namespace TrailingAttributes {
template<typename T> struct X {} __attribute__((aligned(8)));
}