[PATCH] D35056: GCC ABI incompatibility when passing object with trivial copy ctor, trivial dtor, and non-trivial move ctor
Vassil Vassilev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 27 15:49:45 PDT 2017
v.g.vassilev added inline comments.
================
Comment at: lib/Sema/SemaDecl.cpp:14841-14852
+ // If a move constructor or move assignment operator was declared, the
+ // default copy constructors are implicitly deleted, except in one case
+ // related to compatibility with MSVC pre-2015.
+ if (CXXRD->hasUserDeclaredMoveConstructor())
+ CopyOrMoveDeleted = true;
+ if (CXXRD->hasUserDeclaredMoveAssignment()) {
+ const LangOptions &opts = SemaRef.getASTContext().getLangOpts();
----------------
rsmith wrote:
> Do we need this? The above code will have already declared as deleted the relevant operator, so this seems like it can never trigger.
You are right, we do not need it.
https://reviews.llvm.org/D35056
More information about the cfe-commits
mailing list