================
@@ -13051,11 +13051,14 @@ class Sema final : public SemaBase {
   /// instantiation arguments.
   ///
   /// \param DC In the event we don't HAVE a declaration yet, we instead 
provide
-  ///  the decl context where it will be created.  In this case, the 
`Innermost`
-  ///  should likely be provided.  If ND is non-null, this is ignored.
+  ///  the decl context where it will be created.  In this case, the \p
+  ///  Innermost should likely be provided.  If \p ND is non-null and \p
+  ///  Innermost is NULL, this is ignored.
   ///
   /// \param Innermost if non-NULL, specifies a template argument list for the
-  /// template declaration passed as ND.
+  /// template declaration passed as \p ND. The next declaration context would
+  /// be switched to \p DC if present; otherwise, it would be the semantic
----------------
mizvekov wrote:

It means the visitation order. In order to collect the instantiation arguments, 
we start with a declaration and walk up toward its template parents. This 
function could use a refactor and be smarter in figuring out how to walk up 
from ND alone, so that the DC parameter becomes unnecessary and could be 
removed.

https://github.com/llvm/llvm-project/pull/102857
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to