================ @@ -636,6 +636,9 @@ bool Sema::SetupConstraintScope( ? FD->getInstantiatedFromMemberFunction() : FD->getInstantiatedFromDecl(); + if (!InstantiatedFrom) + return true; + ---------------- zyn0217 wrote:
This is unnecessary. For both `TK_MemberSpecialization` and `TK_DependentNonTemplate`, in `FD->getTemplatedKind()`, we had ensured that `getMemberSpecializationInfo()` or `getInstantiatedFromDecl()` would always return non-null. https://github.com/llvm/llvm-project/pull/97913 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits