================
@@ -3286,7 +3287,10 @@ Decl *TemplateDeclInstantiator::VisitCXXMethodDecl(
         TrailingRequiresClause);
     Method->setRangeEnd(Constructor->getEndLoc());
   } else if (CXXDestructorDecl *Destructor = dyn_cast<CXXDestructorDecl>(D)) {
-    Method = CXXDestructorDecl::Create(
+      if (NameInfo.getName().getNameKind() != 
DeclarationName::NameKind::CXXDestructorName) {
+          return nullptr;
+      }
----------------
hardikxk wrote:

```cpp
if (NameInfo.getName().getNameKind() != 
DeclarationName::NameKind::CXXDestructorName)
    return nullptr;
```

Can be simplified to this 

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

Reply via email to