Use the proper arguments to remove items.
This commit is contained in:
committed by
sftnight
parent
3dd8d2e900
commit
4b0b984d63
@ -573,10 +573,12 @@ namespace clang {
|
|||||||
|
|
||||||
bool DeclUnloader::VisitDeclaratorDecl(DeclaratorDecl* DD) {
|
bool DeclUnloader::VisitDeclaratorDecl(DeclaratorDecl* DD) {
|
||||||
// VisitDeclaratorDecl: ValueDecl
|
// VisitDeclaratorDecl: ValueDecl
|
||||||
auto found = std::find(m_Sema->UnusedFileScopedDecls.begin(/*ExtSource*/0),
|
auto found = std::find(m_Sema->UnusedFileScopedDecls.begin(/*ExtSource*/0,
|
||||||
|
/*Local*/true),
|
||||||
m_Sema->UnusedFileScopedDecls.end(), DD);
|
m_Sema->UnusedFileScopedDecls.end(), DD);
|
||||||
if (found != m_Sema->UnusedFileScopedDecls.end())
|
if (found != m_Sema->UnusedFileScopedDecls.end())
|
||||||
m_Sema->UnusedFileScopedDecls.erase(found, found);
|
m_Sema->UnusedFileScopedDecls.erase(found,
|
||||||
|
m_Sema->UnusedFileScopedDecls.end());
|
||||||
|
|
||||||
return VisitValueDecl(DD);
|
return VisitValueDecl(DD);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user