summaryrefslogtreecommitdiff
path: root/compiler-rt/test/profile/Linux/coverage-statement-expression.cpp
AgeCommit message (Collapse)Author
2025-03-21Reland [Coverage] Fix region termination for GNU statement expressions (#132222)Justin Cady
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
2025-03-19Revert "[Coverage] Fix region termination for GNU statement expressions" ↵Justin Cady
(#132095) Reverts llvm/llvm-project#130976 Breaks clang-cmake-x86_64-avx512-linux bot.
2025-03-19[Coverage] Fix region termination for GNU statement expressions (#130976)Justin Cady
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