[all-commits] [llvm/llvm-project] 954a3d: Reland [Coverage] Fix region termination for GNU s...
Justin Cady via All-commits
all-commits at lists.llvm.org
Fri Mar 21 08:59:26 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 954a3de7838a8c496ef1d1730127415b3e9786f9
https://github.com/llvm/llvm-project/commit/954a3de7838a8c496ef1d1730127415b3e9786f9
Author: Justin Cady <desk at justincady.com>
Date: 2025-03-21 (Fri, 21 Mar 2025)
Changed paths:
M clang/lib/CodeGen/CoverageMappingGen.cpp
M clang/test/CoverageMapping/terminate-statements.cpp
A compiler-rt/test/profile/Linux/coverage-statement-expression.cpp
Log Message:
-----------
Reland [Coverage] Fix region termination for GNU statement expressions (#132222)
Relands #130976 with adjustments to test requirements.
Calls to __noreturn__ functions result in region termination for
coverage mapping. But this creates incorrect coverage results when
__noreturn__ functions (or other constructs that result in region
termination) occur within [GNU statement expressions][1].
In this scenario an extra gap region is introduced within VisitStmt,
such that if the following line does not introduce a new region it
is unconditionally counted as uncovered.
This change adjusts the mapping such that terminate statements
within statement expressions do not propagate that termination
state after the statement expression is processed.
[1]: https://gcc.gnu.org/onlinedocs/gcc/Statement-Exprs.html
Fixes #124296
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