]> git.ipfire.org Git - thirdparty/gcc.git/commit
c++: simplify norm_cache manipulation
authorPatrick Palka <ppalka@redhat.com>
Fri, 19 May 2023 13:58:20 +0000 (09:58 -0400)
committerPatrick Palka <ppalka@redhat.com>
Fri, 19 May 2023 13:58:20 +0000 (09:58 -0400)
commitc5709fc87131bea0013cb67cf80bdea6e238c918
treee791a9ac038cb6cba6de2e837a6cd25f5e81cb61
parentef8926d23a458560b8e9be1a76cf29ddcb87ec2a
c++: simplify norm_cache manipulation

We can avoid performing two norm_cache lookups during normalization of a
concept-id by allocating and inserting a norm_entry* before rather than
after the fact, which is simpler and cheaper.

gcc/cp/ChangeLog:

* constraint.cc (normalize_concept_check): Avoid having to do
two norm_cache lookups.  Remove unnecessary early exit for an
ill-formed concept definition.
gcc/cp/constraint.cc