diff options
Diffstat (limited to 'lib/AST/Decl.cpp')
-rw-r--r-- | lib/AST/Decl.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp index 8521b9b44e..f29417ed13 100644 --- a/lib/AST/Decl.cpp +++ b/lib/AST/Decl.cpp @@ -164,6 +164,13 @@ FileScopeAsmDecl *FileScopeAsmDecl::Create(ASTContext &C, // ScopedDecl Implementation //===----------------------------------------------------------------------===// +void ScopedDecl::setDeclContext(DeclContext *DC) { + if (isOutOfSemaDC()) + delete getMultipleDC(); + + DeclCtx = reinterpret_cast<uintptr_t>(DC); +} + void ScopedDecl::setLexicalDeclContext(DeclContext *DC) { if (DC == getLexicalDeclContext()) return; |