[clang] [NFC][CLANG] Fix static analyzer bugs about unnecessary object copies… (PR #75082)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 11 10:37:47 PST 2023
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
Author: None (smanna12)
<details>
<summary>Changes</summary>
… with auto
---
Full diff: https://github.com/llvm/llvm-project/pull/75082.diff
1 Files Affected:
- (modified) clang/lib/CodeGen/BackendUtil.cpp (+1-1)
``````````diff
diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp
index 77455c075cab0..1d77fbe016307 100644
--- a/clang/lib/CodeGen/BackendUtil.cpp
+++ b/clang/lib/CodeGen/BackendUtil.cpp
@@ -876,7 +876,7 @@ void EmitAssemblyHelper::RunOptimizationPipeline(
<< PluginFN << toString(PassPlugin.takeError());
}
}
- for (auto PassCallback : CodeGenOpts.PassBuilderCallbacks)
+ for (const auto &PassCallback : CodeGenOpts.PassBuilderCallbacks)
PassCallback(PB);
#define HANDLE_EXTENSION(Ext) \
get##Ext##PluginInfo().RegisterPassBuilderCallbacks(PB);
``````````
</details>
https://github.com/llvm/llvm-project/pull/75082
More information about the cfe-commits
mailing list