aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-03-13 06:29:54 +0000
committerChris Lattner <sabre@nondot.org>2008-03-13 06:29:54 +0000
commit691a38b740562119ea8b2e25c3e04599971e708f (patch)
treec1b2e26d1aa07f34f50dfbf97e8bb92d5b437e1f
parent81c018d9482e7cc2addadc6202dcf162a01faefd (diff)
instead of passing in null end location info, pass in the same as start.
This still isn't right, but is slightly nicer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48331 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--Parse/ParseStmt.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Parse/ParseStmt.cpp b/Parse/ParseStmt.cpp
index 160701ee9c..dab484211e 100644
--- a/Parse/ParseStmt.cpp
+++ b/Parse/ParseStmt.cpp
@@ -96,7 +96,7 @@ Parser::StmtResult Parser::ParseStatementOrDeclaration(bool OnlyStatement) {
SourceLocation DeclStart = Tok.getLocation();
DeclTy *Res = ParseDeclaration(Declarator::BlockContext);
// FIXME: Pass in the right location for the end of the declstmt.
- return Actions.ActOnDeclStmt(Res, DeclStart, SourceLocation());
+ return Actions.ActOnDeclStmt(Res, DeclStart, DeclStart);
} else if (Tok.is(tok::r_brace)) {
Diag(Tok, diag::err_expected_statement);
return true;
@@ -438,7 +438,7 @@ Parser::StmtResult Parser::ParseCompoundStatementBody(bool isStmtExpr) {
SourceLocation DeclStart = Tok.getLocation();
DeclTy *Res = ParseDeclaration(Declarator::BlockContext);
// FIXME: Pass in the right location for the end of the declstmt.
- R = Actions.ActOnDeclStmt(Res, DeclStart, SourceLocation());
+ R = Actions.ActOnDeclStmt(Res, DeclStart, DeclStart);
} else {
// Otherwise this was a unary __extension__ marker. Parse the
// subexpression and add the __extension__ unary op.
@@ -756,7 +756,7 @@ Parser::StmtResult Parser::ParseForStatement() {
DeclTy *aBlockVarDecl = ParseDeclaration(Declarator::ForContext);
// FIXME: Pass in the right location for the end of the declstmt.
StmtResult stmtResult = Actions.ActOnDeclStmt(aBlockVarDecl, DeclStart,
- SourceLocation());
+ DeclStart);
FirstPart = stmtResult.isInvalid ? 0 : stmtResult.Val;
if ((ForEach = isTokIdentifier_in())) {
ConsumeToken(); // consume 'in'