[LLVMbugs] [Bug 8150] New: clang -fcolor-diagnostics and !isatty(stderr)

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Sep 14 16:41:51 PDT 2010


           Summary: clang -fcolor-diagnostics and !isatty(stderr)
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Driver
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: fvbommel at wxs.nl
                CC: llvmbugs at cs.uiuc.edu

Created an attachment (id=5492)
 --> (http://llvm.org/bugs/attachment.cgi?id=5492)
Proposed patch

Clang's -fcolor-diagnostics command-line option doesn't enable colored
diagnostics if it's of the opinion that stderr can't handle them (i.e.
StandardErrHasColors() returns false).
IMHO, if this option is explicitly passed to the driver then it should respect
that. (For instance, ccache users can't get colored diagnostics otherwise
because ccache also caches warnings, so it has to redirect stderr)

I'm attaching a small patch that fixes this.

Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the llvm-bugs mailing list