28 using namespace clang;
29 using namespace arcmt;
30 using namespace trans;
42 : Body(nullptr), Pass(pass) { }
44 void transformBody(
Stmt *body,
Decl *ParentD) {
53 Pass.TA.hasDiagnostic(diag::err_arc_unused_init_message,
56 Pass.TA.clearDiagnostic(diag::err_arc_unused_init_message,
59 Pass.TA.insert(ExprRange.
getBegin(),
"if (!(self = ");
60 std::string retStr =
")) return ";
62 Pass.TA.insertAfterToken(ExprRange.
getEnd(), retStr);
68 bool isRemovable(
Expr *
E)
const {
69 return Removables.count(E);
Defines the clang::ASTContext interface.
SourceLocation getEnd() const
bool isDelegateInitCall() const
isDelegateInitCall - Answers whether this message send has been tagged as a "delegate init call"...
bool TraverseDecl(Decl *D)
Recursively visit a declaration, by dispatching to Traverse*Decl() based on the argument's dynamic ty...
void rewriteUnusedInitDelegate(MigrationPass &pass)
A class that does preordor or postorder depth-first traversal on the entire Clang AST and visits each...
StringRef getNilString(MigrationPass &Pass)
Returns "nil" or "0" if 'nil' macro is not actually defined.
void collectRemovables(Stmt *S, ExprSet &exprs)
Expr - This represents one expression.
TranslationUnitDecl * getTranslationUnitDecl() const
An expression that sends a message to the given Objective-C object or class.
SourceLocation getBegin() const
SourceLocation getExprLoc() const LLVM_READONLY
getExprLoc - Return the preferred location for the arrow when diagnosing a problem with a generic exp...
detail::InMemoryDirectory::const_iterator E
A trivial tuple used to represent a source range.