[PATCH] D84988: [Coverage] Add empty line regions to SkippedRegions

Zequan Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 10 20:07:41 PDT 2020


zequanwu updated this revision to Diff 291118.
zequanwu added a comment.
Herald added a reviewer: jdoerfert.
Herald added a subscriber: sstefan1.

- Address comment.
- Add cl::opt to disable emitting skipped regions for empty lines and comments (used on test case only), and update test cases under CoverageMapping with `-mllvm -emptyline-comment-coverage=false`.
- Remove the logic which only emits skipped regions for comments and empty lines parsing function body, because can't tell if it's inside class member function.
- Always set `SR.ColumnStart` to 1 in `adjustSkippedRange`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D84988/new/

https://reviews.llvm.org/D84988

Files:
  clang/include/clang/Lex/Lexer.h
  clang/include/clang/Lex/Preprocessor.h
  clang/lib/CodeGen/CoverageMappingGen.cpp
  clang/lib/CodeGen/CoverageMappingGen.h
  clang/lib/Lex/Lexer.cpp
  clang/lib/Lex/Preprocessor.cpp
  clang/test/CoverageMapping/abspath.cpp
  clang/test/CoverageMapping/block-storage-starts-region.m
  clang/test/CoverageMapping/break.c
  clang/test/CoverageMapping/builtinmacro.c
  clang/test/CoverageMapping/casts.c
  clang/test/CoverageMapping/classtemplate.cpp
  clang/test/CoverageMapping/comment-in-macro.c
  clang/test/CoverageMapping/continue.c
  clang/test/CoverageMapping/control-flow-macro.c
  clang/test/CoverageMapping/coroutine.cpp
  clang/test/CoverageMapping/decl.c
  clang/test/CoverageMapping/default-method.cpp
  clang/test/CoverageMapping/deferred-region.cpp
  clang/test/CoverageMapping/empty-destructor.cpp
  clang/test/CoverageMapping/header.cpp
  clang/test/CoverageMapping/if.cpp
  clang/test/CoverageMapping/implicit-def-in-macro.m
  clang/test/CoverageMapping/include-macros.c
  clang/test/CoverageMapping/includehell.cpp
  clang/test/CoverageMapping/ir.c
  clang/test/CoverageMapping/label.cpp
  clang/test/CoverageMapping/lambda.cpp
  clang/test/CoverageMapping/logical.cpp
  clang/test/CoverageMapping/loopmacro.c
  clang/test/CoverageMapping/loops.cpp
  clang/test/CoverageMapping/macro-expansion.c
  clang/test/CoverageMapping/macro-expressions.cpp
  clang/test/CoverageMapping/macro-stringize-twice.cpp
  clang/test/CoverageMapping/macroception.c
  clang/test/CoverageMapping/macroparams.c
  clang/test/CoverageMapping/macroparams2.c
  clang/test/CoverageMapping/macros.c
  clang/test/CoverageMapping/macroscopes.cpp
  clang/test/CoverageMapping/md.cpp
  clang/test/CoverageMapping/moremacros.c
  clang/test/CoverageMapping/nestedclass.cpp
  clang/test/CoverageMapping/objc.m
  clang/test/CoverageMapping/openmp.c
  clang/test/CoverageMapping/pr32679.cpp
  clang/test/CoverageMapping/preprocessor.c
  clang/test/CoverageMapping/return.c
  clang/test/CoverageMapping/switch.cpp
  clang/test/CoverageMapping/switchmacro.c
  clang/test/CoverageMapping/system_macro.cpp
  clang/test/CoverageMapping/templates.cpp
  clang/test/CoverageMapping/test.c
  clang/test/CoverageMapping/trycatch.cpp
  clang/test/CoverageMapping/trymacro.cpp
  clang/test/CoverageMapping/unreachable-macro.c
  clang/test/CoverageMapping/unused_function.cpp
  clang/test/CoverageMapping/unused_names.c
  clang/test/CoverageMapping/while.c
  clang/test/lit.cfg.py
  compiler-rt/test/profile/coverage_emptylines.cpp
  compiler-rt/test/profile/instrprof-set-file-object-merging.c
  compiler-rt/test/profile/instrprof-set-file-object.c
  llvm/lib/ProfileData/Coverage/CoverageMapping.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D84988.291118.patch
Type: text/x-patch
Size: 59035 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200911/cbbab68a/attachment-0001.bin>


More information about the cfe-commits mailing list