forked from OSchip/llvm-project
Fix memory leak of IdentifierIterator object.
llvm-svn: 118371
This commit is contained in:
parent
3e100cf582
commit
b4ea9a843a
|
@ -3000,7 +3000,7 @@ DeclarationName Sema::CorrectTypo(LookupResult &Res, Scope *S, CXXScopeSpec *SS,
|
|||
// Walk through identifiers in external identifier sources.
|
||||
if (IdentifierInfoLookup *External
|
||||
= Context.Idents.getExternalIdentifierLookup()) {
|
||||
IdentifierIterator *Iter = External->getIdentifiers();
|
||||
llvm::OwningPtr<IdentifierIterator> Iter(External->getIdentifiers());
|
||||
do {
|
||||
llvm::StringRef Name = Iter->Next();
|
||||
if (Name.empty())
|
||||
|
|
Loading…
Reference in New Issue