From f4aee180860db43da336d5d5babc5e5ae9dd0510 Mon Sep 17 00:00:00 2001 From: Hans Wennborg Date: Tue, 24 Sep 2013 00:08:55 +0000 Subject: 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 --- clang/lib/Frontend/CompilerInvocation.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'clang/lib/Frontend/CompilerInvocation.cpp') 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; -- cgit v1.2.3