Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

llvm/utils/TableGen/MacroFusionPredicatorEmitter.cpp: 2 * pointless vector copy ? #89210

Closed
dcb314 opened this issue Apr 18, 2024 · 0 comments
Closed

Comments

@dcb314
Copy link

dcb314 commented Apr 18, 2024

Static analyser cppcheck says:

/llvm/utils/TableGen/MacroFusionPredicatorEmitter.cpp:79:27: performance: Function parameter 'Fusions' should be passed by const reference. [passedByValue]

Source code is

void MacroFusionPredicatorEmitter::emitMacroFusionDecl(
std::vector<Record *> Fusions, PredicateExpander &PE, raw_ostream &OS) {

llvm/utils/TableGen/MacroFusionPredicatorEmitter.cpp:96:27: performance: Function parameter 'Fusions' should be passed by const reference. [passedByValue]

Duplicate.

@EugeneZelenko EugeneZelenko removed llvm Umbrella label for LLVM issues llvm:binary-utilities labels Apr 18, 2024
aniplcc pushed a commit to aniplcc/llvm-project that referenced this issue Apr 21, 2024
…rguments by ArrayRef instead

Silence pass by value warnings

Fixes llvm#89210
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants