================ @@ -7732,7 +7732,11 @@ TreeTransform<Derived>::TransformIfStmt(IfStmt *S) { if (Then.isInvalid()) return StmtError(); } else { - Then = new (getSema().Context) NullStmt(S->getThen()->getBeginLoc()); + // Discarded branch is replaced with empty CompoundStmt so we can keep + // proper source location for start and end of original branch, so + // subsequent transformations like CoverageMapping work properly ---------------- ornata wrote:
In the test, you mention that we're generating coverage for the discarded regions. Is the reason that we're generating a `CompoundStmt` here? Could this use a `FIXME`? https://github.com/llvm/llvm-project/pull/77214 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits