[llvm-bugs] [Bug 34059] New: source-based code coverage shows coverage for constants defined with #define

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Aug 3 15:59:43 PDT 2017


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

            Bug ID: 34059
           Summary: source-based code coverage shows coverage for
                    constants defined with #define
           Product: new-bugs
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: efriedma at codeaurora.org
                CC: llvm-bugs at lists.llvm.org, vsk at apple.com

Consider the following:

#define VAL -1
int f(void) {
  return VAL;
}

If you generate a coverage report, we show coverage for the code in f()... and
we also show coverage for "-1".  I guess that's correct, in some sense, but it
isn't really useful; the user thinks of it as a constant, not code.

On its own, this doesn't matter much.  But it gets annoying when you generate a
coverage report for a C codebase: the report includes a bunch of headers which
don't contain any code.

-- 
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/20170803/a4a4dbab/attachment.html>


More information about the llvm-bugs mailing list