diff options
author | Mital Ashok <mital@mitalashok.co.uk> | 2024-06-17 18:31:54 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-17 19:31:54 +0200 |
commit | 3ad31e12ccfc7db25f3cbedc4ee966e7099ac78f (patch) | |
tree | 21aa54d199756cae3af209cef657ce63ce790129 /clang/docs | |
parent | 4447e255a908c4e1a2863374eaee4bc98e773c3d (diff) | |
download | llvm-3ad31e12ccfc7db25f3cbedc4ee966e7099ac78f.zip llvm-3ad31e12ccfc7db25f3cbedc4ee966e7099ac78f.tar.gz llvm-3ad31e12ccfc7db25f3cbedc4ee966e7099ac78f.tar.bz2 |
[Clang] Introduce `CXXTypeidExpr::hasNullCheck` (#95718)
Used to implement CWG2191 where `typeid` for a polymorphic glvalue only
becomes potentially-throwing if the `typeid` operand was already
potentially throwing or a `nullptr` check was inserted:
https://cplusplus.github.io/CWG/issues/2191.html
Also change `Expr::hasSideEffects` for `CXXTypeidExpr` to check the
operand for side-effects instead of always reporting that there are
side-effects
Remove `IsDeref` parameter of `CGCXXABI::shouldTypeidBeNullChecked`
because it should never return `true` if `!IsDeref` (we shouldn't add a
null check that wasn't there in the first place)
Diffstat (limited to 'clang/docs')
-rw-r--r-- | clang/docs/ReleaseNotes.rst | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst index 2bf20bc..0155c2d 100644 --- a/clang/docs/ReleaseNotes.rst +++ b/clang/docs/ReleaseNotes.rst @@ -268,6 +268,9 @@ Resolutions to C++ Defect Reports - Clang now requires a template argument list after a template keyword. (`CWG96: Syntactic disambiguation using the template keyword <https://cplusplus.github.io/CWG/issues/96.html>`_). +- Clang now considers ``noexcept(typeid(expr))`` more carefully, instead of always assuming that ``std::bad_typeid`` can be thrown. + (`CWG2191: Incorrect result for noexcept(typeid(v)) <https://cplusplus.github.io/CWG/issues/2191.html>`_). + C Language Changes ------------------ |