diff options
Diffstat (limited to 'lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp')
-rw-r--r-- | lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp index b0043f9c0f6..42927ab6cc8 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp +++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp @@ -530,20 +530,6 @@ void ClangASTSource::FindExternalLexicalDecls( m_ast_importer_sp->RequireCompleteType(copied_field_type); } - auto decl_context_non_const = const_cast<DeclContext *>(decl_context); - - // The decl ended up in the wrong DeclContext. Let's fix that so - // the decl we copied will actually be found. - // FIXME: This is a horrible hack that shouldn't be necessary. However - // it seems our current setup sometimes fails to copy decls to the right - // place. See rdar://55129537. - if (copied_decl->getDeclContext() != decl_context) { - assert(copied_decl->getDeclContext()->containsDecl(copied_decl)); - copied_decl->getDeclContext()->removeDecl(copied_decl); - copied_decl->setDeclContext(decl_context_non_const); - assert(!decl_context_non_const->containsDecl(copied_decl)); - decl_context_non_const->addDeclInternal(copied_decl); - } } else { SkippedDecls = true; } |