[Concepts] Fix an assert when trying to form a recovery expr on a
authorErich Keane <erich.keane@intel.com>
Fri, 28 Oct 2022 17:02:04 +0000 (10:02 -0700)
committerErich Keane <erich.keane@intel.com>
Fri, 28 Oct 2022 17:25:34 +0000 (10:25 -0700)
commitb9a77b56d83ac788beb7b1743e510ef8534354ca
tree46ae614d351d76551c9570048c35425b1292081c
parent69b2b7282e92a1b576b7bd26f3b16716a5027e8e
[Concepts] Fix an assert when trying to form a recovery expr on a
concept

When we failed the lookup of the function, we tried to form a
RecoveryExpr that caused us to recursively re-check the same constraint,
which caused us to try to double-insert the satisfaction into the cache.

This patch makes us just return the inner-cached version instead. We DO
end up double-evaluating thanks to the recovery-expr, but there isn't a
good way around that.
clang/docs/ReleaseNotes.rst
clang/lib/Sema/SemaConcept.cpp
clang/test/SemaTemplate/concepts-GH53213.cpp [new file with mode: 0644]