jcsxky wrote: > We can't go back from non-dependent into dependent.
Sorry, maybe I use the word 'transform' that makes you confused. Actually, what I did in `TransformTemplateName` is transforming a `QualifiedTemplateName` which is dependent due to its qualifier dependency and dependent `DeclContext` to a `DependentTemplateName`. Although the transformed `DependentTemplateName` is also dependent, its qualifier is independent. This make the condition https://github.com/llvm/llvm-project/blob/e7622ab4721141d9e6af6041fa7f9bbc1029e9aa/clang/lib/Sema/SemaTemplate.cpp#L4691 false which holds before this patch. This time the flow goes into https://github.com/llvm/llvm-project/blob/e7622ab4721141d9e6af6041fa7f9bbc1029e9aa/clang/lib/Sema/SemaTemplate.cpp#L4741-L4746 and do the specialization. > Can you elaborate on that? I just tried to create `DependentTemplateName` at https://github.com/llvm/llvm-project/blob/e7622ab4721141d9e6af6041fa7f9bbc1029e9aa/clang/lib/Sema/SemaTemplate.cpp#L297-L298 a few days ago and break several cases which contains the code related to partial specialization. But I didn't dig into the code and give up that approach. https://github.com/llvm/llvm-project/pull/94725 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits