[LLVMbugs] [Bug 19910] New: Don't suppress unused/undefined warnings when there are errors

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat May 31 17:48:01 PDT 2014


            Bug ID: 19910
           Summary: Don't suppress unused/undefined warnings when there
                    are errors
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: alp at nuanti.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

We currently don't emit various kinds of warnings if there have been errors (a)
in scope and (b) at end of TU.

The two traditional reasons for this were:

 1) Some of the warnings may be spurious if tokens or semantic analyses were
skipped during error recovery.

 2) Although the warnings are accurate, they can distract users reading text
diagnostic output from the actual error.

The spurious warnings in (1) have mostly been fixed in recent years to support
typo correction. See the discussion in PR5933 for historical context. Any
remaining issues will be minor and can be fixed as we encounter them.

Meanwhile (2) is still true for command line use, but not for IDEs and editors
that know how to sort diagnostics by severity. This could be solved by moving
the suppression to TextDiagnosticPrinter.

We shouldn't discard this information so readily in any case, and doing so
causes inconsistent behaviour in GUI editors.

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/20140601/e2550236/attachment.html>

More information about the llvm-bugs mailing list