[PATCH] D132906: [Clang] Fix lambda CheckForDefaultedFunction(...) so that it checks the CXXMethodDecl is a special member function before attempting to call DefineDefaultedFunction(...)

Shafik Yaghmour via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 30 18:05:28 PDT 2022


shafik added inline comments.


================
Comment at: clang/lib/Sema/SemaDeclCXX.cpp:6957
     // FIXME: We can defer doing this until the vtable is marked as used.
-    if (M->isDefaulted() && M->isConstexpr() && M->size_overridden_methods())
+    if (CSM != CXXInvalid && M->isDefaulted() && M->isConstexpr() &&
+        M->size_overridden_methods())
----------------
I realized that based on the constraints on the functions called in `DefineDefaultedFunction` we also should be checking `isDeleted()` as well but based on the way I drafted this PR I should just do a follow-up.


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

https://reviews.llvm.org/D132906



More information about the cfe-commits mailing list