clang API Documentation
#include <Transforms.h>
Classes | |
struct | GCAttrOccurrence |
Public Types | |
typedef std::vector < ASTTraverser * >::iterator | traverser_iterator |
Public Member Functions | |
MigrationContext (MigrationPass &pass) | |
~MigrationContext () | |
traverser_iterator | traversers_begin () |
traverser_iterator | traversers_end () |
void | addTraverser (ASTTraverser *traverser) |
bool | isGCOwnedNonObjC (QualType T) |
bool | removePropertyAttribute (StringRef fromAttr, SourceLocation atLoc) |
bool | rewritePropertyAttribute (StringRef fromAttr, StringRef toAttr, SourceLocation atLoc) |
bool | addPropertyAttribute (StringRef attr, SourceLocation atLoc) |
void | traverse (TranslationUnitDecl *TU) |
void | dumpGCAttrs () |
Public Attributes | |
MigrationPass & | Pass |
std::vector< GCAttrOccurrence > | GCAttrs |
llvm::DenseSet< unsigned > | AttrSet |
llvm::DenseSet< unsigned > | RemovedAttrSet |
llvm::DenseSet< unsigned > | AtPropsWeak |
Set of raw '@' locations for 'assign' properties group that contain GC __weak. |
Definition at line 81 of file Transforms.h.
typedef std::vector<ASTTraverser *>::iterator clang::arcmt::trans::MigrationContext::traverser_iterator |
Definition at line 107 of file Transforms.h.
clang::arcmt::trans::MigrationContext::MigrationContext | ( | MigrationPass & | pass | ) | [inline, explicit] |
Definition at line 104 of file Transforms.h.
Definition at line 362 of file Transforms.cpp.
References traversers_begin(), and traversers_end().
bool MigrationContext::addPropertyAttribute | ( | StringRef | attr, |
SourceLocation | atLoc | ||
) |
Definition at line 470 of file Transforms.cpp.
References clang::arcmt::MigrationPass::Ctx, clang::SourceManager::getBufferData(), clang::SourceManager::getDecomposedLoc(), clang::ASTContext::getLangOpts(), clang::SourceManager::getLocForStartOfFile(), clang::ASTContext::getSourceManager(), clang::arcmt::TransformActions::insert(), clang::SourceLocation::isMacroID(), Pass, SM, and clang::arcmt::MigrationPass::TA.
Referenced by checkAllAtProps().
void clang::arcmt::trans::MigrationContext::addTraverser | ( | ASTTraverser * | traverser | ) | [inline] |
Definition at line 111 of file Transforms.h.
Referenced by traverseAST().
void MigrationContext::dumpGCAttrs | ( | ) |
Definition at line 337 of file TransGCAttrs.cpp.
References clang::arcmt::MigrationPass::Ctx, clang::arcmt::trans::MigrationContext::GCAttrOccurrence::Dcl, clang::SourceLocation::dump(), clang::QualType::dump(), clang::Decl::dump(), clang::arcmt::trans::MigrationContext::GCAttrOccurrence::FullyMigratable, GCAttrs, clang::ASTContext::getSourceManager(), clang::arcmt::trans::MigrationContext::GCAttrOccurrence::Kind, clang::arcmt::trans::MigrationContext::GCAttrOccurrence::Loc, clang::arcmt::trans::MigrationContext::GCAttrOccurrence::ModifiedType, Pass, and clang::arcmt::trans::MigrationContext::GCAttrOccurrence::Strong.
Definition at line 368 of file Transforms.cpp.
References clang::AttributedType::attr_objc_ownership, clang::arcmt::MigrationPass::Ctx, clang::Type::getAs(), clang::ASTContext::getBaseElementType(), clang::Type::getPointeeType(), clang::Type::isArrayType(), clang::QualType::isNull(), and Pass.
bool clang::arcmt::trans::MigrationContext::removePropertyAttribute | ( | StringRef | fromAttr, |
SourceLocation | atLoc | ||
) | [inline] |
Definition at line 116 of file Transforms.h.
References rewritePropertyAttribute().
bool MigrationContext::rewritePropertyAttribute | ( | StringRef | fromAttr, |
StringRef | toAttr, | ||
SourceLocation | atLoc | ||
) |
Definition at line 388 of file Transforms.cpp.
References clang::arcmt::MigrationPass::Ctx, clang::SourceManager::getBufferData(), clang::SourceManager::getDecomposedLoc(), clang::ASTContext::getLangOpts(), clang::Token::getLocation(), clang::SourceManager::getLocForStartOfFile(), clang::ASTContext::getSourceManager(), clang::Token::is(), clang::SourceLocation::isInvalid(), clang::SourceLocation::isMacroID(), clang::Token::isNot(), clang::SourceLocation::isValid(), Pass, clang::arcmt::TransformActions::remove(), clang::arcmt::TransformActions::replaceText(), SM, clang::Token::startToken(), and clang::arcmt::MigrationPass::TA.
Referenced by checkAllAtProps(), and removePropertyAttribute().
void MigrationContext::traverse | ( | TranslationUnitDecl * | TU | ) |
Definition at line 518 of file Transforms.cpp.
References traversers_begin(), and traversers_end().
Referenced by traverseAST().
Definition at line 108 of file Transforms.h.
Referenced by traverse(), and ~MigrationContext().
Definition at line 109 of file Transforms.h.
Referenced by traverse(), and ~MigrationContext().
llvm::DenseSet<unsigned> clang::arcmt::trans::MigrationContext::AtPropsWeak |
Set of raw '@' locations for 'assign' properties group that contain GC __weak.
Definition at line 102 of file Transforms.h.
Referenced by checkAllAtProps().
llvm::DenseSet<unsigned> clang::arcmt::trans::MigrationContext::AttrSet |
Definition at line 97 of file Transforms.h.
Definition at line 96 of file Transforms.h.
Referenced by checkWeakGCAttrs(), dumpGCAttrs(), and errorForGCAttrsOnNonObjC().
Definition at line 85 of file Transforms.h.
Referenced by addPropertyAttribute(), checkAllAtProps(), checkWeakGCAttrs(), dumpGCAttrs(), errorForGCAttrsOnNonObjC(), isGCOwnedNonObjC(), rewritePropertyAttribute(), clang::arcmt::trans::BlockObjCVariableTraverser::traverseBody(), and clang::arcmt::trans::GCAttrsTraverser::traverseTU().
llvm::DenseSet<unsigned> clang::arcmt::trans::MigrationContext::RemovedAttrSet |
Definition at line 98 of file Transforms.h.
Referenced by checkAllAtProps(), and checkWeakGCAttrs().