forked from OSchip/llvm-project
Fixed source range for extern linkage specification without braces.
llvm-svn: 130660
This commit is contained in:
parent
9af3d4b193
commit
4d42399d46
|
@ -202,6 +202,11 @@ Decl *Parser::ParseLinkage(ParsingDeclSpec &DS, unsigned Context) {
|
|||
MaybeParseMicrosoftAttributes(attrs);
|
||||
|
||||
if (Tok.isNot(tok::l_brace)) {
|
||||
// Reset the source range in DS, as the leading "extern"
|
||||
// does not really belong to the inner declaration ...
|
||||
DS.SetRangeStart(SourceLocation());
|
||||
DS.SetRangeEnd(SourceLocation());
|
||||
// ... but anyway remember that such an "extern" was seen.
|
||||
DS.setExternInLinkageSpec(true);
|
||||
ParseExternalDeclaration(attrs, &DS);
|
||||
return Actions.ActOnFinishLinkageSpecification(getCurScope(), LinkageSpec,
|
||||
|
|
Loading…
Reference in New Issue