[all-commits] [llvm/llvm-project] 18d574: [llvm-cov] Add inline exclusion marker support for...
Maksim Levental via All-commits
all-commits at lists.llvm.org
Sat Jun 13 12:46:55 PDT 2026
Branch: refs/heads/users/makslevental/inline-excl-llvm-cov
Home: https://github.com/llvm/llvm-project
Commit: 18d574d93359599c4ce2be9fa19c032d377c8b54
https://github.com/llvm/llvm-project/commit/18d574d93359599c4ce2be9fa19c032d377c8b54
Author: makslevental <maksim.levental at gmail.com>
Date: 2026-06-13 (Sat, 13 Jun 2026)
Changed paths:
A llvm/test/tools/llvm-cov/Inputs/exclude-markers-custom-region/report-custom-region.covmapping
A llvm/test/tools/llvm-cov/Inputs/exclude-markers-custom-region/report-custom-region.cpp
A llvm/test/tools/llvm-cov/Inputs/exclude-markers-custom-region/report-custom-region.profdata
A llvm/test/tools/llvm-cov/Inputs/exclude-markers-custom/report-custom.covmapping
A llvm/test/tools/llvm-cov/Inputs/exclude-markers-custom/report-custom.cpp
A llvm/test/tools/llvm-cov/Inputs/exclude-markers-custom/report-custom.profdata
A llvm/test/tools/llvm-cov/Inputs/exclude-markers-region/report-region.covmapping
A llvm/test/tools/llvm-cov/Inputs/exclude-markers-region/report-region.cpp
A llvm/test/tools/llvm-cov/Inputs/exclude-markers-region/report-region.profdata
A llvm/test/tools/llvm-cov/Inputs/exclude-markers/report.covmapping
A llvm/test/tools/llvm-cov/Inputs/exclude-markers/report.cpp
A llvm/test/tools/llvm-cov/Inputs/exclude-markers/report.profdata
A llvm/test/tools/llvm-cov/exclude-markers.test
M llvm/tools/llvm-cov/CodeCoverage.cpp
M llvm/tools/llvm-cov/CoverageReport.cpp
M llvm/tools/llvm-cov/CoverageSummaryInfo.h
M llvm/tools/llvm-cov/CoverageViewOptions.h
Log Message:
-----------
[llvm-cov] Add inline exclusion marker support for coverage reporting
Add --exclude-line-regex, --exclude-region-start-regex, and
--exclude-region-stop-regex options to llvm-cov. These allow excluding
lines from coverage totals based on inline source comments.
Defaults: LCOV_EXCL_LINE (single line), LCOV_EXCL_START/LCOV_EXCL_STOP
(region). This brings parity with lcov/gcov exclusion markers and
kcov --exclude-line regex support.
The implementation scans source files for markers when loaded, builds a
per-file set of excluded line numbers, and subtracts them from the line
coverage totals in prepareFileReports().
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply at anthropic.com>
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list