Issue 94107
Summary clang/lib/Driver/ToolChains/Clang.cpp:2734: 2 * Poor choice of variable type ?
Labels clang:driver, code-quality
Assignees
Reporter dcb314
    Static analyser cppcheck says:

clang/lib/Driver/ToolChains/Clang.cpp:2734:63: performance: Function parameter 'str1' should be passed by const reference. [passedByValue]
clang/lib/Driver/ToolChains/Clang.cpp:2735:46: performance: Function parameter 'str2' should be passed by const reference. [passedByValue]

Source code is

static void EmitComplexRangeDiag(const Driver &D, std::string str1,
 std::string str2) {

Suggest new code:

static void EmitComplexRangeDiag(const Driver &D, const std::string & str1,
 const std::string & str2) {


_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to