Simplify a loop in ProcessCodeCompleteResults(). Pointed out by David Blaikie

llvm-svn: 184169
This commit is contained in:
Dmitri Gribenko 2013-06-18 04:41:50 +00:00
parent 9fdd7e6d27
commit 3f31bd185a
1 changed files with 6 additions and 6 deletions

View File

@ -562,12 +562,12 @@ namespace {
AllocatedResults.Contexts = getContextsForContextKind(contextKind, S); AllocatedResults.Contexts = getContextsForContextKind(contextKind, S);
AllocatedResults.Selector = ""; AllocatedResults.Selector = "";
for (unsigned i = 0, e = Context.getSelIdents().size(); i != e; i++) { ArrayRef<IdentifierInfo *> SelIdents = Context.getSelIdents();
IdentifierInfo *selIdent = Context.getSelIdents()[i]; for (ArrayRef<IdentifierInfo *>::iterator I = SelIdents.begin(),
if (selIdent != NULL) { E = SelIdents.end();
StringRef selectorString = Context.getSelIdents()[i]->getName(); I != E; ++I) {
AllocatedResults.Selector += selectorString; if (IdentifierInfo *selIdent = *I)
} AllocatedResults.Selector += selIdent->getName();
AllocatedResults.Selector += ":"; AllocatedResults.Selector += ":";
} }