Lines Matching defs:RewriteObjC
1 //===--- RewriteObjC.cpp - Playground for the code rewriter ---------------===//
39 class RewriteObjC : public ASTConsumer {
151 RewriteObjC &R;
155 DisableReplaceStmtScope(RewriteObjC &R)
192 RewriteObjC(std::string inFile, std::unique_ptr<raw_ostream> OS,
196 ~RewriteObjC() override {}
506 class RewriteObjCFragileABI : public RewriteObjC {
511 : RewriteObjC(inFile, std::move(OS), D, LOpts, silenceMacroWarn) {}
543 void RewriteObjC::RewriteBlocksInFunctionProtoType(QualType funcType,
556 void RewriteObjC::CheckFunctionPointerDecl(QualType funcType, NamedDecl *ND) {
576 RewriteObjC::RewriteObjC(std::string inFile, std::unique_ptr<raw_ostream> OS,
599 void RewriteObjC::InitializeCommon(ASTContext &context) {
643 void RewriteObjC::HandleTopLevelSingleDecl(Decl *D) {
729 void RewriteObjC::RewriteInclude() {
765 void RewriteObjC::RewritePropertyImplDecl(ObjCPropertyImplDecl *PID,
903 void RewriteObjC::RewriteForwardClassEpilogue(ObjCInterfaceDecl *ClassDecl,
912 void RewriteObjC::RewriteForwardClassDecl(DeclGroupRef D) {
930 void RewriteObjC::RewriteForwardClassDecl(const SmallVectorImpl<Decl *> &D) {
944 void RewriteObjC::RewriteMethodDeclaration(ObjCMethodDecl *Method) {
961 void RewriteObjC::RewriteProperty(ObjCPropertyDecl *prop) {
968 void RewriteObjC::RewriteCategoryDecl(ObjCCategoryDecl *CatDecl) {
986 void RewriteObjC::RewriteProtocolDecl(ObjCProtocolDecl *PDecl) {
1021 void RewriteObjC::RewriteForwardProtocolDecl(DeclGroupRef D) {
1030 RewriteObjC::RewriteForwardProtocolDecl(const SmallVectorImpl<Decl *> &DG) {
1038 void RewriteObjC::RewriteTypeIntoString(QualType T, std::string &ResultStr,
1061 void RewriteObjC::RewriteObjCMethodDecl(const ObjCInterfaceDecl *IDecl,
1165 void RewriteObjC::RewriteImplementationDecl(Decl *OID) {
1203 void RewriteObjC::RewriteInterfaceDecl(ObjCInterfaceDecl *ClassDecl) {
1233 Stmt *RewriteObjC::RewritePropertyOrImplicitSetter(PseudoObjectExpr *PseudoOp) {
1316 Stmt *RewriteObjC::RewritePropertyOrImplicitGetter(PseudoObjectExpr *PseudoOp) {
1401 void RewriteObjC::SynthCountByEnumWithState(std::string &buf) {
1415 Stmt *RewriteObjC::RewriteBreakStmt(BreakStmt *S) {
1432 Stmt *RewriteObjC::RewriteContinueStmt(ContinueStmt *S) {
1478 Stmt *RewriteObjC::RewriteObjCForCollectionStmt(ObjCForCollectionStmt *S,
1648 Stmt *RewriteObjC::RewriteObjCSynchronizedStmt(ObjCAtSynchronizedStmt *S) {
1720 void RewriteObjC::WarnAboutReturnGotoStmts(Stmt *S)
1733 void RewriteObjC::HasReturnStmts(Stmt *S, bool &hasReturns)
1744 void RewriteObjC::RewriteTryReturnStmts(Stmt *S) {
1765 void RewriteObjC::RewriteSyncReturnStmts(Stmt *S, std::string syncExitBuf) {
1789 Stmt *RewriteObjC::RewriteObjCTryStmt(ObjCAtTryStmt *S) {
1957 Stmt *RewriteObjC::RewriteObjCThrowStmt(ObjCAtThrowStmt *S) {
1983 Stmt *RewriteObjC::RewriteAtEncode(ObjCEncodeExpr *Exp) {
1995 Stmt *RewriteObjC::RewriteAtSelector(ObjCSelectorExpr *Exp) {
2010 RewriteObjC::SynthesizeCallToFunctionDecl(FunctionDecl *FD,
2064 bool RewriteObjC::needToScanForQualifiers(QualType T) {
2082 void RewriteObjC::RewriteObjCQualifiedInterfaceTypes(Expr *E) {
2112 void RewriteObjC::RewriteObjCQualifiedInterfaceTypes(Decl *Dcl) {
2190 void RewriteObjC::RewriteTypeOfDecl(VarDecl *ND) {
2227 void RewriteObjC::SynthSelGetUidFunctionDecl() {
2240 void RewriteObjC::RewriteFunctionDecl(FunctionDecl *FD) {
2250 void RewriteObjC::RewriteBlockPointerType(std::string& Str, QualType Type) {
2264 void RewriteObjC::RewriteBlockPointerTypeVariable(std::string& Str,
2293 void RewriteObjC::RewriteBlockLiteralFunctionDecl(FunctionDecl *FD) {
2317 void RewriteObjC::SynthSuperConstructorFunctionDecl() {
2336 void RewriteObjC::SynthMsgSendFunctionDecl() {
2355 void RewriteObjC::SynthMsgSendSuperFunctionDecl() {
2377 void RewriteObjC::SynthMsgSendStretFunctionDecl() {
2397 void RewriteObjC::SynthMsgSendSuperStretFunctionDecl() {
2421 void RewriteObjC::SynthMsgSendFpretFunctionDecl() {
2440 void RewriteObjC::SynthGetClassFunctionDecl() {
2454 void RewriteObjC::SynthGetSuperClassFunctionDecl() {
2470 void RewriteObjC::SynthGetMetaClassFunctionDecl() {
2483 Stmt *RewriteObjC::RewriteObjCStringLiteral(ObjCStringLiteral *Exp) {
2530 QualType RewriteObjC::getSuperStructType() {
2558 QualType RewriteObjC::getConstantStringStructType() {
2591 CallExpr *RewriteObjC::SynthMsgSendStretCallExpr(FunctionDecl *MsgSendStretFlavor,
2623 Stmt *RewriteObjC::SynthMessageExpr(ObjCMessageExpr *Exp,
3007 Stmt *RewriteObjC::RewriteMessageExpr(ObjCMessageExpr *Exp) {
3019 QualType RewriteObjC::getProtocolType() {
3034 /// RewriteObjC::HandleTranslationUnit().
3035 Stmt *RewriteObjC::RewriteObjCProtocolExpr(ObjCProtocolExpr *Exp) {
3056 bool RewriteObjC::BufferContainsPPDirectives(const char *startBuf,
3084 void RewriteObjC::RewriteObjCInternalStruct(ObjCInterfaceDecl *CDecl,
3221 void RewriteObjC::RewriteImplementations() {
3233 void RewriteObjC::RewriteByRefString(std::string &ResultStr,
3250 std::string RewriteObjC::SynthesizeBlockFunc(BlockExpr *CE, int i,
3342 std::string RewriteObjC::SynthesizeBlockHelperFuncs(BlockExpr *CE, int i,
3386 std::string RewriteObjC::SynthesizeBlockImpl(BlockExpr *CE, std::string Tag,
3501 std::string RewriteObjC::SynthesizeBlockDescriptor(std::string DescTag,
3529 void RewriteObjC::SynthesizeBlockLiterals(SourceLocation FunLocStart,
3611 void RewriteObjC::InsertBlockLiteralsWithinFunction(FunctionDecl *FD) {
3629 void RewriteObjC::InsertBlockLiteralsWithinMethod(ObjCMethodDecl *MD) {
3638 void RewriteObjC::GetBlockDeclRefExprs(Stmt *S) {
3654 void RewriteObjC::GetInnerBlockDeclRefExprs(Stmt *S,
3685 QualType RewriteObjC::convertFunctionTypeOfBlocks(const FunctionType *FT) {
3711 Stmt *RewriteObjC::SynthesizeBlockCall(CallExpr *Exp, const Expr *BlockExp) {
3822 Stmt *RewriteObjC::RewriteBlockDeclRefExpr(DeclRefExpr *DeclRefExp) {
3859 Stmt *RewriteObjC::RewriteLocalVariableExternalStorage(DeclRefExpr *DRE) {
3874 void RewriteObjC::RewriteCastExpr(CStyleCastExpr *CE) {
3912 void RewriteObjC::RewriteBlockPointerFunctionArgs(FunctionDecl *FD) {
3946 bool RewriteObjC::PointerTypeTakesAnyBlockArguments(QualType QT) {
3964 bool RewriteObjC::PointerTypeTakesAnyObjCQualifiedType(QualType QT) {
3987 void RewriteObjC::GetExtentOfArgList(const char *Name, const char *&LParen,
4008 void RewriteObjC::RewriteBlockPointerDecl(NamedDecl *ND) {
4102 std::string RewriteObjC::SynthesizeByrefCopyDestroyHelper(VarDecl *VD,
4156 void RewriteObjC::RewriteByRefVar(VarDecl *ND) {
4303 void RewriteObjC::CollectBlockDeclRefInfo(BlockExpr *Exp) {
4324 FunctionDecl *RewriteObjC::SynthBlockInitFunctionDecl(StringRef name) {
4332 Stmt *RewriteObjC::SynthBlockInitExpr(BlockExpr *Exp,
4522 bool RewriteObjC::IsDeclStmtInForeachHeader(DeclStmt *DS) {
4533 Stmt *RewriteObjC::RewriteFunctionBodyOrGlobalInitializer(Stmt *S) {
4748 void RewriteObjC::RewriteRecordBody(RecordDecl *RD) {
4760 void RewriteObjC::HandleDeclInMainFile(Decl *D) {
4883 void RewriteObjC::HandleTranslationUnit(ASTContext &C) {