[clang] [coverage] fix crash in code coverage and `if constexpr` with `ExprWithCleanups` (PR #80292)

2024-02-01 Thread Hana Dusíková via cfe-commits
https://github.com/hanickadot closed https://github.com/llvm/llvm-project/pull/80292 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [coverage] fix crash in code coverage and `if constexpr` with `ExprWithCleanups` (PR #80292)

2024-02-01 Thread Hana Dusíková via cfe-commits
https://github.com/hanickadot updated https://github.com/llvm/llvm-project/pull/80292 From 886cd32ef022fcb7c5a4604c5238074a54f78b96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hana=20Dusi=CC=81kova=CC=81?= Date: Thu, 1 Feb 2024 22:20:44 +0100 Subject: [PATCH] [coverage] fix crash in code coverage

[clang] [coverage] fix crash in code coverage and `if constexpr` with `ExprWithCleanups` (PR #80292)

2024-02-01 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. https://github.com/llvm/llvm-project/pull/80292 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [coverage] fix crash in code coverage and `if constexpr` with `ExprWithCleanups` (PR #80292)

2024-02-01 Thread Hana Dusíková via cfe-commits
https://github.com/hanickadot updated https://github.com/llvm/llvm-project/pull/80292 From af3118a1bbc071ec5d3a9d5b43cce66b0fe828e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hana=20Dusi=CC=81kova=CC=81?= Date: Thu, 1 Feb 2024 22:20:44 +0100 Subject: [PATCH] [coverage] fix crash in code coverage

[llvm] [mlir] [clang] [coverage] fix crash in code coverage and `if constexpr` with `ExprWithCleanups` (PR #80292)

2024-02-01 Thread Hana Dusíková via cfe-commits
https://github.com/hanickadot updated https://github.com/llvm/llvm-project/pull/80292 From 4b2d3b7b8f04510f791e4d3cc68b2de5a273c735 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hana=20Dusi=CC=81kova=CC=81?= Date: Thu, 1 Feb 2024 22:20:44 +0100 Subject: [PATCH] [coverage] fix crash in code coverage

[clang] [coverage] fix crash in code coverage and `if constexpr` with `ExprWithCleanups` (PR #80292)

2024-02-01 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > Changes LGTM, but please add a release note to > > `clang/docs/ReleaseNotes.rst` so users know about the fix. > > Thank you for the fix! > > FYI this is a regression in 18 affecting users so we should backport Btw, instructions on how to do that can be found here: http

[clang] [coverage] fix crash in code coverage and `if constexpr` with `ExprWithCleanups` (PR #80292)

2024-02-01 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > Changes LGTM, but please add a release note to > > `clang/docs/ReleaseNotes.rst` so users know about the fix. > > Thank you for the fix! > > Even if it's a fix for recent PR I did few days ago? Oh, I had missed that, sorry! Then no, a release note isn't needed. https:/

[clang] [coverage] fix crash in code coverage and `if constexpr` with `ExprWithCleanups` (PR #80292)

2024-02-01 Thread via cfe-commits
cor3ntin wrote: > Changes LGTM, but please add a release note to `clang/docs/ReleaseNotes.rst` > so users know about the fix. > > Thank you for the fix! FYI this is a regression in 18 affecting users so we should backport https://github.com/llvm/llvm-project/pull/80292 __

[clang] [coverage] fix crash in code coverage and `if constexpr` with `ExprWithCleanups` (PR #80292)

2024-02-01 Thread Hana Dusíková via cfe-commits
@@ -234,6 +234,35 @@ constexpr int check_macro_consteval_if_skipped(int i) { // CHECK-NEXT: [[@LINE return i; } +struct false_value { + constexpr operator bool() { +return false; + } +}; + +template struct dependable_false_value { + constexpr operator bool() { +

[clang] [coverage] fix crash in code coverage and `if constexpr` with `ExprWithCleanups` (PR #80292)

2024-02-01 Thread Hana Dusíková via cfe-commits
https://github.com/hanickadot updated https://github.com/llvm/llvm-project/pull/80292 From 4b2d3b7b8f04510f791e4d3cc68b2de5a273c735 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hana=20Dusi=CC=81kova=CC=81?= Date: Thu, 1 Feb 2024 22:20:44 +0100 Subject: [PATCH] [coverage] fix crash in code coverage

[clang] [coverage] fix crash in code coverage and `if constexpr` with `ExprWithCleanups` (PR #80292)

2024-02-01 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/80292 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [coverage] fix crash in code coverage and `if constexpr` with `ExprWithCleanups` (PR #80292)

2024-02-01 Thread Fangrui Song via cfe-commits
@@ -234,6 +234,35 @@ constexpr int check_macro_consteval_if_skipped(int i) { // CHECK-NEXT: [[@LINE return i; } +struct false_value { + constexpr operator bool() { +return false; + } +}; + +template struct dependable_false_value { + constexpr operator bool() { +

[clang] [coverage] fix crash in code coverage and `if constexpr` with `ExprWithCleanups` (PR #80292)

2024-02-01 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/80292 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [coverage] fix crash in code coverage and `if constexpr` with `ExprWithCleanups` (PR #80292)

2024-02-01 Thread Hana Dusíková via cfe-commits
hanickadot wrote: > Changes LGTM, but please add a release note to `clang/docs/ReleaseNotes.rst` > so users know about the fix. > > Thank you for the fix! Even if it's a fix for recent PR I did few days ago? Also, how do I get this into release branch (the previous change is there)? https://

[clang] [coverage] fix crash in code coverage and `if constexpr` with `ExprWithCleanups` (PR #80292)

2024-02-01 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Changes LGTM, but please add a release note to `clang/docs/ReleaseNotes.rst` so users know about the fix. Thank you for the fix! https://github.com/llvm/llvm-project/pull/80292 ___ cfe-commits mailing list c

[clang] [coverage] fix crash in code coverage and `if constexpr` with `ExprWithCleanups` (PR #80292)

2024-02-01 Thread Hana Dusíková via cfe-commits
https://github.com/hanickadot updated https://github.com/llvm/llvm-project/pull/80292 From f1dfd7fb2713f879de3532c903217b911b81db34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hana=20Dusi=CC=81kova=CC=81?= Date: Thu, 1 Feb 2024 22:20:44 +0100 Subject: [PATCH] [coverage] fix crash in code coverage

[openmp] [clang] [coverage] fix crash in code coverage and `if constexpr` with `ExprWithCleanups` (PR #80292)

2024-02-01 Thread Hana Dusíková via cfe-commits
@@ -1808,12 +1808,24 @@ struct CounterCoverageMappingBuilder } } +private: + static bool evaluateConstantCondition(const Expr *Condition) { +if (const auto *Expr = dyn_cast(Condition)) + return Expr->getResultAsAPSInt().getExtValue(); + +if (const auto *Exp

[openmp] [clang] [coverage] fix crash in code coverage and `if constexpr` with `ExprWithCleanups` (PR #80292)

2024-02-01 Thread Hana Dusíková via cfe-commits
@@ -1808,12 +1808,24 @@ struct CounterCoverageMappingBuilder } } +private: + static bool evaluateConstantCondition(const Expr *Condition) { +if (const auto *Expr = dyn_cast(Condition)) + return Expr->getResultAsAPSInt().getExtValue(); + +if (const auto *Exp

[openmp] [clang] [coverage] fix crash in code coverage and `if constexpr` with `ExprWithCleanups` (PR #80292)

2024-02-01 Thread Hana Dusíková via cfe-commits
https://github.com/hanickadot updated https://github.com/llvm/llvm-project/pull/80292 From 84817eb419dfe0a66e8b4b1d21cf67cbc6b20199 Mon Sep 17 00:00:00 2001 From: Alexandre Ganea <37383324+aga...@users.noreply.github.com> Date: Thu, 1 Feb 2024 08:14:05 -0500 Subject: [PATCH] [coverage] fix crash

[clang] [coverage] fix crash in code coverage and `if constexpr` with `ExprWithCleanups` (PR #80292)

2024-02-01 Thread via cfe-commits
@@ -1808,12 +1808,24 @@ struct CounterCoverageMappingBuilder } } +private: + static bool evaluateConstantCondition(const Expr *Condition) { +if (const auto *Expr = dyn_cast(Condition)) + return Expr->getResultAsAPSInt().getExtValue(); + +if (const auto *Exp

[clang] [coverage] fix crash in code coverage and `if constexpr` with `ExprWithCleanups` (PR #80292)

2024-02-01 Thread Hana Dusíková via cfe-commits
@@ -1808,12 +1808,24 @@ struct CounterCoverageMappingBuilder } } +private: + static bool evaluateConstantCondition(const Expr *Condition) { +if (const auto *Expr = dyn_cast(Condition)) + return Expr->getResultAsAPSInt().getExtValue(); + +if (const auto *Exp

[clang] [coverage] fix crash in code coverage and `if constexpr` with `ExprWithCleanups` (PR #80292)

2024-02-01 Thread via cfe-commits
@@ -1808,12 +1808,24 @@ struct CounterCoverageMappingBuilder } } +private: + static bool evaluateConstantCondition(const Expr *Condition) { +if (const auto *Expr = dyn_cast(Condition)) + return Expr->getResultAsAPSInt().getExtValue(); + +if (const auto *Exp

[clang] [coverage] fix crash in code coverage and `if constexpr` with `ExprWithCleanups` (PR #80292)

2024-02-01 Thread Eli Friedman via cfe-commits
@@ -1808,12 +1808,24 @@ struct CounterCoverageMappingBuilder } } +private: + static bool evaluateConstantCondition(const Expr *Condition) { +if (const auto *Expr = dyn_cast(Condition)) + return Expr->getResultAsAPSInt().getExtValue(); + +if (const auto *Exp

[clang] [coverage] fix crash in code coverage and `if constexpr` with `ExprWithCleanups` (PR #80292)

2024-02-01 Thread via cfe-commits
@@ -1808,12 +1808,24 @@ struct CounterCoverageMappingBuilder } } +private: + static bool evaluateConstantCondition(const Expr *Condition) { +if (const auto *Expr = dyn_cast(Condition)) + return Expr->getResultAsAPSInt().getExtValue(); + +if (const auto *Exp

[clang] [coverage] fix crash in code coverage and `if constexpr` with `ExprWithCleanups` (PR #80292)

2024-02-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen @llvm/pr-subscribers-clang Author: Hana Dusíková (hanickadot) Changes Fixes https://github.com/llvm/llvm-project/issues/80285 --- Full diff: https://github.com/llvm/llvm-project/pull/80292.diff 2 Files Affected: - (modified) clang/lib/C

[clang] [coverage] fix crash in code coverage and `if constexpr` with `ExprWithCleanups` (PR #80292)

2024-02-01 Thread Hana Dusíková via cfe-commits
https://github.com/hanickadot created https://github.com/llvm/llvm-project/pull/80292 Fixes https://github.com/llvm/llvm-project/issues/80285 From 84c3e120e04394d024851f30044de591cf1599e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hana=20Dusi=CC=81kova=CC=81?= Date: Thu, 1 Feb 2024 14:34:16 +010