- Exit early when constraint caching is disabled.
- Use unique_ptr to manage temporary lifetime.
- Fix a typo in a comment (InsertPos instead of InsertNode).
The new code duplicates the forwarding call to CheckConstraintSatisfaction,
but reduces the number of interconnected if statements and simplifies lifetime
management.
This increases the overall readability.
Another loose end that could be cleaned up sometime!
ConceptSatisfactionCaching is on by default and controlled by an -f flag.
It was added in https://reviews.llvm.org/D72552 - essential for performance, unclear whether the caching scheme was allowed.
Probably this option should be removed (and if needed, the caching scheme semantics made to match what was standardized)