MCPcopy Create free account
hub / github.com/andreasfertig/cppinsights / ReinterpretCast

Function ReinterpretCast

ASTHelpers.cpp:234–250  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

232//-----------------------------------------------------------------------------
233
234CXXReinterpretCastExpr* ReinterpretCast(QualType toType, const Expr* toExpr, bool makePointer)
235{
236 auto& ctx = GetGlobalAST();
237
238 QualType sourceInfoToType = makePointer ? Ptr(toType) : toType;
239
240 return CXXReinterpretCastExpr::Create(ctx,
241 toType,
242 VK_LValue,
243 CK_BitCast,
244 const_cast<Expr*>(toExpr),
245 nullptr,
246 ctx.getTrivialTypeSourceInfo(sourceInfoToType),
247 {},
248 {},
249 {});
250}
251//-----------------------------------------------------------------------------
252
253CXXStaticCastExpr* StaticCast(QualType toType, const Expr* toExpr, bool makePointer)

Callers 2

InsertCoroutineMethod · 0.85
InsertArgMethod · 0.85

Calls 1

PtrFunction · 0.85

Tested by

no test coverage detected