Changeset View
Changeset View
Standalone View
Standalone View
cfe/trunk/include/clang/AST/ExprCXX.h
Show First 20 Lines • Show All 4,710 Lines • ▼ Show 20 Lines | Expr *getOperand() const { | ||||
return getCommonExpr(); | return getCommonExpr(); | ||||
} | } | ||||
static bool classof(const Stmt *T) { | static bool classof(const Stmt *T) { | ||||
return T->getStmtClass() == CoyieldExprClass; | return T->getStmtClass() == CoyieldExprClass; | ||||
} | } | ||||
}; | }; | ||||
/// Represents a C++2a __builtin_bit_cast(T, v) expression. Used to implement | |||||
/// std::bit_cast. These can sometimes be evaluated as part of a constant | |||||
/// expression, but otherwise CodeGen to a simple memcpy in general. | |||||
class BuiltinBitCastExpr final | |||||
: public ExplicitCastExpr, | |||||
private llvm::TrailingObjects<BuiltinBitCastExpr, CXXBaseSpecifier *> { | |||||
friend class ASTStmtReader; | |||||
friend class CastExpr; | |||||
friend class TrailingObjects; | |||||
SourceLocation KWLoc; | |||||
SourceLocation RParenLoc; | |||||
public: | |||||
BuiltinBitCastExpr(QualType T, ExprValueKind VK, CastKind CK, Expr *SrcExpr, | |||||
TypeSourceInfo *DstType, SourceLocation KWLoc, | |||||
SourceLocation RParenLoc) | |||||
: ExplicitCastExpr(BuiltinBitCastExprClass, T, VK, CK, SrcExpr, 0, | |||||
DstType), | |||||
KWLoc(KWLoc), RParenLoc(RParenLoc) {} | |||||
SourceLocation getBeginLoc() const LLVM_READONLY { return KWLoc; } | |||||
SourceLocation getEndLoc() const LLVM_READONLY { return RParenLoc; } | |||||
static bool classof(const Stmt *T) { | |||||
return T->getStmtClass() == BuiltinBitCastExprClass; | |||||
} | |||||
}; | |||||
} // namespace clang | } // namespace clang | ||||
#endif // LLVM_CLANG_AST_EXPRCXX_H | #endif // LLVM_CLANG_AST_EXPRCXX_H |