From 348823aa3655885e34621f3077dbd734022f0b64 Mon Sep 17 00:00:00 2001 From: Abramo Bagnara Date: Thu, 3 Mar 2011 14:20:18 +0000 Subject: Fixed source range for FileScopeAsmDecl. Others source range fixes will follow. llvm-svn: 126939 --- clang/lib/Parse/Parser.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'clang/lib/Parse/Parser.cpp') diff --git a/clang/lib/Parse/Parser.cpp b/clang/lib/Parse/Parser.cpp index eb78db059e5..d9b37d2c56c 100644 --- a/clang/lib/Parse/Parser.cpp +++ b/clang/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: -- cgit v1.2.3