[clang] [clang] Do not share ownership of `HeaderSearchOptions` (PR #132984)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 25 13:03:08 PDT 2025
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 7a370748c0928b9ccfe26127e54eb3c1a1827d75 b325e5553bafa3b83e3383cd38487f42eecce91b --extensions h,cpp -- clang/include/clang/Frontend/ASTUnit.h clang/include/clang/Frontend/CompilerInstance.h clang/include/clang/Frontend/CompilerInvocation.h clang/lib/CrossTU/CrossTranslationUnit.cpp clang/lib/Frontend/ASTMerge.cpp clang/lib/Frontend/ASTUnit.cpp clang/lib/Frontend/FrontendAction.cpp clang/tools/c-index-test/core_main.cpp clang/tools/clang-extdef-mapping/ClangExtDefMapGen.cpp clang/tools/libclang/CIndex.cpp clang/unittests/Frontend/ASTUnitTest.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/Frontend/ASTUnit.cpp b/clang/lib/Frontend/ASTUnit.cpp
index 4f78569c7c..a15819ca5e 100644
--- a/clang/lib/Frontend/ASTUnit.cpp
+++ b/clang/lib/Frontend/ASTUnit.cpp
@@ -804,8 +804,7 @@ void ASTUnit::ConfigureDiags(IntrusiveRefCntPtr<DiagnosticsEngine> Diags,
std::unique_ptr<ASTUnit> ASTUnit::LoadFromASTFile(
StringRef Filename, const PCHContainerReader &PCHContainerRdr,
WhatToLoad ToLoad, IntrusiveRefCntPtr<DiagnosticsEngine> Diags,
- const FileSystemOptions &FileSystemOpts,
- const HeaderSearchOptions &HSOpts,
+ const FileSystemOptions &FileSystemOpts, const HeaderSearchOptions &HSOpts,
std::shared_ptr<LangOptions> LangOpts, bool OnlyLocalDecls,
CaptureDiagsKind CaptureDiagnostics, bool AllowASTWithCompilerErrors,
bool UserFilesAreVolatile, IntrusiveRefCntPtr<llvm::vfs::FileSystem> VFS) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/132984
More information about the cfe-commits
mailing list