Deallocate the BasePaths structure that we allocate for LookupResult.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62250 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/Sema.h b/lib/Sema/Sema.h
index eb718f7..cf9f850 100644
--- a/lib/Sema/Sema.h
+++ b/lib/Sema/Sema.h
@@ -638,7 +638,11 @@
       /// by the LookupResult. Last is non-zero to indicate that the
       /// ambiguity is caused by two names found in base class
       /// subobjects of different types.
-      AmbiguousLookup
+      AmbiguousLookup,
+
+      /// We've moved from this object. There should not be any
+      /// attempts to look at its state.
+      Dead
     } StoredKind;
 
     /// The first lookup result, whose contents depend on the kind of
@@ -706,7 +710,9 @@
       AmbiguousBaseSubobjects
     };
 
-    LookupResult() : StoredKind(SingleDecl), First(0), Last(0), Context(0) { }
+    LookupResult() : StoredKind(Dead), First(0), Last(0), Context(0) { }
+
+    LookupResult(const LookupResult& Other);
 
     LookupResult(ASTContext &Context, Decl *D) 
       : StoredKind(SingleDecl), First(reinterpret_cast<uintptr_t>(D)),
@@ -725,6 +731,10 @@
         Last(DifferentSubobjectTypes? 1 : 0),
         Context(&Context) { }
 
+    ~LookupResult();
+
+    LookupResult& operator=(const LookupResult& Other);
+
     LookupKind getKind() const;
 
     /// @brief Determine whether name look found something.