From: Hans Wennborg Date: Mon, 27 Oct 2014 21:50:49 +0000 (+0000) Subject: Give TypoExprState a move constructor and assignment operator to appease MSVC build X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=14883144671dd4111bfcd6341e20f258e159788b;p=clang Give TypoExprState a move constructor and assignment operator to appease MSVC build git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220723 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Sema/Sema.h b/include/clang/Sema/Sema.h index 811dab4345..3a3640c63e 100644 --- a/include/clang/Sema/Sema.h +++ b/include/clang/Sema/Sema.h @@ -2602,6 +2602,9 @@ private: std::unique_ptr Consumer; TypoDiagnosticGenerator DiagHandler; TypoRecoveryCallback RecoveryHandler; + TypoExprState(); + TypoExprState(TypoExprState&& other); + TypoExprState& operator=(TypoExprState&& other); }; /// \brief The set of unhandled TypoExprs and their associated state. diff --git a/include/clang/Sema/SemaInternal.h b/include/clang/Sema/SemaInternal.h index 76bbd661ca..e90f9f0c50 100644 --- a/include/clang/Sema/SemaInternal.h +++ b/include/clang/Sema/SemaInternal.h @@ -265,6 +265,20 @@ private: bool SearchNamespaces; }; +inline Sema::TypoExprState::TypoExprState() {} + +inline Sema::TypoExprState::TypoExprState(TypoExprState &&other) { + *this = std::move(other); +} + +inline Sema::TypoExprState &Sema::TypoExprState::operator=( + Sema::TypoExprState &&other) { + Consumer = std::move(other.Consumer); + DiagHandler = std::move(other.DiagHandler); + RecoveryHandler = std::move(RecoveryHandler); + return *this; +} + } // end namespace clang #endif