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/ParseDecl.cpp b/Parse/ParseDecl.cpp
index 8b8d645..7d15e98 100644
--- a/Parse/ParseDecl.cpp
+++ b/Parse/ParseDecl.cpp
@@ -388,7 +388,7 @@
/// [C99] 'inline'
///
void Parser::ParseDeclarationSpecifiers(DeclSpec &DS) {
- DS.Range.setBegin(Tok.getLocation());
+ DS.SetRangeStart(Tok.getLocation());
while (1) {
int isInvalid = false;
const char *PrevSpec = 0;
@@ -409,7 +409,7 @@
if (isInvalid)
break;
// FIXME: restrict this to "id" and ObjC classnames.
- DS.Range.setEnd(Tok.getLocation());
+ DS.SetRangeEnd(Tok.getLocation());
ConsumeToken(); // The identifier
if (Tok.is(tok::less)) {
SourceLocation endProtoLoc;
@@ -555,7 +555,7 @@
else // extwarn.
Diag(Tok, diag::ext_duplicate_declspec, PrevSpec);
}
- DS.Range.setEnd(Tok.getLocation());
+ DS.SetRangeEnd(Tok.getLocation());
ConsumeToken();
}
}