clang-cl: use -fdiagnostics-format=msvc by default
This allows for navigating to errors within the MSVC IDE by clicking
on the diagnostics.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190378 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
index dd72fd7..d43758e 100644
--- a/lib/Driver/Tools.cpp
+++ b/lib/Driver/Tools.cpp
@@ -3757,6 +3757,11 @@
if (Arg *A = Args.getLastArg(options::OPT_show_includes))
A->render(Args, CmdArgs);
+
+ if (!Args.hasArg(options::OPT_fdiagnostics_format_EQ)) {
+ CmdArgs.push_back("-fdiagnostics-format");
+ CmdArgs.push_back("msvc");
+ }
}
void ClangAs::ConstructJob(Compilation &C, const JobAction &JA,