Skip to content

clang/lib/ASTMatchers/Dynamic/Marshallers.h:939: possible performance problem ? #87248

@dcb314

Description

@dcb314

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 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.

Metadata

Metadata

Assignees

Labels

clang:frontendLanguage frontend issues, e.g. anything involving "Sema"code-qualityconfirmedVerified by a second partygood first issuehttps://github.com/llvm/llvm-project/contribute

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions