clang 8.0.0

Typedefs | Functions
TransGCAttrs.cpp File Reference
`#include "Transforms.h"`
`#include "Internals.h"`
`#include "clang/AST/ASTContext.h"`
`#include "clang/Basic/SourceManager.h"`
`#include "clang/Lex/Lexer.h"`
`#include "clang/Sema/SemaDiagnostic.h"`
`#include "llvm/ADT/SmallString.h"`
`#include "llvm/ADT/TinyPtrVector.h"`
`#include "llvm/Support/SaveAndRestore.h"`
Include dependency graph for TransGCAttrs.cpp:

Go to the source code of this file.

## Typedefs
typedef llvm::TinyPtrVector< ObjCPropertyDecl * > | IndivPropsTy

## Functions
static void | errorForGCAttrsOnNonObjC (MigrationContext &MigrateCtx)
static void | checkWeakGCAttrs (MigrationContext &MigrateCtx)
static void | checkAllAtProps (MigrationContext &MigrateCtx, SourceLocation AtLoc, IndivPropsTy &IndProps)
static void | checkAllProps (MigrationContext &MigrateCtx, std::vector< ObjCPropertyDecl *> &AllProps)

## Typedef Documentation

## ◆ IndivPropsTy

typedef llvm::TinyPtrVector<ObjCPropertyDecl *> IndivPropsTy

Definition at line 215 of file TransGCAttrs.cpp.

## Function Documentation

## ◆ checkAllAtProps()

static void checkAllAtProps | ( | MigrationContext & | MigrateCtx,
|  | SourceLocation | AtLoc,
|  | IndivPropsTy & | IndProps
| ) |  |
| static

Definition at line 217 of file TransGCAttrs.cpp.

References clang::arcmt::trans::MigrationContext::addPropertyAttribute(), clang::arcmt::trans::MigrationContext::AtPropsWeak, clang::arcmt::trans::canApplyWeak(), clang::arcmt::TransformActions::clearDiagnostic(), clang::arcmt::MigrationPass::Ctx, clang::TypeLoc::getAs(), clang::CharSourceRange::getBegin(), clang::SourceManager::getImmediateExpansionRange(), clang::QualType::getObjCLifetime(), clang::ObjCPropertyDecl::getPropertyAttributesAsWritten(), clang::SourceLocation::getRawEncoding(), clang::ASTContext::getSourceManager(), clang::TypeSourceInfo::getType(), clang::TypeSourceInfo::getTypeLoc(), clang::ObjCPropertyDecl::getTypeSourceInfo(), clang::SourceLocation::isMacroID(), clang::QualType::isNull(), clang::Type::isObjCRetainableType(), clang::ObjCPropertyDecl::OBJC_PR_assign, clang::ObjCPropertyDecl::OBJC_PR_noattr, clang::Qualifiers::OCL_Strong, clang::Qualifiers::OCL_Weak, clang::arcmt::trans::MigrationContext::Pass, clang::arcmt::TransformActions::remove(), clang::arcmt::trans::MigrationContext::RemovedAttrSet, clang::arcmt::trans::MigrationContext::rewritePropertyAttribute(), and clang::arcmt::MigrationPass::TA.

Referenced by checkAllProps().

## ◆ checkAllProps()

static void checkAllProps | ( | MigrationContext & | MigrateCtx,
|  | std::vector< ObjCPropertyDecl *> & | AllProps
| ) |  |
| static

Definition at line 295 of file TransGCAttrs.cpp.

References checkAllAtProps(), clang::ObjCPropertyDecl::getAtLoc(), clang::SourceLocation::getFromRawEncoding(), clang::ObjCPropertyDecl::getPropertyAttributesAsWritten(), clang::SourceLocation::getRawEncoding(), clang::SourceLocation::isInvalid(), clang::ObjCPropertyDecl::OBJC_PR_assign, and clang::ObjCPropertyDecl::OBJC_PR_readonly.

Referenced by clang::arcmt::trans::GCAttrsTraverser::traverseTU().

## ◆ checkWeakGCAttrs()

static void checkWeakGCAttrs | ( | MigrationContext & | MigrateCtx | ) |
| static

Definition at line 193 of file TransGCAttrs.cpp.

References clang::arcmt::trans::canApplyWeak(), clang::arcmt::TransformActions::clearDiagnostic(), clang::arcmt::MigrationPass::Ctx, clang::arcmt::trans::MigrationContext::GCAttrs, clang::SourceLocation::getRawEncoding(), clang::QualType::isNull(), clang::Type::isObjCRetainableType(), clang::arcmt::trans::MigrationContext::GCAttrOccurrence::Kind, clang::arcmt::trans::MigrationContext::GCAttrOccurrence::Loc, clang::arcmt::trans::MigrationContext::GCAttrOccurrence::ModifiedType, clang::arcmt::trans::MigrationContext::Pass, clang::arcmt::trans::MigrationContext::RemovedAttrSet, clang::arcmt::TransformActions::replaceText(), clang::arcmt::MigrationPass::TA, and clang::arcmt::trans::MigrationContext::GCAttrOccurrence::Weak.

Referenced by clang::arcmt::trans::GCAttrsTraverser::traverseTU().

## ◆ errorForGCAttrsOnNonObjC()

static void errorForGCAttrsOnNonObjC | ( | MigrationContext & | MigrateCtx | ) |
| static

Definition at line 177 of file TransGCAttrs.cpp.

References clang::arcmt::trans::MigrationContext::GCAttrOccurrence::Dcl, clang::arcmt::trans::MigrationContext::GCAttrOccurrence::FullyMigratable, clang::arcmt::trans::MigrationContext::GCAttrs, clang::QualType::isNull(), clang::Type::isObjCRetainableType(), clang::arcmt::trans::MigrationContext::GCAttrOccurrence::Loc, clang::arcmt::trans::MigrationContext::GCAttrOccurrence::ModifiedType, clang::arcmt::trans::MigrationContext::Pass, clang::arcmt::TransformActions::reportError(), and clang::arcmt::MigrationPass::TA.

Referenced by clang::arcmt::trans::GCAttrsTraverser::traverseTU().