clang API Documentation

Classes | Typedefs | Functions
clang::arcmt::trans Namespace Reference

Classes

class  BodyContext
class  ObjCImplementationContext
class  ASTTraverser
class  MigrationContext
class  PropertyRewriteTraverser
class  BlockObjCVariableTraverser
class  ProtectedScopeTraverser
class  GCAttrsTraverser
class  GCCollectableCallsTraverser
class  BodyTransform

Typedefs

typedef llvm::DenseSet< Expr * > ExprSet

Functions

void rewriteAutoreleasePool (MigrationPass &pass)
void rewriteUnbridgedCasts (MigrationPass &pass)
void makeAssignARCSafe (MigrationPass &pass)
void removeRetainReleaseDeallocFinalize (MigrationPass &pass)
void removeZeroOutPropsInDeallocFinalize (MigrationPass &pass)
void rewriteUnusedInitDelegate (MigrationPass &pass)
void checkAPIUses (MigrationPass &pass)
void removeEmptyStatementsAndDeallocFinalize (MigrationPass &pass)
bool canApplyWeak (ASTContext &Ctx, QualType type, bool AllowOnUnknownClass=false)
 Determine whether we can add weak to the given type.
bool isPlusOneAssign (const BinaryOperator *E)
bool isPlusOne (const Expr *E)
SourceLocation findLocationAfterSemi (SourceLocation loc, ASTContext &Ctx, bool IsDecl=false)
 'Loc' is the end of a statement range. This returns the location immediately after the semicolon following the statement. If no semicolon is found or the location is inside a macro, the returned source location will be invalid.
SourceLocation findSemiAfterLocation (SourceLocation loc, ASTContext &Ctx, bool IsDecl=false)
 'Loc' is the end of a statement range. This returns the location of the semicolon following the statement. If no semicolon is found or the location is inside a macro, the returned source location will be invalid.
bool hasSideEffects (Expr *E, ASTContext &Ctx)
bool isGlobalVar (Expr *E)
StringRef getNilString (ASTContext &Ctx)
 Returns "nil" or "0" if 'nil' macro is not actually defined.
void clearRefsIn (Stmt *S, ExprSet &refs)
template<typename iterator >
void clearRefsIn (iterator begin, iterator end, ExprSet &refs)
void collectRefs (ValueDecl *D, Stmt *S, ExprSet &refs)
void collectRemovables (Stmt *S, ExprSet &exprs)

Typedef Documentation

typedef llvm::DenseSet<Expr *> clang::arcmt::trans::ExprSet

Definition at line 206 of file Transforms.h.


Function Documentation

bool clang::arcmt::trans::canApplyWeak ( ASTContext Ctx,
QualType  type,
bool  AllowOnUnknownClass = false 
)
void clang::arcmt::trans::clearRefsIn ( Stmt S,
ExprSet refs 
)

Definition at line 309 of file Transforms.cpp.

Referenced by clearRefsIn().

template<typename iterator >
void clang::arcmt::trans::clearRefsIn ( iterator  begin,
iterator  end,
ExprSet &  refs 
)

Definition at line 210 of file Transforms.h.

References clearRefsIn().

void clang::arcmt::trans::collectRefs ( ValueDecl D,
Stmt S,
ExprSet refs 
)

Definition at line 313 of file Transforms.cpp.

Definition at line 317 of file Transforms.cpp.

'Loc' is the end of a statement range. This returns the location immediately after the semicolon following the statement. If no semicolon is found or the location is inside a macro, the returned source location will be invalid.

Definition at line 124 of file Transforms.cpp.

References findSemiAfterLocation(), clang::SourceLocation::getLocWithOffset(), and clang::SourceLocation::isInvalid().

Referenced by rewriteToNSEnumDecl().

'Loc' is the end of a statement range. This returns the location of the semicolon following the statement. If no semicolon is found or the location is inside a macro, the returned source location will be invalid.

  • Loc is the end of a statement range. This returns the location of the semicolon following the statement. If no semicolon is found or the location is inside a macro, the returned source location will be invalid.

Definition at line 136 of file Transforms.cpp.

References clang::SourceManager::getBufferData(), clang::SourceManager::getDecomposedLoc(), clang::ASTContext::getLangOpts(), clang::Lexer::getLocForEndOfToken(), clang::SourceManager::getLocForStartOfFile(), clang::ASTContext::getSourceManager(), clang::Lexer::isAtEndOfMacroExpansion(), clang::SourceLocation::isMacroID(), and SM.

Referenced by findLocationAfterSemi(), isEmptyARCMTMacroStatement(), and rewriteToNSEnumDecl().

Returns "nil" or "0" if 'nil' macro is not actually defined.

Definition at line 215 of file Transforms.cpp.

References clang::IdentifierTable::get(), clang::IdentifierInfo::hasMacroDefinition(), and clang::ASTContext::Idents.

Definition at line 203 of file Transforms.cpp.

References clang::Expr::IgnoreParenCasts().