forked from OSchip/llvm-project
[modules] Skip trailing attributes when skipping a class definition during parse-merging.
llvm-svn: 241180
This commit is contained in:
parent
943829a1ad
commit
04c6c1f3a5
|
@ -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.
|
||||
|
|
|
@ -80,3 +80,7 @@ namespace SeparateInline {
|
|||
void f() {}
|
||||
constexpr int g() { return 0; }
|
||||
}
|
||||
|
||||
namespace TrailingAttributes {
|
||||
template<typename T> struct X {} __attribute__((aligned(8)));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue