[PATCH] D146178: [Clang][Sema] Fix comparison of constraint expressions

Alexander Shaposhnikov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 22 11:28:01 PDT 2023


alexander-shaposhnikov added a comment.

@erichkeane - thanks for the comments, the changes in SemaTemplateInstantiateDecl.cpp are necessary, in particular, they enable us to handle the case

  template <class T0>
  concept Constraint = true;
  
  template <Constraint T1>
  struct Iterator {
    template <Constraint T2>
    friend class Iterator;
  };
  
  Iterator<int*> I;

(and the negative one) 
with the same machinery.
Regarding SFINAE  - it's necessary as well, 
the failed substitution is considered as "not equal" (according to the standard (mentioned by Richard above)).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D146178/new/

https://reviews.llvm.org/D146178



More information about the cfe-commits mailing list