diff options
author | Abramo Bagnara <abramo.bagnara@gmail.com> | 2011-03-03 14:20:18 +0000 |
---|---|---|
committer | Abramo Bagnara <abramo.bagnara@gmail.com> | 2011-03-03 14:20:18 +0000 |
commit | 348823aa3655885e34621f3077dbd734022f0b64 (patch) | |
tree | 7b2ba70f7303ed58ae4da3e603658cacbf08e4fc /clang/lib/Parse/Parser.cpp | |
parent | 8e9a126a6c1ba2c0332e4f8eb4e01956096e6f6a (diff) | |
download | bcm5719-llvm-348823aa3655885e34621f3077dbd734022f0b64.tar.gz bcm5719-llvm-348823aa3655885e34621f3077dbd734022f0b64.zip |
Fixed source range for FileScopeAsmDecl. Others source range fixes will follow.
llvm-svn: 126939
Diffstat (limited to 'clang/lib/Parse/Parser.cpp')
-rw-r--r-- | clang/lib/Parse/Parser.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
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: |