[all-commits] [llvm/llvm-project] c52392: [Clang][ExprConst] Drop PRValue for nothrow new (#...

aokblast via All-commits all-commits at lists.llvm.org
Sun Sep 27 19:14:54 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c52392a6f464e5aa6bff198e4056ca58e43e0656
      https://github.com/llvm/llvm-project/commit/c52392a6f464e5aa6bff198e4056ca58e43e0656
  Author: aokblast <aokblast at FreeBSD.org>
  Date:   2026-09-28 (Mon, 28 Sep 2026)

  Changed paths:
    M clang/lib/AST/ByteCode/Compiler.cpp
    M clang/lib/AST/ByteCode/Interp.cpp
    M clang/lib/AST/ByteCode/Interp.h
    M clang/lib/AST/ByteCode/Opcodes.td
    M clang/lib/AST/ExprConstant.cpp
    A clang/test/SemaCXX/new-nothrow-by-value.cpp

  Log Message:
  -----------
  [Clang][ExprConst] Drop PRValue for nothrow new (#226753)

A user defined operator new can accept prvalue for nothrow. However, it
should not be a ConstExpr. Early returns by
isUsableAsGlobalAllocationFunctionInConstantEvaluation instead of doing
LValue evaluation.
Also, move CheckPlacement new logic into new OpCode. This decouples
checking from Interp.cpp to Compiler.cpp.



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