[all-commits] [llvm/llvm-project] 726d7b: [Sema] Simplify CheckConstraintSatisfaction. NFC

Ilya Biryukov via All-commits all-commits at lists.llvm.org
Wed May 4 08:53:35 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 726d7b07fcde58c61743c45723c9b614911fe084
      https://github.com/llvm/llvm-project/commit/726d7b07fcde58c61743c45723c9b614911fe084
  Author: Ilya Biryukov <ibiryukov at google.com>
  Date:   2022-05-04 (Wed, 04 May 2022)

  Changed paths:
    M clang/lib/Sema/SemaConcept.cpp

  Log Message:
  -----------
  [Sema] Simplify CheckConstraintSatisfaction. NFC

- 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.

Reviewed By: sammccall

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




More information about the All-commits mailing list