[all-commits] [llvm/llvm-project] 3ad31e: [Clang] Introduce `CXXTypeidExpr::hasNullCheck` (#...
Mital Ashok via All-commits
all-commits at lists.llvm.org
Mon Jun 17 10:32:17 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 3ad31e12ccfc7db25f3cbedc4ee966e7099ac78f
https://github.com/llvm/llvm-project/commit/3ad31e12ccfc7db25f3cbedc4ee966e7099ac78f
Author: Mital Ashok <mital at mitalashok.co.uk>
Date: 2024-06-17 (Mon, 17 Jun 2024)
Changed paths:
M clang/docs/ReleaseNotes.rst
M clang/include/clang/AST/ExprCXX.h
M clang/lib/AST/Expr.cpp
M clang/lib/AST/ExprCXX.cpp
M clang/lib/CodeGen/CGCXXABI.h
M clang/lib/CodeGen/CGExprCXX.cpp
M clang/lib/CodeGen/ItaniumCXXABI.cpp
M clang/lib/CodeGen/MicrosoftCXXABI.cpp
M clang/lib/Sema/SemaExceptionSpec.cpp
M clang/test/CXX/drs/cwg21xx.cpp
M clang/test/SemaCXX/warn-unused-value.cpp
M clang/www/cxx_dr_status.html
Log Message:
-----------
[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)
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list