[clang] [NFC] Use `const&` avoiding copies (PR #90334)
via cfe-commits
cfe-commits at lists.llvm.org
Sat Apr 27 02:40:00 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
Author: Danny Mösch (SimplyDanny)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/90334.diff
1 Files Affected:
- (modified) clang/lib/Frontend/InterfaceStubFunctionsConsumer.cpp (+1-1)
``````````diff
diff --git a/clang/lib/Frontend/InterfaceStubFunctionsConsumer.cpp b/clang/lib/Frontend/InterfaceStubFunctionsConsumer.cpp
index d58f5bb0919906..f8dced5dbafb60 100644
--- a/clang/lib/Frontend/InterfaceStubFunctionsConsumer.cpp
+++ b/clang/lib/Frontend/InterfaceStubFunctionsConsumer.cpp
@@ -295,7 +295,7 @@ class InterfaceStubFunctionsConsumer : public ASTConsumer {
OS << "Symbols:\n";
for (const auto &E : Symbols) {
const MangledSymbol &Symbol = E.second;
- for (auto Name : Symbol.Names) {
+ for (const auto &Name : Symbol.Names) {
OS << " - { Name: \""
<< (Symbol.ParentName.empty() || Instance.getLangOpts().CPlusPlus
? ""
``````````
</details>
https://github.com/llvm/llvm-project/pull/90334
More information about the cfe-commits
mailing list