[llvm-bugs] [Bug 35959] New: print warnings normally in /fallback mode

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Jan 16 01:07:59 PST 2018


https://bugs.llvm.org/show_bug.cgi?id=35959

            Bug ID: 35959
           Summary: print warnings normally in /fallback mode
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Driver
          Assignee: unassignedclangbugs at nondot.org
          Reporter: trass3r at gmail.com
                CC: llvm-bugs at lists.llvm.org

clang prints warning(clang) in fallback mode so MSBuild does not fail the build
because of errors printed by clang. But actually warnings could and should be
printed normally (so MSBuild/VS picks them up) as I still want to benefit from
clang's rich diagnostics even if it fails at some point.

Proof-of-concept:

Index: TextDiagnostic.cpp
===================================================================
--- TextDiagnostic.cpp  (revision 322481)
+++ TextDiagnostic.cpp  (working copy)
@@ -725,7 +725,7 @@
   // makes it more clear whether a message is coming from clang or cl.exe,
   // and it prevents MSBuild from concluding that the build failed just
because
   // there is an "error:" in the output.
-  if (CLFallbackMode)
+  if (CLFallbackMode && Level >= DiagnosticsEngine::Error)
     OS << "(clang)";

   OS << ": ";

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180116/c5e2b363/attachment-0001.html>


More information about the llvm-bugs mailing list