alexander-shaposhnikov added inline comments.

================
Comment at: clang/lib/Sema/SemaCXXScopeSpec.cpp:141
+              ClassTemplate->getInjectedClassNameSpecialization();
+          if (Context.hasSameType(Injected, ContextType))
+            return ClassTemplate->getTemplatedDecl();
----------------
rsmith wrote:
> This should also be guarded by a check that `TemplateParameterListsAreEqual` 
> between `ClassTemplate->getTemplateParameters()` and the template parameter 
> list we picked out of the given array of template parameter lists.
> 
> (With that check in place, we can move this back before the search for 
> partial specializations.)
The problem is that currently the template parameter list (the one which we are 
supposed to pick above) is not always present,
thus the fallback and this check are both still necessary. It happens e.g. for 
invalid code and if i remove the fallback it triggers more changes to the 
diagnostic output, other than that there might be more cases where we currently 
don't set TemplateParamLists for CXXScopeSpec, i kinda wanted to move 
incrementally.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D145034

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATCH] D145034: ... Alexander Shaposhnikov via Phabricator via cfe-commits

Reply via email to