[PATCH] D148474: [Clang] Fix ResolveConstructorOverload to not select a conversion function if we are going use copy elision

Shafik Yaghmour via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Apr 16 12:04:07 PDT 2023


shafik added inline comments.


================
Comment at: clang/lib/Sema/SemaTemplateInstantiate.cpp:743
             << FD << Active->InstantiationRange;
+      } else if (ClassTemplateDecl *CTD = dyn_cast<ClassTemplateDecl>(D)) {
+        Diags.Report(Active->PointOfInstantiation,
----------------
I added this fix because the `B3` test case I added below although was fixed by my patch it uncovered a new bug that resulted in the compiler locking up.

It looks like the malformed code results in a us seeing a `ClassTemplateDecl` where we would usually not expect it. If this handled better earlier let me know.




CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D148474/new/

https://reviews.llvm.org/D148474



More information about the cfe-commits mailing list