summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-03-05 01:35:54 +0000
committerDouglas Gregor <dgregor@apple.com>2011-03-05 01:35:54 +0000
commit250ffb1fcb79ee8783e3c42f3232e6700dee36b8 (patch)
treed34d0d7da729cd345da1d6c1b1733364a616f13a /clang/lib/AST
parent930e3ad51e23e6ef29657d607173faf3e0e2b7b8 (diff)
downloadbcm5719-llvm-250ffb1fcb79ee8783e3c42f3232e6700dee36b8.tar.gz
bcm5719-llvm-250ffb1fcb79ee8783e3c42f3232e6700dee36b8.zip
When we're deserializing a template parameter declaration, temporarily
use the translation unit as its declaration context, then deserialize the actual lexical and semantic DeclContexts after the template parameter is complete. This avoids problems when the DeclContext itself (e.g., a class template) is dependent on the template parameter (e.g., for the injected-class-name). llvm-svn: 127056
Diffstat (limited to 'clang/lib/AST')
-rw-r--r--clang/lib/AST/DeclBase.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/clang/lib/AST/DeclBase.cpp b/clang/lib/AST/DeclBase.cpp
index 0642f423c6f..8d6a5412a55 100644
--- a/clang/lib/AST/DeclBase.cpp
+++ b/clang/lib/AST/DeclBase.cpp
@@ -173,9 +173,6 @@ void PrettyStackTraceDecl::print(llvm::raw_ostream &OS) const {
Decl::~Decl() { }
void Decl::setDeclContext(DeclContext *DC) {
- if (isOutOfSemaDC())
- delete getMultipleDC();
-
DeclCtx = DC;
}
OpenPOWER on IntegriCloud