diff options
Diffstat (limited to 'include/clang/AST/ExprObjC.h')
| -rw-r--r-- | include/clang/AST/ExprObjC.h | 90 |
1 files changed, 44 insertions, 46 deletions
diff --git a/include/clang/AST/ExprObjC.h b/include/clang/AST/ExprObjC.h index bb0402c27080..c7b305f3304e 100644 --- a/include/clang/AST/ExprObjC.h +++ b/include/clang/AST/ExprObjC.h @@ -67,8 +67,8 @@ public: SourceLocation getAtLoc() const { return AtLoc; } void setAtLoc(SourceLocation L) { AtLoc = L; } - SourceLocation getLocStart() const LLVM_READONLY { return AtLoc; } - SourceLocation getLocEnd() const LLVM_READONLY { return String->getLocEnd(); } + SourceLocation getBeginLoc() const LLVM_READONLY { return AtLoc; } + SourceLocation getEndLoc() const LLVM_READONLY { return String->getEndLoc(); } // Iterators child_range children() { return child_range(&String, &String+1); } @@ -94,8 +94,8 @@ public: bool getValue() const { return Value; } void setValue(bool V) { Value = V; } - SourceLocation getLocStart() const LLVM_READONLY { return Loc; } - SourceLocation getLocEnd() const LLVM_READONLY { return Loc; } + SourceLocation getBeginLoc() const LLVM_READONLY { return Loc; } + SourceLocation getEndLoc() const LLVM_READONLY { return Loc; } SourceLocation getLocation() const { return Loc; } void setLocation(SourceLocation L) { Loc = L; } @@ -141,8 +141,8 @@ public: SourceLocation getAtLoc() const { return Range.getBegin(); } - SourceLocation getLocStart() const LLVM_READONLY { return Range.getBegin(); } - SourceLocation getLocEnd() const LLVM_READONLY { return Range.getEnd(); } + SourceLocation getBeginLoc() const LLVM_READONLY { return Range.getBegin(); } + SourceLocation getEndLoc() const LLVM_READONLY { return Range.getEnd(); } SourceRange getSourceRange() const LLVM_READONLY { return Range; @@ -194,8 +194,8 @@ public: static ObjCArrayLiteral *CreateEmpty(const ASTContext &C, unsigned NumElements); - SourceLocation getLocStart() const LLVM_READONLY { return Range.getBegin(); } - SourceLocation getLocEnd() const LLVM_READONLY { return Range.getEnd(); } + SourceLocation getBeginLoc() const LLVM_READONLY { return Range.getBegin(); } + SourceLocation getEndLoc() const LLVM_READONLY { return Range.getEnd(); } SourceRange getSourceRange() const LLVM_READONLY { return Range; } /// Retrieve elements of array of literals. @@ -359,8 +359,8 @@ public: return DictWithObjectsMethod; } - SourceLocation getLocStart() const LLVM_READONLY { return Range.getBegin(); } - SourceLocation getLocEnd() const LLVM_READONLY { return Range.getEnd(); } + SourceLocation getBeginLoc() const LLVM_READONLY { return Range.getBegin(); } + SourceLocation getEndLoc() const LLVM_READONLY { return Range.getEnd(); } SourceRange getSourceRange() const LLVM_READONLY { return Range; } // Iterators @@ -412,8 +412,8 @@ public: EncodedType = EncType; } - SourceLocation getLocStart() const LLVM_READONLY { return AtLoc; } - SourceLocation getLocEnd() const LLVM_READONLY { return RParenLoc; } + SourceLocation getBeginLoc() const LLVM_READONLY { return AtLoc; } + SourceLocation getEndLoc() const LLVM_READONLY { return RParenLoc; } // Iterators child_range children() { @@ -447,8 +447,8 @@ public: void setAtLoc(SourceLocation L) { AtLoc = L; } void setRParenLoc(SourceLocation L) { RParenLoc = L; } - SourceLocation getLocStart() const LLVM_READONLY { return AtLoc; } - SourceLocation getLocEnd() const LLVM_READONLY { return RParenLoc; } + SourceLocation getBeginLoc() const LLVM_READONLY { return AtLoc; } + SourceLocation getEndLoc() const LLVM_READONLY { return RParenLoc; } /// getNumArgs - Return the number of actual arguments to this call. unsigned getNumArgs() const { return SelName.getNumArgs(); } @@ -496,8 +496,8 @@ public: void setAtLoc(SourceLocation L) { AtLoc = L; } void setRParenLoc(SourceLocation L) { RParenLoc = L; } - SourceLocation getLocStart() const LLVM_READONLY { return AtLoc; } - SourceLocation getLocEnd() const LLVM_READONLY { return RParenLoc; } + SourceLocation getBeginLoc() const LLVM_READONLY { return AtLoc; } + SourceLocation getEndLoc() const LLVM_READONLY { return RParenLoc; } // Iterators child_range children() { @@ -556,10 +556,10 @@ public: SourceLocation getLocation() const { return Loc; } void setLocation(SourceLocation L) { Loc = L; } - SourceLocation getLocStart() const LLVM_READONLY { - return isFreeIvar() ? Loc : getBase()->getLocStart(); + SourceLocation getBeginLoc() const LLVM_READONLY { + return isFreeIvar() ? Loc : getBase()->getBeginLoc(); } - SourceLocation getLocEnd() const LLVM_READONLY { return Loc; } + SourceLocation getEndLoc() const LLVM_READONLY { return Loc; } SourceLocation getOpLoc() const { return OpLoc; } void setOpLoc(SourceLocation L) { OpLoc = L; } @@ -742,11 +742,12 @@ public: /// Determine the type of the base, regardless of the kind of receiver. QualType getReceiverType(const ASTContext &ctx) const; - SourceLocation getLocStart() const LLVM_READONLY { - return isObjectReceiver() ? getBase()->getLocStart() :getReceiverLocation(); + SourceLocation getBeginLoc() const LLVM_READONLY { + return isObjectReceiver() ? getBase()->getBeginLoc() + : getReceiverLocation(); } - SourceLocation getLocEnd() const LLVM_READONLY { return IdLoc; } + SourceLocation getEndLoc() const LLVM_READONLY { return IdLoc; } // Iterators child_range children() { @@ -838,11 +839,11 @@ public: SourceLocation getRBracket() const { return RBracket; } void setRBracket(SourceLocation RB) { RBracket = RB; } - SourceLocation getLocStart() const LLVM_READONLY { - return SubExprs[BASE]->getLocStart(); + SourceLocation getBeginLoc() const LLVM_READONLY { + return SubExprs[BASE]->getBeginLoc(); } - SourceLocation getLocEnd() const LLVM_READONLY { return RBracket; } + SourceLocation getEndLoc() const LLVM_READONLY { return RBracket; } Expr *getBaseExpr() const { return cast<Expr>(SubExprs[BASE]); } void setBaseExpr(Stmt *S) { SubExprs[BASE] = S; } @@ -1364,7 +1365,7 @@ public: SourceLocation getSelectorStartLoc() const { if (isImplicit()) - return getLocStart(); + return getBeginLoc(); return getSelectorLoc(0); } @@ -1395,8 +1396,8 @@ public: RBracLoc = R.getEnd(); } - SourceLocation getLocStart() const LLVM_READONLY { return LBracLoc; } - SourceLocation getLocEnd() const LLVM_READONLY { return RBracLoc; } + SourceLocation getBeginLoc() const LLVM_READONLY { return LBracLoc; } + SourceLocation getEndLoc() const LLVM_READONLY { return RBracLoc; } // Iterators child_range children(); @@ -1472,15 +1473,15 @@ public: SourceLocation getOpLoc() const { return OpLoc; } void setOpLoc(SourceLocation L) { OpLoc = L; } - SourceLocation getLocStart() const LLVM_READONLY { - return getBase()->getLocStart(); + SourceLocation getBeginLoc() const LLVM_READONLY { + return getBase()->getBeginLoc(); } SourceLocation getBaseLocEnd() const LLVM_READONLY { - return getBase()->getLocEnd(); + return getBase()->getEndLoc(); } - SourceLocation getLocEnd() const LLVM_READONLY { return IsaMemberLoc; } + SourceLocation getEndLoc() const LLVM_READONLY { return IsaMemberLoc; } SourceLocation getExprLoc() const LLVM_READONLY { return IsaMemberLoc; } @@ -1549,10 +1550,12 @@ public: child_range children() { return child_range(&Operand, &Operand+1); } // Source locations are determined by the subexpression. - SourceLocation getLocStart() const LLVM_READONLY { - return Operand->getLocStart(); + SourceLocation getBeginLoc() const LLVM_READONLY { + return Operand->getBeginLoc(); + } + SourceLocation getEndLoc() const LLVM_READONLY { + return Operand->getEndLoc(); } - SourceLocation getLocEnd() const LLVM_READONLY { return Operand->getLocEnd();} SourceLocation getExprLoc() const LLVM_READONLY { return getSubExpr()->getExprLoc(); @@ -1571,8 +1574,7 @@ public: /// \endcode class ObjCBridgedCastExpr final : public ExplicitCastExpr, - private llvm::TrailingObjects< - ObjCBridgedCastExpr, CastExpr::BasePathSizeTy, CXXBaseSpecifier *> { + private llvm::TrailingObjects<ObjCBridgedCastExpr, CXXBaseSpecifier *> { friend class ASTStmtReader; friend class ASTStmtWriter; friend class CastExpr; @@ -1582,10 +1584,6 @@ class ObjCBridgedCastExpr final SourceLocation BridgeKeywordLoc; unsigned Kind : 2; - size_t numTrailingObjects(OverloadToken<CastExpr::BasePathSizeTy>) const { - return path_empty() ? 0 : 1; - } - public: ObjCBridgedCastExpr(SourceLocation LParenLoc, ObjCBridgeCastKind Kind, CastKind CK, SourceLocation BridgeKeywordLoc, @@ -1611,10 +1609,10 @@ public: /// The location of the bridge keyword. SourceLocation getBridgeKeywordLoc() const { return BridgeKeywordLoc; } - SourceLocation getLocStart() const LLVM_READONLY { return LParenLoc; } + SourceLocation getBeginLoc() const LLVM_READONLY { return LParenLoc; } - SourceLocation getLocEnd() const LLVM_READONLY { - return getSubExpr()->getLocEnd(); + SourceLocation getEndLoc() const LLVM_READONLY { + return getSubExpr()->getEndLoc(); } static bool classof(const Stmt *T) { @@ -1651,8 +1649,8 @@ public: explicit ObjCAvailabilityCheckExpr(EmptyShell Shell) : Expr(ObjCAvailabilityCheckExprClass, Shell) {} - SourceLocation getLocStart() const { return AtLoc; } - SourceLocation getLocEnd() const { return RParen; } + SourceLocation getBeginLoc() const { return AtLoc; } + SourceLocation getEndLoc() const { return RParen; } SourceRange getSourceRange() const { return {AtLoc, RParen}; } /// This may be '*', in which case this should fold to true. |
