clang 10.0.0git

Functions
ARCMT.cpp File Reference
`#include "Internals.h"`
`#include "clang/AST/ASTConsumer.h"`
`#include "clang/Basic/DiagnosticCategories.h"`
`#include "clang/Frontend/ASTUnit.h"`
`#include "clang/Frontend/CompilerInstance.h"`
`#include "clang/Frontend/FrontendAction.h"`
`#include "clang/Frontend/TextDiagnosticPrinter.h"`
`#include "clang/Frontend/Utils.h"`
`#include "clang/Lex/Preprocessor.h"`
`#include "clang/Lex/PreprocessorOptions.h"`
`#include "clang/Rewrite/Core/Rewriter.h"`
`#include "clang/Sema/SemaDiagnostic.h"`
`#include "clang/Serialization/ASTReader.h"`
`#include "llvm/ADT/Triple.h"`
`#include "llvm/Support/MemoryBuffer.h"`
`#include <utility>`
Include dependency graph for ARCMT.cpp:

Go to the source code of this file.

## Functions
static bool | HasARCRuntime (CompilerInvocation &origCI)
static CompilerInvocation * | createInvocationForMigration (CompilerInvocation &origCI, const PCHContainerReader &PCHContainerRdr)
static void | emitPremigrationErrors (const CapturedDiagList &arcDiags, DiagnosticOptions *diagOpts, Preprocessor &PP)
static bool | applyTransforms (CompilerInvocation &origCI, const FrontendInputFile &Input, std::shared_ptr< PCHContainerOperations > PCHContainerOps, DiagnosticConsumer *DiagClient, StringRef outputDir, bool emitPremigrationARCErrors, StringRef plistOut)

## Function Documentation

## ◆ applyTransforms()

static bool applyTransforms | ( | CompilerInvocation & | origCI,
|  | const FrontendInputFile & | Input,
|  | std::shared_ptr< PCHContainerOperations > | PCHContainerOps,
|  | DiagnosticConsumer * | DiagClient,
|  | StringRef | outputDir,
|  | bool | emitPremigrationARCErrors,
|  | StringRef | plistOut
| ) |  |
| static

Definition at line 338 of file ARCMT.cpp.

References clang::arcmt::MigrationProcess::applyTransform(), clang::arcmt::checkForManualIssues(), clang::arcmt::FileRemapper::flushToDisk(), clang::arcmt::getAllTransformations(), clang::CompilerInvocationBase::getDiagnosticOpts(), clang::CompilerInvocation::getFrontendOpts(), clang::CompilerInvocationBase::getLangOpts(), clang::CompilerInvocation::getMigratorOpts(), clang::arcmt::MigrationProcess::getRemapper(), clang::FrontendOptions::Inputs, clang::MigratorOptions::NoFinalizeRemoval, and clang::arcmt::FileRemapper::overwriteOriginal().

Referenced by clang::arcmt::applyTransformations(), and clang::arcmt::migrateWithTemporaryFiles().

## ◆ createInvocationForMigration()

static CompilerInvocation* createInvocationForMigration | ( | CompilerInvocation & | origCI,
|  | const PCHContainerReader & | PCHContainerRdr
| ) |  |
| static

Definition at line 173 of file ARCMT.cpp.

References clang::arcmt::getARCMTMacroName(), clang::CompilerInvocationBase::getDiagnosticOpts(), clang::CompilerInvocation::getFileSystemOpts(), clang::ASTReader::getOriginalSourceFile(), HasARCRuntime(), clang::PreprocessorOptions::ImplicitPCHInclude, clang::PreprocessorOptions::Includes, and clang::LangOptions::NonGC.

Referenced by clang::arcmt::MigrationProcess::applyTransform(), and clang::arcmt::checkForManualIssues().

## ◆ emitPremigrationErrors()

static void emitPremigrationErrors | ( | const CapturedDiagList & | arcDiags,
|  | DiagnosticOptions * | diagOpts,
|  | Preprocessor & | PP
| ) |  |
| static

Definition at line 217 of file ARCMT.cpp.

References clang::TextDiagnosticPrinter::BeginSourceFile(), clang::TextDiagnosticPrinter::EndSourceFile(), clang::Preprocessor::getLangOpts(), clang::Preprocessor::getSourceManager(), and clang::arcmt::CapturedDiagList::reportDiagnostics().

Referenced by clang::arcmt::checkForManualIssues().

## ◆ HasARCRuntime()

static bool HasARCRuntime | ( | CompilerInvocation & | origCI | ) |
| static

Definition at line 148 of file ARCMT.cpp.

References clang::CompilerInvocationBase::getTargetOpts(), and clang::TargetOptions::Triple.

Referenced by createInvocationForMigration().