diff options
| author | Hans Wennborg <hans@hanshq.net> | 2013-09-24 00:08:55 +0000 |
|---|---|---|
| committer | Hans Wennborg <hans@hanshq.net> | 2013-09-24 00:08:55 +0000 |
| commit | f4aee180860db43da336d5d5babc5e5ae9dd0510 (patch) | |
| tree | b62a92f9ce07e3a7ca4c6cd003eb55758e09727b /clang/lib/Driver/Tools.cpp | |
| parent | 8a2d496e180023cdad774c1512cce1ef69bf4f9c (diff) | |
| download | bcm5719-llvm-f4aee180860db43da336d5d5babc5e5ae9dd0510.tar.gz bcm5719-llvm-f4aee180860db43da336d5d5babc5e5ae9dd0510.zip | |
clang-cl: print diagnostics as "error(clang): foo" in /fallback mode
This solves two problems:
1) MSBuild will not flag the build as unsuccessful just because we print
an error in the output, since "error(clang):" doesn't seem to match
the regex it's using.
2) It becomes more clear that the diagnostic is coming from clang as
supposed to cl.exe.
Differential Revision: http://llvm-reviews.chandlerc.com/D1735
llvm-svn: 191250
Diffstat (limited to 'clang/lib/Driver/Tools.cpp')
| -rw-r--r-- | clang/lib/Driver/Tools.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp index 4302f1a9cd0..e0ffd9ac66e 100644 --- a/clang/lib/Driver/Tools.cpp +++ b/clang/lib/Driver/Tools.cpp @@ -3783,7 +3783,10 @@ void Clang::AddClangCLArgs(const ArgList &Args, ArgStringList &CmdArgs) const { if (!Args.hasArg(options::OPT_fdiagnostics_format_EQ)) { CmdArgs.push_back("-fdiagnostics-format"); - CmdArgs.push_back("msvc"); + if (Args.hasArg(options::OPT__SLASH_fallback)) + CmdArgs.push_back("msvc-fallback"); + else + CmdArgs.push_back("msvc"); } } |

