[clang] [clang] [C++20] Defaulted operator== doesn't lookup in using-directive properly #97087 (PR #99542)

Vlad Serebrennikov via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 23 03:36:37 PDT 2024


================
@@ -4856,7 +4856,7 @@ bool TemplateDeclInstantiator::SubstDefaultedFunction(FunctionDecl *New,
                    : DFI);
   }
 
-  SemaRef.SetDeclDefaulted(New, Tmpl->getLocation());
+  SemaRef.SetDeclDefaulted(nullptr, New, Tmpl->getLocation());
----------------
Endilll wrote:

I did wonder if my new test (https://godbolt.org/z/hE3h4b4oM) with class template would fail on `nullptr`s in `SemaTemplateInstantiateDecl.cpp`, but I guess it doesn't. Could there be a scope that we should pass here, too?
CC @cor3ntin @mizvekov 

https://github.com/llvm/llvm-project/pull/99542


More information about the cfe-commits mailing list