[clang] [Clang] [Sema] Ensure noexcept(typeid(E)) checks if E throws when needed (PR #95846)

Mital Ashok via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 18 03:00:31 PDT 2024


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-c35ff1c0977223e8ef2893fd21f3886c57b26346258850d8c879362fd9222381R113-R114 (https://godbolt.org/z/1j9Kc187f)
 * The first commit in this PR didn't handle `f1`, `f2` and `f3` properly, https://github.com/llvm/llvm-project/pull/95846/commits/77b5b6477f9af79777a35cfdf1fb4659e631be71#diff-c35ff1c0977223e8ef2893fd21f3886c57b26346258850d8c879362fd9222381R124-R141 (It treated them as `CT_Cannot` since it incorrectly assumed they weren't potentially evaluated because the dependent type isn't a polymorphic class type)
 * The third commit fixed that by moving the check afterwards

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


More information about the cfe-commits mailing list