thakis added inline comments.

================
Comment at: lib/Driver/ToolChains/MSVC.cpp:467-468
   if (Linker.equals_lower("link")) {
+    if (!TC.FoundMSVCInstall())
+      C.getDriver().Diag(clang::diag::warn_drv_msvc_not_found);
+
----------------
zturner wrote:
> It looks like it's possible for this warning to be emitted even when 
> `FindVisualStudioExecutable` succeeds (after looking in the install location 
> it checks `PATH`).  Would it make more sense to put this check after the call 
> to `FindVisualStudioExecutable`, but only if it fails?
If we find link.exe on PATH but LIB isn't set, will link.exe do the right 
thing? Or is the warning still useful for that case?

I'll upload a patch that does what you suggest, but since I'm not sure what 
exactly the warning is supposed to catch, I find it difficult to say which 
version is better.


https://reviews.llvm.org/D49398



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to