[all-commits] [llvm/llvm-project] 6eeda0: [Clang] Fix nesting of discarded and immediate con...

Aaron Ballman via All-commits all-commits at lists.llvm.org
Wed Dec 1 09:58:49 PST 2021

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6eeda06c1d22da2b9fe96a2569a8a0f8e4f36880
  Author: Corentin Jabot <Corentin.jabot at gmail.com>
  Date:   2021-12-01 (Wed, 01 Dec 2021)

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

  Log Message:
  [Clang] Fix nesting of discarded and immediate contexts.

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

More information about the All-commits mailing list