forked from OSchip/llvm-project
[Driver] Don't implicitly copy std::strings in for-range loop.
Found by -Wrange-loop-analysis. llvm-svn: 248495
This commit is contained in:
parent
3a91ada1e2
commit
e8b764144e
|
@ -1497,7 +1497,7 @@ Generic_GCC::CudaInstallationDetector::init(const Driver &D,
|
|||
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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue