clang  6.0.0svn
Namespaces | Classes | Typedefs | Functions
clang::arcmt Namespace Reference

Namespaces

 trans
 

Classes

class  CapturedDiagList
 
class  CheckAction
 
class  FileRemapper
 
class  MigrateAction
 
class  MigrateSourceAction
 
class  MigrationPass
 
class  MigrationProcess
 
class  ModifyAction
 
class  ObjCMigrateAction
 Migrates to modern ObjC syntax. More...
 
class  Transaction
 
class  TransformActions
 

Typedefs

typedef void(* TransformFn) (MigrationPass &pass)
 

Functions

bool checkForManualIssues (CompilerInvocation &CI, const FrontendInputFile &Input, std::shared_ptr< PCHContainerOperations > PCHContainerOps, DiagnosticConsumer *DiagClient, bool emitPremigrationARCErrors=false, StringRef plistOut=StringRef())
 Creates an AST with the provided CompilerInvocation but with these changes: -if a PCH/PTH is set, the original header is used instead -Automatic Reference Counting mode is enabled. More...
 
bool applyTransformations (CompilerInvocation &origCI, const FrontendInputFile &Input, std::shared_ptr< PCHContainerOperations > PCHContainerOps, DiagnosticConsumer *DiagClient)
 Works similar to checkForManualIssues but instead of checking, it applies automatic modifications to source files to conform to ARC. More...
 
bool migrateWithTemporaryFiles (CompilerInvocation &origCI, const FrontendInputFile &Input, std::shared_ptr< PCHContainerOperations > PCHContainerOps, DiagnosticConsumer *DiagClient, StringRef outputDir, bool emitPremigrationARCErrors, StringRef plistOut)
 Applies automatic modifications and produces temporary files and metadata into the outputDir path. More...
 
bool getFileRemappings (std::vector< std::pair< std::string, std::string > > &remap, StringRef outputDir, DiagnosticConsumer *DiagClient)
 Get the set of file remappings from the outputDir path that migrateWithTemporaryFiles produced. More...
 
bool getFileRemappingsFromFileList (std::vector< std::pair< std::string, std::string > > &remap, ArrayRef< StringRef > remapFiles, DiagnosticConsumer *DiagClient)
 Get the set of file remappings from a list of files with remapping info. More...
 
std::vector< TransformFngetAllTransformations (LangOptions::GCMode OrigGCMode, bool NoFinalizeRemoval)
 
void writeARCDiagsToPlist (const std::string &outPath, ArrayRef< StoredDiagnostic > diags, SourceManager &SM, const LangOptions &LangOpts)
 
static StringRef getARCMTMacroName ()
 

Typedef Documentation

◆ TransformFn

typedef void(* clang::arcmt::TransformFn) (MigrationPass &pass)

Definition at line 92 of file ARCMT.h.

Function Documentation

◆ applyTransformations()

bool clang::arcmt::applyTransformations ( CompilerInvocation origCI,
const FrontendInputFile Input,
std::shared_ptr< PCHContainerOperations PCHContainerOps,
DiagnosticConsumer DiagClient 
)

Works similar to checkForManualIssues but instead of checking, it applies automatic modifications to source files to conform to ARC.

Returns
false if no error is produced, true otherwise.

Definition at line 386 of file ARCMT.cpp.

Referenced by clang::arcmt::ModifyAction::BeginInvocation().

◆ checkForManualIssues()

bool clang::arcmt::checkForManualIssues ( CompilerInvocation CI,
const FrontendInputFile Input,
std::shared_ptr< PCHContainerOperations PCHContainerOps,
DiagnosticConsumer DiagClient,
bool  emitPremigrationARCErrors = false,
StringRef  plistOut = StringRef() 
)

Creates an AST with the provided CompilerInvocation but with these changes: -if a PCH/PTH is set, the original header is used instead -Automatic Reference Counting mode is enabled.

It then checks the AST and produces errors/warning for ARC migration issues that the user needs to handle manually.

Parameters
emitPremigrationARCErrorsif true all ARC errors will get emitted even if the migrator can fix them, but the function will still return false if all ARC errors can be fixed.
plistOutif non-empty, it is the file path to store the plist with the pre-migration ARC diagnostics.
Returns
false if no error is produced, true otherwise.

Definition at line 239 of file ARCMT.cpp.

Referenced by clang::arcmt::CheckAction::BeginInvocation().

◆ getAllTransformations()

std::vector< TransformFn > clang::arcmt::getAllTransformations ( LangOptions::GCMode  OrigGCMode,
bool  NoFinalizeRemoval 
)

◆ getARCMTMacroName()

static StringRef clang::arcmt::getARCMTMacroName ( )
inlinestatic

Definition at line 173 of file Internals.h.

Referenced by createInvocationForMigration(), and getFileRemappings().

◆ getFileRemappings()

bool clang::arcmt::getFileRemappings ( std::vector< std::pair< std::string, std::string > > &  remap,
StringRef  outputDir,
DiagnosticConsumer DiagClient 
)

◆ getFileRemappingsFromFileList()

bool clang::arcmt::getFileRemappingsFromFileList ( std::vector< std::pair< std::string, std::string > > &  remap,
ArrayRef< StringRef >  remapFiles,
DiagnosticConsumer DiagClient 
)

Get the set of file remappings from a list of files with remapping info.

Returns
false if no error is produced, true otherwise.

Definition at line 2215 of file ObjCMT.cpp.

◆ migrateWithTemporaryFiles()

bool clang::arcmt::migrateWithTemporaryFiles ( CompilerInvocation origCI,
const FrontendInputFile Input,
std::shared_ptr< PCHContainerOperations PCHContainerOps,
DiagnosticConsumer DiagClient,
StringRef  outputDir,
bool  emitPremigrationARCErrors,
StringRef  plistOut 
)

Applies automatic modifications and produces temporary files and metadata into the outputDir path.

Parameters
emitPremigrationARCErrorsif true all ARC errors will get emitted even if the migrator can fix them, but the function will still return false if all ARC errors can be fixed.
plistOutif non-empty, it is the file path to store the plist with the pre-migration ARC diagnostics.
Returns
false if no error is produced, true otherwise.

Definition at line 394 of file ARCMT.cpp.

Referenced by clang::arcmt::MigrateAction::BeginInvocation().

◆ writeARCDiagsToPlist()

void clang::arcmt::writeARCDiagsToPlist ( const std::string &  outPath,
ArrayRef< StoredDiagnostic diags,
SourceManager SM,
const LangOptions LangOpts 
)

Definition at line 35 of file PlistReporter.cpp.

Referenced by clang::arcmt::CapturedDiagList::end().