Ensure comparison of constraints creates a code synth context
authorErich Keane <erich.keane@intel.com>
Thu, 18 May 2023 16:05:51 +0000 (09:05 -0700)
committerErich Keane <erich.keane@intel.com>
Thu, 18 May 2023 16:07:42 +0000 (09:07 -0700)
commitfbd8f8985e36581487371e9ff4ac7d99655b51e7
tree502d763aea716dcd4a1e356362720876d5431f3e
parent153d9b9371c3adf719cad4307e395692caa752ac
Ensure comparison of constraints creates a code synth context

This is a regression from 6db007a0 that was reported in:
https://github.com/llvm/llvm-project/issues/62697

The assertion was because we require a code synthesis context for the
instantiation of templates, and this reproducer causes a comparison that
doesn't have a parent-template causing one to exists.

This patch fixes it by creating a ConstraintNormalization context.
clang/lib/Sema/SemaConcept.cpp
clang/test/SemaTemplate/concepts-out-of-line-def.cpp