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 | 89e32745123c02159fa1d1f19f96bdd4173029f0 (patch) | |
| tree | b2e1a18c22cc8a06a69c9be5d82cffe1b1c3915c /lib/Frontend/CompilerInvocation.cpp | |
| parent | 06b52b41a98fff69c1c68baf24316eafd8d5a47b (diff) | |
| download | clang-89e32745123c02159fa1d1f19f96bdd4173029f0.tar.gz clang-89e32745123c02159fa1d1f19f96bdd4173029f0.tar.bz2 clang-89e32745123c02159fa1d1f19f96bdd4173029f0.tar.xz | |
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
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191250 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/CompilerInvocation.cpp')
| -rw-r--r-- | lib/Frontend/CompilerInvocation.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp index 1c3dd7da7c..b13507a5ef 100644 --- a/lib/Frontend/CompilerInvocation.cpp +++ b/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; |
