зеркало из https://github.com/microsoft/clang-1.git
From Vassil Vassilev: add checks for removing Decls for more use cases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144094 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
c44bc2d32f
Коммит
d9d137e6bc
|
@ -1622,7 +1622,7 @@ FunctionDecl::setPreviousDeclaration(FunctionDecl *PrevDecl) {
|
|||
FunTmpl->setPreviousDeclaration(PrevFunTmpl);
|
||||
}
|
||||
|
||||
if (PrevDecl->IsInline)
|
||||
if (PrevDecl && PrevDecl->IsInline)
|
||||
IsInline = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -987,7 +987,8 @@ void DeclContext::removeDecl(Decl *D) {
|
|||
|
||||
StoredDeclsMap::iterator Pos = Map->find(ND->getDeclName());
|
||||
assert(Pos != Map->end() && "no lookup entry for decl");
|
||||
Pos->second.remove(ND);
|
||||
if (Pos->second.getAsVector() || Pos->second.getAsDecl() == ND)
|
||||
Pos->second.remove(ND);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче