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.Selector = "";
for (unsigned i = 0, e = Context.getSelIdents().size(); i != e; i++) {
IdentifierInfo *selIdent = Context.getSelIdents()[i];
if (selIdent != NULL) {
StringRef selectorString = Context.getSelIdents()[i]->getName();
AllocatedResults.Selector += selectorString;
}
ArrayRef<IdentifierInfo *> SelIdents = Context.getSelIdents();
for (ArrayRef<IdentifierInfo *>::iterator I = SelIdents.begin(),
E = SelIdents.end();
I != E; ++I) {
if (IdentifierInfo *selIdent = *I)
AllocatedResults.Selector += selIdent->getName();
AllocatedResults.Selector += ":";
}