| 232 | //----------------------------------------------------------------------------- |
| 233 | |
| 234 | CXXReinterpretCastExpr* 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 | |
| 253 | CXXStaticCastExpr* StaticCast(QualType toType, const Expr* toExpr, bool makePointer) |
no test coverage detected