summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/FrontendAction.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2014-05-22 04:46:25 +0000
committerCraig Topper <craig.topper@gmail.com>2014-05-22 04:46:25 +0000
commit49a2790fb329c5cf27d9735b97ef70a6760921e4 (patch)
treea27dc484a06e2a4559f88a7939e40fd4ad01b80f /clang/lib/Frontend/FrontendAction.cpp
parentc3a73c30877fdc754e499a529fc97325dc28332a (diff)
downloadbcm5719-llvm-49a2790fb329c5cf27d9735b97ef70a6760921e4.tar.gz
bcm5719-llvm-49a2790fb329c5cf27d9735b97ef70a6760921e4.zip
[C++11] Use 'nullptr'. Frontend edition.
llvm-svn: 209389
Diffstat (limited to 'clang/lib/Frontend/FrontendAction.cpp')
-rw-r--r--clang/lib/Frontend/FrontendAction.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/clang/lib/Frontend/FrontendAction.cpp b/clang/lib/Frontend/FrontendAction.cpp
index ade23b87d17..b0857490743 100644
--- a/clang/lib/Frontend/FrontendAction.cpp
+++ b/clang/lib/Frontend/FrontendAction.cpp
@@ -123,7 +123,7 @@ public:
} // end anonymous namespace
-FrontendAction::FrontendAction() : Instance(0) {}
+FrontendAction::FrontendAction() : Instance(nullptr) {}
FrontendAction::~FrontendAction() {}
@@ -137,7 +137,7 @@ ASTConsumer* FrontendAction::CreateWrappedASTConsumer(CompilerInstance &CI,
StringRef InFile) {
ASTConsumer* Consumer = CreateASTConsumer(CI, InFile);
if (!Consumer)
- return 0;
+ return nullptr;
if (CI.getFrontendOpts().AddPluginActions.size() == 0)
return Consumer;
@@ -196,7 +196,7 @@ bool FrontendAction::BeginSourceFile(CompilerInstance &CI,
setCurrentInput(Input, AST);
// Inform the diagnostic client we are processing a source file.
- CI.getDiagnosticClient().BeginSourceFile(CI.getLangOpts(), 0);
+ CI.getDiagnosticClient().BeginSourceFile(CI.getLangOpts(), nullptr);
HasBegunSourceFile = true;
// Set the shared objects, these are reset when we finish processing the
@@ -239,7 +239,7 @@ bool FrontendAction::BeginSourceFile(CompilerInstance &CI,
"This action does not have IR file support!");
// Inform the diagnostic client we are processing a source file.
- CI.getDiagnosticClient().BeginSourceFile(CI.getLangOpts(), 0);
+ CI.getDiagnosticClient().BeginSourceFile(CI.getLangOpts(), nullptr);
HasBegunSourceFile = true;
// Initialize the action.
@@ -391,17 +391,17 @@ bool FrontendAction::BeginSourceFile(CompilerInstance &CI,
// matching EndSourceFile().
failure:
if (isCurrentFileAST()) {
- CI.setASTContext(0);
- CI.setPreprocessor(0);
- CI.setSourceManager(0);
- CI.setFileManager(0);
+ CI.setASTContext(nullptr);
+ CI.setPreprocessor(nullptr);
+ CI.setSourceManager(nullptr);
+ CI.setFileManager(nullptr);
}
if (HasBegunSourceFile)
CI.getDiagnosticClient().EndSourceFile();
CI.clearOutputFiles(/*EraseFiles=*/true);
setCurrentInput(FrontendInputFile());
- setCompilerInstance(0);
+ setCompilerInstance(nullptr);
return false;
}
@@ -447,10 +447,10 @@ void FrontendAction::EndSourceFile() {
BuryPointer(CI.takeASTConsumer());
} else {
if (!isCurrentFileAST()) {
- CI.setSema(0);
- CI.setASTContext(0);
+ CI.setSema(nullptr);
+ CI.setASTContext(nullptr);
}
- CI.setASTConsumer(0);
+ CI.setASTConsumer(nullptr);
}
// Inform the preprocessor we are done.
@@ -479,7 +479,7 @@ void FrontendAction::EndSourceFile() {
CI.resetAndLeakFileManager();
}
- setCompilerInstance(0);
+ setCompilerInstance(nullptr);
setCurrentInput(FrontendInputFile());
}
@@ -503,7 +503,7 @@ void ASTFrontendAction::ExecuteAction() {
CI.createCodeCompletionConsumer();
// Use a code completion consumer?
- CodeCompleteConsumer *CompletionConsumer = 0;
+ CodeCompleteConsumer *CompletionConsumer = nullptr;
if (CI.hasCodeCompletionConsumer())
CompletionConsumer = &CI.getCodeCompletionConsumer();
OpenPOWER on IntegriCloud