<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/87248>87248</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
clang/lib/ASTMatchers/Dynamic/Marshallers.h:939: possible performance problem ?
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
dcb314
</td>
</tr>
</table>
<pre>
Static analyser cppcheck says:
clang/lib/ASTMatchers/Dynamic/Marshallers.h:939:54: performance: Function parameter 'NodeKinds' should be passed by const reference. [passedByValue]
Source code is
MapAnyOfMatcherDescriptor(ASTNodeKind CladeNodeKind,
std::vector<ASTNodeKind> NodeKinds)
I wouldn't have bothered normally, but NodeKinds is a vector, which implies there
are many objects of type ASTNodeKind.
Might be worth tuning.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJykU8GOqzgQ_BpzaU0ENoTkwIFJFmm1yu4ho7237U7sXWMj22TE3z-RyWi4vwuo1V1dVU2BKdm7J-pY886ac4FzNiF2WklR1YUMeumuGbNVgB7dkiiCmiZlSP0PCZfERM_KMytfT-XQ3xkfnJWMD_3144JZGYqJ8eG8eBytYny4YEwGnaOYdoaJ_iiOTPRNzUQPE8VbiCN6RWs5zF5lGzxMGHGkTBEYb_8Omv6yXifGW0gmzE6DJJgwJdIgF1DBpwyRbhTJK9oBa96_uu_Lv-hmYs15q_sa5qgIVNAENm07cMGp98s_t5eTMyUV7ZRDZPzQXz--pcDJoabvivHTC56yXm8k-gepFSROGxATf8DGy3FL_Cd8rr48420Ggw8CGbKhSBr8eiDnFsZPIOf8swJsAoQXEz_Bp7HKgB0nZynBE_21HCPBiH6BIP8jlROEG-RlItiI223VXOzd5PXGnyFmA3n21t9fE4XuhD6KIxbUVW1VHQ_7mpeF6WoSe6JDdSu5blol6movK466rFRVK1UVtuMlr8u6rKqm3jftTkheYtPuNamWsDqwuqQRrds59xh3Id4Lm9JM3aHl9aFwKMmlZ3Q5f0WPrymO3Tr_Jud7YnXpbMrpZ0O22VH3O0mFKaRkpaNtWmGKQToagYmhmKPrTM7T8__gA-PD3WYzy50K40rqHt-vtymG9RMwPjytrfxPd78CAAD__98zKNc">