[PATCH] D126907: Deferred Concept Instantiation Implementation Take 2

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 8 07:10:24 PDT 2022


erichkeane marked 11 inline comments as done.
erichkeane added inline comments.


================
Comment at: clang/include/clang/Sema/Template.h:221-226
+    ArgListsIterator begin() { return TemplateArgumentLists.rbegin(); }
+    ConstArgListsIterator begin() const {
+      return TemplateArgumentLists.rbegin();
+    }
+    ArgListsIterator end() { return TemplateArgumentLists.rend(); }
+    ConstArgListsIterator end() const { return TemplateArgumentLists.rend(); }
----------------
ChuanqiXu wrote:
> The `begin()` and `end()` wrapper use `rbegin` and `rend` here. It is not straight forward. Is it matter?
I was originally doing it for a good reason, though I don't recall it.  Going from 'rbegin' to 'rend' meant we'd be looking at the 'outermost' first (that is:

    template<typename T> struct S{
       template <typename U> void foo(){}
    };

We'd be looking at the list containing 'T' first.  

However, for my use, it doesn't really matter (I just need to flatten the entire list for profile purposes), so I'll switch this to begin/end to be less surprising.


================
Comment at: clang/lib/Sema/SemaConcept.cpp:442-444
+    }
+  } else if (FD->getTemplatedKind() == FunctionDecl::TK_MemberSpecialization ||
+             FD->getTemplatedKind() == FunctionDecl::TK_DependentNonTemplate) {
----------------
ChuanqiXu wrote:
> nit: This is not important but I prefer the style. It makes each logical section shorter and indentation shorter.
I THINK i got this suggestion right?  Phab makes it not particularly clear.


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

https://reviews.llvm.org/D126907



More information about the cfe-commits mailing list