aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse/Parser.cpp
diff options
context:
space:
mode:
authorAbramo Bagnara <abramo.bagnara@gmail.com>2011-03-03 14:20:18 +0000
committerAbramo Bagnara <abramo.bagnara@gmail.com>2011-03-03 14:20:18 +0000
commit21e006e51a7f9889f55f5bc7b3ca8b50d17571ec (patch)
tree7ee0c0ee73a22c0a3dd56069aaa452bdce20767e /lib/Parse/Parser.cpp
parent67714230a191bc3c01f33378f34f34ef377991a6 (diff)
Fixed source range for FileScopeAsmDecl. Others source range fixes will follow.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126939 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/Parser.cpp')
-rw-r--r--lib/Parse/Parser.cpp6
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: