[cfe-commits] r48331 - /cfe/trunk/Parse/ParseStmt.cpp
Chris Lattner
sabre at nondot.org
Wed Mar 12 23:29:54 PDT 2008
Author: lattner
Date: Thu Mar 13 01:29:54 2008
New Revision: 48331
URL: http://llvm.org/viewvc/llvm-project?rev=48331&view=rev
Log:
instead of passing in null end location info, pass in the same as start.
This still isn't right, but is slightly nicer.
Modified:
cfe/trunk/Parse/ParseStmt.cpp
Modified: cfe/trunk/Parse/ParseStmt.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Parse/ParseStmt.cpp?rev=48331&r1=48330&r2=48331&view=diff
==============================================================================
--- cfe/trunk/Parse/ParseStmt.cpp (original)
+++ cfe/trunk/Parse/ParseStmt.cpp Thu Mar 13 01:29:54 2008
@@ -96,7 +96,7 @@
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 @@
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 @@
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'
More information about the cfe-commits
mailing list