Author: d0k Date: Thu Sep 24 09:48:37 2015 New Revision: 248495 URL: http://llvm.org/viewvc/llvm-project?rev=248495&view=rev Log: [Driver] Don't implicitly copy std::strings in for-range loop.
Found by -Wrange-loop-analysis. Modified: cfe/trunk/lib/Driver/ToolChains.cpp Modified: cfe/trunk/lib/Driver/ToolChains.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.cpp?rev=248495&r1=248494&r2=248495&view=diff ============================================================================== --- cfe/trunk/lib/Driver/ToolChains.cpp (original) +++ cfe/trunk/lib/Driver/ToolChains.cpp Thu Sep 24 09:48:37 2015 @@ -1497,7 +1497,7 @@ Generic_GCC::CudaInstallationDetector::i CudaPathCandidates.push_back(D.SysRoot + "/usr/local/cuda-7.0"); } - for (const auto CudaPath : CudaPathCandidates) { + for (const auto &CudaPath : CudaPathCandidates) { if (CudaPath.empty() || !llvm::sys::fs::exists(CudaPath)) continue; _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits