[clang] [RFC] Initial implementation of P2719 (PR #113510)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 6 01:38:33 PST 2024
================
@@ -2146,6 +2146,12 @@ class Sema final : public SemaBase {
isConstantEvaluatedOverride;
}
+ TypeAwareAllocationMode allocationModeInCurrentContext() const {
+ if (getLangOpts().TypeAwareAllocators && !isConstantEvaluatedContext())
+ return TypeAwareAllocationMode::Yes;
+ return TypeAwareAllocationMode::No;
+ }
----------------
cor3ntin wrote:
Damn this is novel. Do we have any concerns with odr or such?
(the alternative is to just modify the evaluation of new expression to ignore type information)
https://github.com/llvm/llvm-project/pull/113510
More information about the cfe-commits
mailing list