Changeset View
Changeset View
Standalone View
Standalone View
cfe/trunk/lib/Sema/TreeTransform.h
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
Show First 20 Lines • Show All 2,646 Lines • ▼ Show 20 Lines | ExprResult RebuildCXXFunctionalCastExpr(TypeSourceInfo *TInfo, | ||||
Expr *Sub, | Expr *Sub, | ||||
SourceLocation RParenLoc, | SourceLocation RParenLoc, | ||||
bool ListInitialization) { | bool ListInitialization) { | ||||
return getSema().BuildCXXTypeConstructExpr(TInfo, LParenLoc, | return getSema().BuildCXXTypeConstructExpr(TInfo, LParenLoc, | ||||
MultiExprArg(&Sub, 1), RParenLoc, | MultiExprArg(&Sub, 1), RParenLoc, | ||||
ListInitialization); | ListInitialization); | ||||
} | } | ||||
/// Build a new C++ __builtin_bit_cast expression. | |||||
/// | |||||
/// By default, performs semantic analysis to build the new expression. | |||||
/// Subclasses may override this routine to provide different behavior. | |||||
ExprResult RebuildBuiltinBitCastExpr(SourceLocation KWLoc, | |||||
TypeSourceInfo *TSI, Expr *Sub, | |||||
SourceLocation RParenLoc) { | |||||
return getSema().BuildBuiltinBitCastExpr(KWLoc, TSI, Sub, RParenLoc); | |||||
} | |||||
/// Build a new C++ typeid(type) expression. | /// Build a new C++ typeid(type) expression. | ||||
/// | /// | ||||
/// By default, performs semantic analysis to build the new expression. | /// By default, performs semantic analysis to build the new expression. | ||||
/// Subclasses may override this routine to provide different behavior. | /// Subclasses may override this routine to provide different behavior. | ||||
ExprResult RebuildCXXTypeidExpr(QualType TypeInfoType, | ExprResult RebuildCXXTypeidExpr(QualType TypeInfoType, | ||||
SourceLocation TypeidLoc, | SourceLocation TypeidLoc, | ||||
TypeSourceInfo *Operand, | TypeSourceInfo *Operand, | ||||
SourceLocation RParenLoc) { | SourceLocation RParenLoc) { | ||||
▲ Show 20 Lines • Show All 7,579 Lines • ▼ Show 20 Lines | return getDerived().RebuildCXXNamedCastExpr( | ||||
E->getOperatorLoc(), E->getStmtClass(), E->getAngleBrackets().getBegin(), | E->getOperatorLoc(), E->getStmtClass(), E->getAngleBrackets().getBegin(), | ||||
Type, E->getAngleBrackets().getEnd(), | Type, E->getAngleBrackets().getEnd(), | ||||
// FIXME. this should be '(' location | // FIXME. this should be '(' location | ||||
E->getAngleBrackets().getEnd(), SubExpr.get(), E->getRParenLoc()); | E->getAngleBrackets().getEnd(), SubExpr.get(), E->getRParenLoc()); | ||||
} | } | ||||
template<typename Derived> | template<typename Derived> | ||||
ExprResult | ExprResult | ||||
TreeTransform<Derived>::TransformBuiltinBitCastExpr(BuiltinBitCastExpr *BCE) { | |||||
TypeSourceInfo *TSI = | |||||
getDerived().TransformType(BCE->getTypeInfoAsWritten()); | |||||
if (!TSI) | |||||
return ExprError(); | |||||
ExprResult Sub = getDerived().TransformExpr(BCE->getSubExpr()); | |||||
if (Sub.isInvalid()) | |||||
return ExprError(); | |||||
return getDerived().RebuildBuiltinBitCastExpr(BCE->getBeginLoc(), TSI, | |||||
Sub.get(), BCE->getEndLoc()); | |||||
} | |||||
template<typename Derived> | |||||
ExprResult | |||||
TreeTransform<Derived>::TransformCXXStaticCastExpr(CXXStaticCastExpr *E) { | TreeTransform<Derived>::TransformCXXStaticCastExpr(CXXStaticCastExpr *E) { | ||||
return getDerived().TransformCXXNamedCastExpr(E); | return getDerived().TransformCXXNamedCastExpr(E); | ||||
} | } | ||||
template<typename Derived> | template<typename Derived> | ||||
ExprResult | ExprResult | ||||
TreeTransform<Derived>::TransformCXXDynamicCastExpr(CXXDynamicCastExpr *E) { | TreeTransform<Derived>::TransformCXXDynamicCastExpr(CXXDynamicCastExpr *E) { | ||||
return getDerived().TransformCXXNamedCastExpr(E); | return getDerived().TransformCXXNamedCastExpr(E); | ||||
▲ Show 20 Lines • Show All 2,966 Lines • Show Last 20 Lines |