[llvm-bugs] [Bug 34166] New: Weird code coverage display for "#if" inside function

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Aug 11 16:52:40 PDT 2017


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

            Bug ID: 34166
           Summary: Weird code coverage display for "#if" inside function
           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

llvm-cov show output for a simple testcase:

    1|      1|int main() {
    2|      1|  if (0) {
    3|      0|#if 0
    4|       |#endif
    5|      1|  }
    6|      1|return 0;
    7|      1|}


It looks even weirder with highlighting: the "#" of "#if 0" and the "endif" of
"#endif" are highlighted red.

I guess this behavior is inherited from the clang preprocessor, to some extent?
 It seems like we should be able to do better, though... preprocessor
directives have to be on their own line, so we should be able to exclude the
entire line containing the "#if", and the entire line containing the "#endif".

-- 
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/20170811/a203e689/attachment.html>


More information about the llvm-bugs mailing list