Renamed OffsetOfNode::getRange to getSourceRange for uniformity.
llvm-svn: 127534
This commit is contained in:
parent
cd628393bb
commit
6b6f051e5e
|
@ -1457,7 +1457,7 @@ public:
|
|||
/// the square brackets. For a field or identifier node, the source range
|
||||
/// contains the location of the period (if there is one) and the
|
||||
/// identifier.
|
||||
SourceRange getRange() const { return Range; }
|
||||
SourceRange getSourceRange() const { return Range; }
|
||||
};
|
||||
|
||||
private:
|
||||
|
|
|
@ -5490,8 +5490,8 @@ TreeTransform<Derived>::TransformOffsetOfExpr(OffsetOfExpr *E) {
|
|||
const Node &ON = E->getComponent(I);
|
||||
Component Comp;
|
||||
Comp.isBrackets = true;
|
||||
Comp.LocStart = ON.getRange().getBegin();
|
||||
Comp.LocEnd = ON.getRange().getEnd();
|
||||
Comp.LocStart = ON.getSourceRange().getBegin();
|
||||
Comp.LocEnd = ON.getSourceRange().getEnd();
|
||||
switch (ON.getKind()) {
|
||||
case Node::Array: {
|
||||
Expr *FromIndex = E->getIndexExpr(ON.getArrayExprIndex());
|
||||
|
|
|
@ -479,8 +479,8 @@ void ASTStmtWriter::VisitOffsetOfExpr(OffsetOfExpr *E) {
|
|||
for (unsigned I = 0, N = E->getNumComponents(); I != N; ++I) {
|
||||
const OffsetOfExpr::OffsetOfNode &ON = E->getComponent(I);
|
||||
Record.push_back(ON.getKind()); // FIXME: Stable encoding
|
||||
Writer.AddSourceLocation(ON.getRange().getBegin(), Record);
|
||||
Writer.AddSourceLocation(ON.getRange().getEnd(), Record);
|
||||
Writer.AddSourceLocation(ON.getSourceRange().getBegin(), Record);
|
||||
Writer.AddSourceLocation(ON.getSourceRange().getEnd(), Record);
|
||||
switch (ON.getKind()) {
|
||||
case OffsetOfExpr::OffsetOfNode::Array:
|
||||
Record.push_back(ON.getArrayExprIndex());
|
||||
|
|
|
@ -2000,7 +2000,7 @@ void EnqueueVisitor::VisitOffsetOfExpr(OffsetOfExpr *E) {
|
|||
AddStmt(E->getIndexExpr(Node.getArrayExprIndex()));
|
||||
break;
|
||||
case OffsetOfNode::Field:
|
||||
AddMemberRef(Node.getField(), Node.getRange().getEnd());
|
||||
AddMemberRef(Node.getField(), Node.getSourceRange().getEnd());
|
||||
break;
|
||||
case OffsetOfNode::Identifier:
|
||||
case OffsetOfNode::Base:
|
||||
|
|
Loading…
Reference in New Issue