diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-01-15 02:19:31 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-01-15 02:19:31 +0000 |
commit | 41c8ba80de74c45e5ca0987c0f36a27f6e02bb43 (patch) | |
tree | ee8639a3979d1f7005b0fc1748293708bf97124c /clang/lib/Sema/Sema.h | |
parent | bf78b20490f69c1c55794641bd1d5312200eb406 (diff) | |
download | bcm5719-llvm-41c8ba80de74c45e5ca0987c0f36a27f6e02bb43.tar.gz bcm5719-llvm-41c8ba80de74c45e5ca0987c0f36a27f6e02bb43.zip |
Deallocate the BasePaths structure that we allocate for LookupResult.
llvm-svn: 62250
Diffstat (limited to 'clang/lib/Sema/Sema.h')
-rw-r--r-- | clang/lib/Sema/Sema.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/clang/lib/Sema/Sema.h b/clang/lib/Sema/Sema.h index eb718f7f1ad..cf9f8502c72 100644 --- a/clang/lib/Sema/Sema.h +++ b/clang/lib/Sema/Sema.h @@ -638,7 +638,11 @@ public: /// 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 @@ public: 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 @@ public: Last(DifferentSubobjectTypes? 1 : 0), Context(&Context) { } + ~LookupResult(); + + LookupResult& operator=(const LookupResult& Other); + LookupKind getKind() const; /// @brief Determine whether name look found something. |