[clang-tools-extra] [clang-tidy][NFC] Enable `performance-unnecessary-value-param` in the codebase (PR #163686)
Baranov Victor via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 22 03:10:09 PDT 2025
================
@@ -65,8 +65,7 @@ class ExpandModularHeadersPPCallbacks::FileRecorder {
};
ExpandModularHeadersPPCallbacks::ExpandModularHeadersPPCallbacks(
- CompilerInstance *CI,
- IntrusiveRefCntPtr<llvm::vfs::OverlayFileSystem> OverlayFS)
+ CompilerInstance *CI, llvm::vfs::OverlayFileSystem &OverlayFS)
----------------
vbvictor wrote:
How could we know that original object of `OverlayFileSystem &` will outlive this reference. From docs I assume that `IntrusiveRefCntPtr` has `shared_ptr` semantics but this convertion to reference seems bugprone.
https://github.com/llvm/llvm-project/pull/163686
More information about the cfe-commits
mailing list