From a02506a1da61dc0684a3b78ed16048d15ed10d71 Mon Sep 17 00:00:00 2001 From: Justin Bogner Date: Tue, 14 Oct 2014 23:36:06 +0000 Subject: [PATCH] Frontend: Remove some unused arguments in ASTUnit (NFC) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219747 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Frontend/ASTUnit.h | 1 - lib/Frontend/ASTUnit.cpp | 9 ++++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/include/clang/Frontend/ASTUnit.h b/include/clang/Frontend/ASTUnit.h index f2e2102cd0..1709089328 100644 --- a/include/clang/Frontend/ASTUnit.h +++ b/include/clang/Frontend/ASTUnit.h @@ -306,7 +306,6 @@ private: LangOptions ASTFileLangOpts; static void ConfigureDiags(IntrusiveRefCntPtr &Diags, - const char **ArgBegin, const char **ArgEnd, ASTUnit &AST, bool CaptureDiagnostics); void TranslateStoredDiagnostics(FileManager &FileMgr, diff --git a/lib/Frontend/ASTUnit.cpp b/lib/Frontend/ASTUnit.cpp index f7b9b71b46..8a77d87f64 100644 --- a/lib/Frontend/ASTUnit.cpp +++ b/lib/Frontend/ASTUnit.cpp @@ -643,7 +643,6 @@ ASTUnit::getBufferForFile(StringRef Filename, std::string *ErrorStr) { /// \brief Configure the diagnostics object for use with ASTUnit. void ASTUnit::ConfigureDiags(IntrusiveRefCntPtr &Diags, - const char **ArgBegin, const char **ArgEnd, ASTUnit &AST, bool CaptureDiagnostics) { if (!Diags.get()) { // No diagnostics engine was provided, so create our own diagnostics object @@ -673,7 +672,7 @@ std::unique_ptr ASTUnit::LoadFromASTFile( llvm::CrashRecoveryContextReleaseRefCleanup > DiagCleanup(Diags.get()); - ConfigureDiags(Diags, nullptr, nullptr, *AST, CaptureDiagnostics); + ConfigureDiags(Diags, *AST, CaptureDiagnostics); AST->OnlyLocalDecls = OnlyLocalDecls; AST->CaptureDiagnostics = CaptureDiagnostics; @@ -1702,7 +1701,7 @@ ASTUnit *ASTUnit::create(CompilerInvocation *CI, bool UserFilesAreVolatile) { std::unique_ptr AST; AST.reset(new ASTUnit(false)); - ConfigureDiags(Diags, nullptr, nullptr, *AST, CaptureDiagnostics); + ConfigureDiags(Diags, *AST, CaptureDiagnostics); AST->Diagnostics = Diags; AST->Invocation = CI; AST->FileSystemOpts = CI->getFileSystemOpts(); @@ -1890,7 +1889,7 @@ std::unique_ptr ASTUnit::LoadFromCompilerInvocation( bool IncludeBriefCommentsInCodeCompletion, bool UserFilesAreVolatile) { // Create the AST unit. std::unique_ptr AST(new ASTUnit(false)); - ConfigureDiags(Diags, nullptr, nullptr, *AST, CaptureDiagnostics); + ConfigureDiags(Diags, *AST, CaptureDiagnostics); AST->Diagnostics = Diags; AST->OnlyLocalDecls = OnlyLocalDecls; AST->CaptureDiagnostics = CaptureDiagnostics; @@ -1968,7 +1967,7 @@ ASTUnit *ASTUnit::LoadFromCommandLine( // Create the AST unit. std::unique_ptr AST; AST.reset(new ASTUnit(false)); - ConfigureDiags(Diags, ArgBegin, ArgEnd, *AST, CaptureDiagnostics); + ConfigureDiags(Diags, *AST, CaptureDiagnostics); AST->Diagnostics = Diags; AST->FileSystemOpts = CI->getFileSystemOpts(); IntrusiveRefCntPtr VFS = -- 2.40.0