]> granicus.if.org Git - clang/commitdiff
Give TypoExprState a move constructor and assignment operator to appease MSVC build
authorHans Wennborg <hans@hanshq.net>
Mon, 27 Oct 2014 21:50:49 +0000 (21:50 +0000)
committerHans Wennborg <hans@hanshq.net>
Mon, 27 Oct 2014 21:50:49 +0000 (21:50 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220723 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Sema/Sema.h
include/clang/Sema/SemaInternal.h

index 811dab4345aeb7816405be1fcf7ef3592699e7d6..3a3640c63e7fd7e63bde6e0493b893a7afefd828 100644 (file)
@@ -2602,6 +2602,9 @@ private:
     std::unique_ptr<TypoCorrectionConsumer> Consumer;
     TypoDiagnosticGenerator DiagHandler;
     TypoRecoveryCallback RecoveryHandler;
+    TypoExprState();
+    TypoExprState(TypoExprState&& other);
+    TypoExprState& operator=(TypoExprState&& other);
   };
 
   /// \brief The set of unhandled TypoExprs and their associated state.
index 76bbd661ca761a5ddfecb36cb06445f7abec4555..e90f9f0c502f6fc71d11ddab9bce341362b07f8f 100644 (file)
@@ -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