================
@@ -6101,7 +6101,17 @@ Sema::GetNameFromUnqualifiedId(const UnqualifiedId 
&Name) {
   }
 
   case UnqualifiedIdKind::IK_TemplateId: {
+    if (!Name.TemplateId)
+      return DeclarationNameInfo();
+
+    if (Name.TemplateId->isInvalid())
+      return DeclarationNameInfo();
+
     TemplateName TName = Name.TemplateId->Template.get();
+
+    if (TName.isNull())
+      return DeclarationNameInfo();
----------------
zwuis wrote:

Please explain why we need three `if` here, and please remove unnecessary `if` 
until finding reproducers.

https://github.com/llvm/llvm-project/pull/181404
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to