Lines Matching defs:Pass
61 MigrationPass &Pass;
69 UnbridgedCastRewriter(MigrationPass &pass)
70 : Pass(pass), ParentD(nullptr), Body(nullptr) {
71 SelfII = &Pass.Ctx.Idents.get("self");
84 UnbridgedCastRewriter(Pass).transformBody(D->getBody(), D);
105 if (castExpr->isNullPointerConstant(Pass.Ctx,
110 if (loc.isValid() && Pass.Ctx.getSourceManager().isInSystemHeader(loc))
201 Transaction Trans(Pass.TA);
207 TransformActions &TA = Pass.TA;
230 if (Kind == OBC_Bridge || !Pass.CFBridgingFunctionsDefined()) {
238 newCast += E->getType().getAsString(Pass.Ctx.getPrintingPolicy());
256 SourceManager &SM = Pass.Ctx.getSourceManager();
258 if (Lexer::isIdentifierBodyChar(PrevChar, Pass.Ctx.getLangOpts()))
277 Transaction Trans(Pass.TA);
278 Pass.TA.replace(callE->getSourceRange(), callE->getArg(0)->getSourceRange());
283 SourceManager &SM = Pass.Ctx.getSourceManager();
300 Transaction Trans(Pass.TA);
301 Pass.TA.replace(OuterRange, InnerRange);
302 Pass.TA.insert(InnerRange.getBegin(), "[");
303 Pass.TA.insertAfterToken(InnerRange.getEnd(), " copy]");
304 Pass.TA.clearDiagnostic(diag::err_arc_mismatched_cast,
313 Transaction Trans(Pass.TA);
314 Pass.TA.clearDiagnostic(diag::err_arc_mismatched_cast,
317 if (!hasSideEffects(E, Pass.Ctx)) {
321 Pass.TA.replace(OuterRange, InnerRange);
331 Pass.TA.removeStmt(E);
342 Pass.Ctx.getSourceManager(),
343 Pass.Ctx.getLangOpts());
367 err += E->getType().getAsString(Pass.Ctx.getPrintingPolicy());
372 Pass.TA.reportError(err, E->getLocStart(),
382 note += E->getSubExpr()->getType().getAsString(Pass.Ctx.getPrintingPolicy());
384 Pass.TA.reportNote(note, retS->getLocStart());
466 void trans::rewriteUnbridgedCasts(MigrationPass &pass) {
467 BodyTransform<UnbridgedCastRewriter> trans(pass);
468 trans.TraverseDecl(pass.Ctx.getTranslationUnitDecl());