[PATCH] D92936: [Sema] Fix deleted function problem in implicitly movable test

Yang Fan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 11 04:57:52 PST 2020


nullptr.cpp added a comment.

Note: The failed test has nothing to do with this patch.



================
Comment at: clang/lib/Sema/SemaInit.cpp:4146
   CXXConstructorDecl *CtorDecl = cast<CXXConstructorDecl>(Best->Function);
-  if (Kind.getKind() == InitializationKind::IK_Default &&
-      Entity.getType().isConstQualified()) {
-    if (!CtorDecl->getParent()->allowConstDefaultInit()) {
-      if (!maybeRecoverWithZeroInitialization(S, Sequence, Entity))
-        Sequence.SetFailed(InitializationSequence::FK_DefaultInitOfConst);
+  if (Result != OR_Deleted) { // TODO: Support for more than one failure.
+    // C++11 [dcl.init]p6:
----------------
I'll send another patch to make Clang report both deleted function error and the following error.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D92936



More information about the cfe-commits mailing list