| 251 | //----------------------------------------------------------------------------- |
| 252 | |
| 253 | CXXStaticCastExpr* StaticCast(QualType toType, const Expr* toExpr, bool makePointer) |
| 254 | { |
| 255 | auto& ctx = GetGlobalAST(); |
| 256 | |
| 257 | QualType sourceInfoToType = makePointer ? Ptr(toType) : toType; |
| 258 | toType = toType.getNonReferenceType(); |
| 259 | |
| 260 | return CXXStaticCastExpr::Create(ctx, |
| 261 | toType, |
| 262 | VK_LValue, |
| 263 | CK_DerivedToBase, |
| 264 | const_cast<Expr*>(toExpr), |
| 265 | nullptr, |
| 266 | ctx.getTrivialTypeSourceInfo(sourceInfoToType), |
| 267 | {}, |
| 268 | {}, |
| 269 | {}, |
| 270 | {}); |
| 271 | } |
| 272 | //----------------------------------------------------------------------------- |
| 273 | |
| 274 | auto* mkLabelDecl(std::string_view name) |
no test coverage detected