Open dcb314 opened 5 months ago
Static analyser cppcheck says:
clang/include/clang/Interpreter/Interpreter.h:53:36: performance: Function parameter 'TT' should be passed by const reference. [passedByValue]
Source code is
void SetTargetTriple(std::string TT) { TargetTriple = TT; }
Maybe better code:
void SetTargetTriple( const std::string & TT ) { TargetTriple = TT; }
llvm has its own type for this, which should be used instead of const std::string &, namely llvm::StringRef
const std::string &
Static analyser cppcheck says:
clang/include/clang/Interpreter/Interpreter.h:53:36: performance: Function parameter 'TT' should be passed by const reference. [passedByValue]
Source code is
void SetTargetTriple(std::string TT) { TargetTriple = TT; }
Maybe better code:
void SetTargetTriple( const std::string & TT ) { TargetTriple = TT; }