Summary: Previously, source-based coverage analysis does not work properly for coroutine. This patch adds processing of coroutine body and co_return in the coverage analysis, so that we can handle them properly. For coroutine body, we should only look at the actual function body and ignore the compiler-generated things; for co_return, we need to terminate the region similar to return statement. Added a test, and confirms that it now works properly. (without this patch, the statement after the if statement will be treated wrongly) Reviewers: lewissbaker, modocache, junparser Reviewed By: modocache Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D82928
55 KiB
55 KiB