From: Zachary Turner Date: Wed, 22 Oct 2014 21:48:56 +0000 (+0000) Subject: Fix C++ compliance issue. string literals must be const char * X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=424c891b04480f0379ee48bf1b52222b9b7b7836;p=clang Fix C++ compliance issue. string literals must be const char * git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220434 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Driver/MSVCToolChain.cpp b/lib/Driver/MSVCToolChain.cpp index a2f5e83984..879b20787e 100644 --- a/lib/Driver/MSVCToolChain.cpp +++ b/lib/Driver/MSVCToolChain.cpp @@ -242,9 +242,9 @@ bool MSVCToolChain::getWindowsSDKLibraryPath(std::string &path) const { // Windows SDK 8.x installs libraries in a folder whose names depend on the // version of the OS you're targeting. By default choose the newest, which // usually corresponds to the version of the OS you've installed the SDK on. - char *tests[] = {"winv6.3", "win8", "win7"}; + const char *tests[] = {"winv6.3", "win8", "win7"}; bool found = false; - for (char *test : tests) { + for (const char *test : tests) { llvm::SmallString<128> testPath(libPath); llvm::sys::path::append(testPath, test); if (llvm::sys::fs::exists(testPath.c_str())) {