clang-tidy: Resolve performance-unnecessary-value-param diagnostics
Fix diagnostics that appear on macOS with clang-tidy-8. Suppress cases where we intentionally take an argument by value to let the caller choose whether to copy or move.
This commit is contained in:
parent
7c5ec91301
commit
175d8c4bf6
@ -1433,7 +1433,7 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateBuildPhase(
|
||||
void cmGlobalXCodeGenerator::CreateCustomCommands(
|
||||
cmXCodeObject* buildPhases, cmXCodeObject* sourceBuildPhase,
|
||||
cmXCodeObject* headerBuildPhase, cmXCodeObject* resourceBuildPhase,
|
||||
std::vector<cmXCodeObject*> contentBuildPhases,
|
||||
std::vector<cmXCodeObject*> const& contentBuildPhases,
|
||||
cmXCodeObject* frameworkBuildPhase, cmGeneratorTarget* gtgt)
|
||||
{
|
||||
std::vector<cmCustomCommand> const& prebuild = gtgt->GetPreBuildCommands();
|
||||
|
@ -122,13 +122,11 @@ private:
|
||||
std::string RelativeToSource(const std::string& p);
|
||||
std::string RelativeToBinary(const std::string& p);
|
||||
std::string ConvertToRelativeForMake(std::string const& p);
|
||||
void CreateCustomCommands(cmXCodeObject* buildPhases,
|
||||
cmXCodeObject* sourceBuildPhase,
|
||||
cmXCodeObject* headerBuildPhase,
|
||||
cmXCodeObject* resourceBuildPhase,
|
||||
std::vector<cmXCodeObject*> contentBuildPhases,
|
||||
cmXCodeObject* frameworkBuildPhase,
|
||||
cmGeneratorTarget* gtgt);
|
||||
void CreateCustomCommands(
|
||||
cmXCodeObject* buildPhases, cmXCodeObject* sourceBuildPhase,
|
||||
cmXCodeObject* headerBuildPhase, cmXCodeObject* resourceBuildPhase,
|
||||
std::vector<cmXCodeObject*> const& contentBuildPhases,
|
||||
cmXCodeObject* frameworkBuildPhase, cmGeneratorTarget* gtgt);
|
||||
|
||||
std::string ComputeInfoPListLocation(cmGeneratorTarget* target);
|
||||
|
||||
|
@ -326,6 +326,7 @@ cmListFileBacktrace::cmListFileBacktrace(cmStateSnapshot const& snapshot)
|
||||
{
|
||||
}
|
||||
|
||||
/* NOLINTNEXTLINE(performance-unnecessary-value-param) */
|
||||
cmListFileBacktrace::cmListFileBacktrace(std::shared_ptr<Entry const> parent,
|
||||
cmListFileContext const& lfc)
|
||||
: TopEntry(std::make_shared<Entry const>(std::move(parent), lfc))
|
||||
|
@ -91,6 +91,7 @@ static void deleteVariableWatchCallbackData(void* client_data)
|
||||
class FinalAction
|
||||
{
|
||||
public:
|
||||
/* NOLINTNEXTLINE(performance-unnecessary-value-param) */
|
||||
FinalAction(cmMakefile* makefile, std::string variable)
|
||||
: Action(std::make_shared<Impl>(makefile, std::move(variable)))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user