[clang] [clang][coverage] fixing "if constexpr" and "if consteval" coverage report (PR #77214)

Hana Dusíková via cfe-commits cfe-commits at lists.llvm.org
Sun Jan 7 02:26:24 PST 2024


================
@@ -7732,7 +7732,8 @@ TreeTransform<Derived>::TransformIfStmt(IfStmt *S) {
     if (Then.isInvalid())
       return StmtError();
   } else {
-    Then = new (getSema().Context) NullStmt(S->getThen()->getBeginLoc());
+    Then = new (getSema().Context)
+        CompoundStmt(S->getThen()->getBeginLoc(), S->getThen()->getEndLoc());
----------------
hanickadot wrote:

Comment added :)

https://github.com/llvm/llvm-project/pull/77214


More information about the cfe-commits mailing list