]> granicus.if.org Git - clang/commitdiff
Renamed OffsetOfNode::getRange to getSourceRange for uniformity.
authorAbramo Bagnara <abramo.bagnara@gmail.com>
Sat, 12 Mar 2011 09:45:03 +0000 (09:45 +0000)
committerAbramo Bagnara <abramo.bagnara@gmail.com>
Sat, 12 Mar 2011 09:45:03 +0000 (09:45 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127534 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/Expr.h
lib/Sema/TreeTransform.h
lib/Serialization/ASTWriterStmt.cpp
tools/libclang/CIndex.cpp

index 4a68e43e0632a5123e97525d136166035c0adfae..23e42768e8657acb937cd26af199881199ce3cd7 100644 (file)
@@ -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:
index d2688a1ba8dab21dac56f8ca41e0fed05a06ebc8..f6c83d8c6fb6c1f0ad66898d0463ed965b4ed2ed 100644 (file)
@@ -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());
index 81942b6483eab8019bbf193bb9ac0f4a89cb662d..a66b550385f077c1d956bd4a2ecf5337eccfd952 100644 (file)
@@ -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());
index 7853c3dda88d7c9455c562f068fbc6ae7c273adc..290146fa4dd1035cbabc6df716a657d4089c9ea7 100644 (file)
@@ -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: