[clang] [clang] Remove unused argument. NFC. (PR #73594)
https://github.com/ributzka closed https://github.com/llvm/llvm-project/pull/73594 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [clang] Remove unused argument. NFC. (PR #73594)
https://github.com/adrian-prantl approved this pull request. I can't even remember what this was supposed to do. https://github.com/llvm/llvm-project/pull/73594 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [clang] Remove unused argument. NFC. (PR #73594)
llvmbot wrote: @llvm/pr-subscribers-clang Author: Juergen Ributzka (ributzka) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/73594.diff 7 Files Affected: - (modified) clang/include/clang/Frontend/ASTUnit.h (+10-12) - (modified) clang/lib/Frontend/ASTMerge.cpp (+1-1) - (modified) clang/lib/Frontend/ASTUnit.cpp (+3-4) - (modified) clang/lib/Frontend/FrontendAction.cpp (+2-3) - (modified) clang/tools/c-index-test/core_main.cpp (+1-1) - (modified) clang/tools/libclang/CIndex.cpp (+2-2) - (modified) clang/unittests/Frontend/ASTUnitTest.cpp (+1-2) ``diff diff --git a/clang/include/clang/Frontend/ASTUnit.h b/clang/include/clang/Frontend/ASTUnit.h index bcb28634a2b8841..fe99b3d5adbfa0a 100644 --- a/clang/include/clang/Frontend/ASTUnit.h +++ b/clang/include/clang/Frontend/ASTUnit.h @@ -691,18 +691,16 @@ class ASTUnit { /// lifetime is expected to extend past that of the returned ASTUnit. /// /// \returns - The initialized ASTUnit or null if the AST failed to load. - static std::unique_ptr - LoadFromASTFile(const std::string , - const PCHContainerReader , WhatToLoad ToLoad, - IntrusiveRefCntPtr Diags, - const FileSystemOptions , - std::shared_ptr HSOpts, - bool UseDebugInfo = false, bool OnlyLocalDecls = false, - CaptureDiagsKind CaptureDiagnostics = CaptureDiagsKind::None, - bool AllowASTWithCompilerErrors = false, - bool UserFilesAreVolatile = false, - IntrusiveRefCntPtr VFS = - llvm::vfs::getRealFileSystem()); + static std::unique_ptr LoadFromASTFile( + const std::string , const PCHContainerReader , + WhatToLoad ToLoad, IntrusiveRefCntPtr Diags, + const FileSystemOptions , + std::shared_ptr HSOpts, bool OnlyLocalDecls = false, + CaptureDiagsKind CaptureDiagnostics = CaptureDiagsKind::None, + bool AllowASTWithCompilerErrors = false, + bool UserFilesAreVolatile = false, + IntrusiveRefCntPtr VFS = + llvm::vfs::getRealFileSystem()); private: /// Helper function for \c LoadFromCompilerInvocation() and diff --git a/clang/lib/Frontend/ASTMerge.cpp b/clang/lib/Frontend/ASTMerge.cpp index 057ea4fd5bb3518..1e3a5c04c4e9b4f 100644 --- a/clang/lib/Frontend/ASTMerge.cpp +++ b/clang/lib/Frontend/ASTMerge.cpp @@ -48,7 +48,7 @@ void ASTMergeAction::ExecuteAction() { /*ShouldOwnClient=*/true)); std::unique_ptr Unit = ASTUnit::LoadFromASTFile( ASTFiles[I], CI.getPCHContainerReader(), ASTUnit::LoadEverything, Diags, -CI.getFileSystemOpts(), CI.getHeaderSearchOptsPtr(), false); +CI.getFileSystemOpts(), CI.getHeaderSearchOptsPtr()); if (!Unit) continue; diff --git a/clang/lib/Frontend/ASTUnit.cpp b/clang/lib/Frontend/ASTUnit.cpp index c4badcd00c477e0..f09a01b5dd4aff4 100644 --- a/clang/lib/Frontend/ASTUnit.cpp +++ b/clang/lib/Frontend/ASTUnit.cpp @@ -790,10 +790,9 @@ std::unique_ptr ASTUnit::LoadFromASTFile( const std::string , const PCHContainerReader , WhatToLoad ToLoad, IntrusiveRefCntPtr Diags, const FileSystemOptions , -std::shared_ptr HSOpts, bool UseDebugInfo, -bool OnlyLocalDecls, CaptureDiagsKind CaptureDiagnostics, -bool AllowASTWithCompilerErrors, bool UserFilesAreVolatile, -IntrusiveRefCntPtr VFS) { +std::shared_ptr HSOpts, bool OnlyLocalDecls, +CaptureDiagsKind CaptureDiagnostics, bool AllowASTWithCompilerErrors, +bool UserFilesAreVolatile, IntrusiveRefCntPtr VFS) { std::unique_ptr AST(new ASTUnit(true)); // Recover resources if we crash before exiting this method. diff --git a/clang/lib/Frontend/FrontendAction.cpp b/clang/lib/Frontend/FrontendAction.cpp index eb8a96627bb7076..eff785b99a09a4f 100644 --- a/clang/lib/Frontend/FrontendAction.cpp +++ b/clang/lib/Frontend/FrontendAction.cpp @@ -621,7 +621,7 @@ bool FrontendAction::BeginSourceFile(CompilerInstance , std::unique_ptr AST = ASTUnit::LoadFromASTFile( std::string(InputFile), CI.getPCHContainerReader(), ASTUnit::LoadPreprocessorOnly, ASTDiags, CI.getFileSystemOpts(), -/*HeaderSearchOptions=*/nullptr, CI.getCodeGenOpts().DebugTypeExtRefs); +/*HeaderSearchOptions=*/nullptr); if (!AST) return false; @@ -689,8 +689,7 @@ bool FrontendAction::BeginSourceFile(CompilerInstance , std::unique_ptr AST = ASTUnit::LoadFromASTFile( std::string(InputFile), CI.getPCHContainerReader(), ASTUnit::LoadEverything, Diags, CI.getFileSystemOpts(), -CI.getHeaderSearchOptsPtr(), -CI.getCodeGenOpts().DebugTypeExtRefs); +CI.getHeaderSearchOptsPtr()); if (!AST) return false; diff --git a/clang/tools/c-index-test/core_main.cpp b/clang/tools/c-index-test/core_main.cpp index 6e9bbd044fd9371..56bf7c91acc7b71 100644 --- a/clang/tools/c-index-test/core_main.cpp +++
[clang] [clang] Remove unused argument. NFC. (PR #73594)
https://github.com/ributzka created https://github.com/llvm/llvm-project/pull/73594 None >From f3152a8be8e555051fa28dcbe49dd773f84d53b7 Mon Sep 17 00:00:00 2001 From: Juergen Ributzka Date: Mon, 27 Nov 2023 15:31:09 -0800 Subject: [PATCH] [clang] Remove unused argument. NFC. --- clang/include/clang/Frontend/ASTUnit.h | 22 ++ clang/lib/Frontend/ASTMerge.cpp | 2 +- clang/lib/Frontend/ASTUnit.cpp | 7 +++ clang/lib/Frontend/FrontendAction.cpp| 5 ++--- clang/tools/c-index-test/core_main.cpp | 2 +- clang/tools/libclang/CIndex.cpp | 4 ++-- clang/unittests/Frontend/ASTUnitTest.cpp | 3 +-- 7 files changed, 20 insertions(+), 25 deletions(-) diff --git a/clang/include/clang/Frontend/ASTUnit.h b/clang/include/clang/Frontend/ASTUnit.h index bcb28634a2b8841..fe99b3d5adbfa0a 100644 --- a/clang/include/clang/Frontend/ASTUnit.h +++ b/clang/include/clang/Frontend/ASTUnit.h @@ -691,18 +691,16 @@ class ASTUnit { /// lifetime is expected to extend past that of the returned ASTUnit. /// /// \returns - The initialized ASTUnit or null if the AST failed to load. - static std::unique_ptr - LoadFromASTFile(const std::string , - const PCHContainerReader , WhatToLoad ToLoad, - IntrusiveRefCntPtr Diags, - const FileSystemOptions , - std::shared_ptr HSOpts, - bool UseDebugInfo = false, bool OnlyLocalDecls = false, - CaptureDiagsKind CaptureDiagnostics = CaptureDiagsKind::None, - bool AllowASTWithCompilerErrors = false, - bool UserFilesAreVolatile = false, - IntrusiveRefCntPtr VFS = - llvm::vfs::getRealFileSystem()); + static std::unique_ptr LoadFromASTFile( + const std::string , const PCHContainerReader , + WhatToLoad ToLoad, IntrusiveRefCntPtr Diags, + const FileSystemOptions , + std::shared_ptr HSOpts, bool OnlyLocalDecls = false, + CaptureDiagsKind CaptureDiagnostics = CaptureDiagsKind::None, + bool AllowASTWithCompilerErrors = false, + bool UserFilesAreVolatile = false, + IntrusiveRefCntPtr VFS = + llvm::vfs::getRealFileSystem()); private: /// Helper function for \c LoadFromCompilerInvocation() and diff --git a/clang/lib/Frontend/ASTMerge.cpp b/clang/lib/Frontend/ASTMerge.cpp index 057ea4fd5bb3518..1e3a5c04c4e9b4f 100644 --- a/clang/lib/Frontend/ASTMerge.cpp +++ b/clang/lib/Frontend/ASTMerge.cpp @@ -48,7 +48,7 @@ void ASTMergeAction::ExecuteAction() { /*ShouldOwnClient=*/true)); std::unique_ptr Unit = ASTUnit::LoadFromASTFile( ASTFiles[I], CI.getPCHContainerReader(), ASTUnit::LoadEverything, Diags, -CI.getFileSystemOpts(), CI.getHeaderSearchOptsPtr(), false); +CI.getFileSystemOpts(), CI.getHeaderSearchOptsPtr()); if (!Unit) continue; diff --git a/clang/lib/Frontend/ASTUnit.cpp b/clang/lib/Frontend/ASTUnit.cpp index c4badcd00c477e0..f09a01b5dd4aff4 100644 --- a/clang/lib/Frontend/ASTUnit.cpp +++ b/clang/lib/Frontend/ASTUnit.cpp @@ -790,10 +790,9 @@ std::unique_ptr ASTUnit::LoadFromASTFile( const std::string , const PCHContainerReader , WhatToLoad ToLoad, IntrusiveRefCntPtr Diags, const FileSystemOptions , -std::shared_ptr HSOpts, bool UseDebugInfo, -bool OnlyLocalDecls, CaptureDiagsKind CaptureDiagnostics, -bool AllowASTWithCompilerErrors, bool UserFilesAreVolatile, -IntrusiveRefCntPtr VFS) { +std::shared_ptr HSOpts, bool OnlyLocalDecls, +CaptureDiagsKind CaptureDiagnostics, bool AllowASTWithCompilerErrors, +bool UserFilesAreVolatile, IntrusiveRefCntPtr VFS) { std::unique_ptr AST(new ASTUnit(true)); // Recover resources if we crash before exiting this method. diff --git a/clang/lib/Frontend/FrontendAction.cpp b/clang/lib/Frontend/FrontendAction.cpp index eb8a96627bb7076..eff785b99a09a4f 100644 --- a/clang/lib/Frontend/FrontendAction.cpp +++ b/clang/lib/Frontend/FrontendAction.cpp @@ -621,7 +621,7 @@ bool FrontendAction::BeginSourceFile(CompilerInstance , std::unique_ptr AST = ASTUnit::LoadFromASTFile( std::string(InputFile), CI.getPCHContainerReader(), ASTUnit::LoadPreprocessorOnly, ASTDiags, CI.getFileSystemOpts(), -/*HeaderSearchOptions=*/nullptr, CI.getCodeGenOpts().DebugTypeExtRefs); +/*HeaderSearchOptions=*/nullptr); if (!AST) return false; @@ -689,8 +689,7 @@ bool FrontendAction::BeginSourceFile(CompilerInstance , std::unique_ptr AST = ASTUnit::LoadFromASTFile( std::string(InputFile), CI.getPCHContainerReader(), ASTUnit::LoadEverything, Diags, CI.getFileSystemOpts(), -CI.getHeaderSearchOptsPtr(), -CI.getCodeGenOpts().DebugTypeExtRefs); +CI.getHeaderSearchOptsPtr()); if (!AST) return false; diff --git a/clang/tools/c-index-test/core_main.cpp