[PATCH] D151553: [clang] Fix consteval operators in template contexts

Mariya Podchishchaeva via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 26 04:04:49 PDT 2023


Fznamznon created this revision.
Herald added a project: All.
Fznamznon requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

Clang used to reject consteval operators if they're used inside a
template due to TreeTransform putting two different `DeclRefExpr`
expressions for the same reference of the same operator declaration into
`ReferenceToConsteval` set.
It seems there was an attempt to not rebuild the whole operator that
never succeeded, so this patch just removes this attempt and
problemating referencing of a `DeclRefExpr` that always ended up
discarded.

Fixes https://github.com/llvm/llvm-project/issues/62886


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D151553

Files:
  clang/docs/ReleaseNotes.rst
  clang/lib/Sema/TreeTransform.h
  clang/test/SemaCXX/consteval-operators.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D151553.526018.patch
Type: text/x-patch
Size: 3385 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230526/c366d217/attachment.bin>


More information about the cfe-commits mailing list