[PATCH] D113749: [Clang] Fix nesting of discarded an immediate context.

Corentin Jabot via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 12 03:30:12 PST 2021


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

In C++23, discarded statements and if consteval statements can nest
arbitrarily. To support that, we
keep track of whether the parent of the current evaluation context
is discarded or immediate.

This is done at the construction of an evaluation context
to improve performance.

Fixes https://bugs.llvm.org/show_bug.cgi?id=52231


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D113749

Files:
  clang/include/clang/Sema/Sema.h
  clang/lib/Sema/SemaExpr.cpp
  clang/lib/Sema/SemaStmt.cpp
  clang/test/SemaCXX/cxx2b-consteval-if.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D113749.386781.patch
Type: text/x-patch
Size: 5433 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20211112/adf0f5b6/attachment.bin>


More information about the cfe-commits mailing list