Skip to content

Commit 9d9a85e

Browse files
authored
[flang] Change argument to const reference (#95048)
cppcheck recommends that a std::map being passed by value be changed to a const reference. Fixes #94932.
1 parent 055df49 commit 9d9a85e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

flang/lib/Semantics/scope.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Scope &Scope::MakeScope(Kind kind, Symbol *symbol) {
5656

5757
template <typename T>
5858
static std::vector<common::Reference<T>> GetSortedSymbols(
59-
std::map<SourceName, MutableSymbolRef> symbols) {
59+
const std::map<SourceName, MutableSymbolRef> &symbols) {
6060
std::vector<common::Reference<T>> result;
6161
result.reserve(symbols.size());
6262
for (auto &pair : symbols) {

0 commit comments

Comments
 (0)