diff options
Diffstat (limited to 'lib/Parse/Parser.cpp')
-rw-r--r-- | lib/Parse/Parser.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Parse/Parser.cpp b/lib/Parse/Parser.cpp index eb78db059e..d9b37d2c56 100644 --- a/lib/Parse/Parser.cpp +++ b/lib/Parse/Parser.cpp @@ -513,14 +513,16 @@ Parser::ParseExternalDeclaration(ParsedAttributesWithRange &attrs, case tok::kw_asm: { ProhibitAttributes(attrs); - ExprResult Result(ParseSimpleAsm()); + SourceLocation StartLoc = Tok.getLocation(); + SourceLocation EndLoc; + ExprResult Result(ParseSimpleAsm(&EndLoc)); ExpectAndConsume(tok::semi, diag::err_expected_semi_after, "top-level asm block"); if (Result.isInvalid()) return DeclGroupPtrTy(); - SingleDecl = Actions.ActOnFileScopeAsmDecl(Tok.getLocation(), Result.get()); + SingleDecl = Actions.ActOnFileScopeAsmDecl(Result.get(), StartLoc, EndLoc); break; } case tok::at: |