improve DeclStmt to be able to store SourceRange info correctly.
Set the start of DeclStmt range. Right now the end is meaningless
though.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48330 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Parse/ParseObjc.cpp b/Parse/ParseObjc.cpp
index 7f33ffd..77d2adb 100644
--- a/Parse/ParseObjc.cpp
+++ b/Parse/ParseObjc.cpp
@@ -1186,9 +1186,11 @@
// FIXME: Is BlockContext right?
Declarator DeclaratorInfo(DS, Declarator::BlockContext);
ParseDeclarator(DeclaratorInfo);
- DeclTy * aBlockVarDecl = Actions.ActOnDeclarator(CurScope,
- DeclaratorInfo, 0);
- StmtResult stmtResult = Actions.ActOnDeclStmt(aBlockVarDecl);
+ DeclTy *aBlockVarDecl = Actions.ActOnDeclarator(CurScope,
+ DeclaratorInfo, 0);
+ StmtResult stmtResult =
+ Actions.ActOnDeclStmt(aBlockVarDecl, DS.getSourceRange().getBegin(),
+ DeclaratorInfo.getSourceRange().getEnd());
FirstPart = stmtResult.isInvalid ? 0 : stmtResult.Val;
} else
ConsumeToken(); // consume '...'