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)
llvm-svn: 220723

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

index 811dab4..3a3640c 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 76bbd66..e90f9f0 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