https://github.com/MitalAshok created
https://github.com/llvm/llvm-project/pull/95846
3ad31e12ccfc7db25f3cbedc4ee966e7099ac78f changed it so that not all
potentially-evaluated `typeid`s were marked as potentially-throwing, but I
forgot to check the subexpression if the null check of the `typei
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Mital Ashok (MitalAshok)
Changes
3ad31e12ccfc7db25f3cbedc4ee966e7099ac78f changed it so that not all
potentially-evaluated `typeid`s were marked as potentially-throwing, but I
forgot to check the subexpression if the null check of the `ty
MitalAshok wrote:
CC @Endilll @Sirraide
https://github.com/llvm/llvm-project/pull/95846
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Sirraide approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/95846
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -,13 +,18 @@ static CanThrowResult canDynamicCastThrow(const
CXXDynamicCastExpr *DC) {
}
static CanThrowResult canTypeidThrow(Sema &S, const CXXTypeidExpr *DC) {
- if (DC->isTypeOperand())
+ // Operand is not evaluated, cannot possibly throw
tbae
@@ -,13 +,18 @@ static CanThrowResult canDynamicCastThrow(const
CXXDynamicCastExpr *DC) {
}
static CanThrowResult canTypeidThrow(Sema &S, const CXXTypeidExpr *DC) {
- if (DC->isTypeOperand())
+ // Operand is not evaluated, cannot possibly throw
+ if (!DC->isPotenti
https://github.com/MitalAshok updated
https://github.com/llvm/llvm-project/pull/95846
>From 89da8b3bcc678430fe4225c723e87914f2c378cd Mon Sep 17 00:00:00 2001
From: Mital Ashok
Date: Mon, 17 Jun 2024 21:48:57 +0100
Subject: [PATCH 1/2] [Clang] [Sema] Ensure noexcept(typeid(E)) checks if E
throw
https://github.com/MitalAshok updated
https://github.com/llvm/llvm-project/pull/95846
>From 89da8b3bcc678430fe4225c723e87914f2c378cd Mon Sep 17 00:00:00 2001
From: Mital Ashok
Date: Mon, 17 Jun 2024 21:48:57 +0100
Subject: [PATCH 1/3] [Clang] [Sema] Ensure noexcept(typeid(E)) checks if E
throw
Sirraide wrote:
Do we already have tests for your most recent commit (i.e. dependent
expressions)? Because I recall CI passing even when that wasn’t there, but that
may have been my imagination.
https://github.com/llvm/llvm-project/pull/95846
___
cfe
https://github.com/MitalAshok updated
https://github.com/llvm/llvm-project/pull/95846
>From 89da8b3bcc678430fe4225c723e87914f2c378cd Mon Sep 17 00:00:00 2001
From: Mital Ashok
Date: Mon, 17 Jun 2024 21:48:57 +0100
Subject: [PATCH 1/4] [Clang] [Sema] Ensure noexcept(typeid(E)) checks if E
throw
MitalAshok wrote:
@Sirraide Yes, the tests did pass because there were no tests for this.
For reference:
* `llvm:main` currently only handles these two wrong
https://github.com/llvm/llvm-project/pull/95846/commits/89da8b3bcc678430fe4225c723e87914f2c378cd#diff-c35ff1c0977223e8ef2893fd21f3886c57
https://github.com/Sirraide edited
https://github.com/llvm/llvm-project/pull/95846
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -115,3 +116,39 @@ static_assert(!noexcept(typeid((Polymorphic&&) Polymorphic&)
Polymorphic{})));
static_assert(!noexcept(typeid(*&(const Polymorphic&)
Polymorphic{})));
static_assert(!noexcept(typeid(*&(const Polymorphic&)
Polymorphic{})));
+
+template
+struct X {
+ templ
https://github.com/Sirraide approved this pull request.
Alright, this does look like we’re handling all cases now (that I can think of
at least).
However, I’d like to see some comments added to `f1`–`f3`, indicating why
they’re dependent, because it took me a bit of thinking to figure that out
https://github.com/MitalAshok updated
https://github.com/llvm/llvm-project/pull/95846
>From 89da8b3bcc678430fe4225c723e87914f2c378cd Mon Sep 17 00:00:00 2001
From: Mital Ashok
Date: Mon, 17 Jun 2024 21:48:57 +0100
Subject: [PATCH 1/5] [Clang] [Sema] Ensure noexcept(typeid(E)) checks if E
throw
https://github.com/Sirraide approved this pull request.
Thanks, the comments are pretty much exactly what I had in mind.
https://github.com/llvm/llvm-project/pull/95846
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-
Sirraide wrote:
In case anyone ends up being confused by the lack of a release note here:
#95718 already added one that still covers everything done in this pr seeing as
this is mostly a follow-up to that one.
https://github.com/llvm/llvm-project/pull/95846
https://github.com/Sirraide closed
https://github.com/llvm/llvm-project/pull/95846
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
18 matches
Mail list logo