summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2013-09-24 00:08:55 +0000
committerHans Wennborg <hans@hanshq.net>2013-09-24 00:08:55 +0000
commitf4aee180860db43da336d5d5babc5e5ae9dd0510 (patch)
treeb62a92f9ce07e3a7ca4c6cd003eb55758e09727b /clang/lib/Frontend/CompilerInvocation.cpp
parent8a2d496e180023cdad774c1512cce1ef69bf4f9c (diff)
downloadbcm5719-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/Frontend/CompilerInvocation.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index 1c3dd7da7c5..b13507a5ef1 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -589,7 +589,10 @@ bool clang::ParseDiagnosticArgs(DiagnosticOptions &Opts, ArgList &Args,
Opts.setFormat(DiagnosticOptions::Clang);
else if (Format == "msvc")
Opts.setFormat(DiagnosticOptions::Msvc);
- else if (Format == "vi")
+ else if (Format == "msvc-fallback") {
+ Opts.setFormat(DiagnosticOptions::Msvc);
+ Opts.CLFallbackMode = true;
+ } else if (Format == "vi")
Opts.setFormat(DiagnosticOptions::Vi);
else {
Success = false;
OpenPOWER on IntegriCloud