From: Abramo Bagnara Date: Sat, 12 Mar 2011 09:45:03 +0000 (+0000) Subject: Renamed OffsetOfNode::getRange to getSourceRange for uniformity. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=06dec892b5300b43263d25c5476b506c9d6cfbad;p=clang Renamed OffsetOfNode::getRange to getSourceRange for uniformity. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127534 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/AST/Expr.h b/include/clang/AST/Expr.h index 4a68e43e06..23e42768e8 100644 --- a/include/clang/AST/Expr.h +++ b/include/clang/AST/Expr.h @@ -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: diff --git a/lib/Sema/TreeTransform.h b/lib/Sema/TreeTransform.h index d2688a1ba8..f6c83d8c6f 100644 --- a/lib/Sema/TreeTransform.h +++ b/lib/Sema/TreeTransform.h @@ -5490,8 +5490,8 @@ TreeTransform::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()); diff --git a/lib/Serialization/ASTWriterStmt.cpp b/lib/Serialization/ASTWriterStmt.cpp index 81942b6483..a66b550385 100644 --- a/lib/Serialization/ASTWriterStmt.cpp +++ b/lib/Serialization/ASTWriterStmt.cpp @@ -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()); diff --git a/tools/libclang/CIndex.cpp b/tools/libclang/CIndex.cpp index 7853c3dda8..290146fa4d 100644 --- a/tools/libclang/CIndex.cpp +++ b/tools/libclang/CIndex.cpp @@ -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: