[all-commits] [llvm/llvm-project] 2cee26: [Concepts] Correctly handle failure when checking ...

Erich Keane via All-commits all-commits at lists.llvm.org
Tue Nov 1 12:19:14 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2cee2663338ee65ff5786432c30ba22c8dcd711b
      https://github.com/llvm/llvm-project/commit/2cee2663338ee65ff5786432c30ba22c8dcd711b
  Author: Erich Keane <erich.keane at intel.com>
  Date:   2022-11-01 (Tue, 01 Nov 2022)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/include/clang/Sema/Sema.h
    M clang/lib/Sema/SemaConcept.cpp
    M clang/lib/Sema/SemaDeclCXX.cpp
    M clang/lib/Sema/SemaOverload.cpp
    R clang/test/SemaTemplate/concepts-GH53213.cpp
    A clang/test/SemaTemplate/concepts-recursive-inst.cpp

  Log Message:
  -----------
  [Concepts] Correctly handle failure when checking concepts recursively

Based on discussion on the core reflector, it was made clear that a
concept that depends on itself should be a hard error, not a constraint
failure. This patch implements a stack of constraint-checks-in-progress
to make sure we quit, rather than hitting stack-exhaustion.

Note that we DO need to be careful to make sure we still check
constraints properly that are caused by a previous constraint, but not
derived from (such as when a check causes us to check special member
function generation), so we cannot use the existing logic to see if this
is being instantiated.

This fixes https://github.com/llvm/llvm-project/issues/44304 and
https://github.com/llvm/llvm-project/issues/50891.

Differential Revision: https://reviews.llvm.org/D136975




More information about the All-commits mailing list