diff options
Diffstat (limited to 'clang/lib/Serialization/ASTReaderDecl.cpp')
-rw-r--r-- | clang/lib/Serialization/ASTReaderDecl.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/clang/lib/Serialization/ASTReaderDecl.cpp b/clang/lib/Serialization/ASTReaderDecl.cpp index fef5f7b8890..11148ebc5ef 100644 --- a/clang/lib/Serialization/ASTReaderDecl.cpp +++ b/clang/lib/Serialization/ASTReaderDecl.cpp @@ -2609,9 +2609,11 @@ Decl *ASTReader::ReadDeclRecord(DeclID ID) { // There are updates. This means the context has external visible // storage, even if the original stored version didn't. LookupDC->setHasExternalVisibleStorage(true); - for (const auto &Update : I->second) - Update.second->DeclContextInfos[DC].NameLookupTableData.reset( - Update.first); + for (const auto &Update : I->second) { + DeclContextInfo &Info = Update.second->DeclContextInfos[DC]; + delete Info.NameLookupTableData; + Info.NameLookupTableData = Update.first; + } PendingVisibleUpdates.erase(I); } } |