diff options
author | Dmitri Gribenko <gribozavr@gmail.com> | 2013-06-18 04:02:26 +0000 |
---|---|---|
committer | Dmitri Gribenko <gribozavr@gmail.com> | 2013-06-18 04:02:26 +0000 |
commit | 68effa0d764cf6fc7b6f9729481ee2c6c5143f3b (patch) | |
tree | 19073bfb0c5bf6b77c0353b51504e811c3ce0190 /tools/libclang/CIndexCodeCompletion.cpp | |
parent | 904df3e61a8043c60dc733933219a1e1466de5a6 (diff) | |
download | clang-68effa0d764cf6fc7b6f9729481ee2c6c5143f3b.tar.gz clang-68effa0d764cf6fc7b6f9729481ee2c6c5143f3b.tar.bz2 clang-68effa0d764cf6fc7b6f9729481ee2c6c5143f3b.tar.xz |
ArrayRef'ize CodeCompletionContext::getNumSelIdents()
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184168 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/libclang/CIndexCodeCompletion.cpp')
-rw-r--r-- | tools/libclang/CIndexCodeCompletion.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/tools/libclang/CIndexCodeCompletion.cpp b/tools/libclang/CIndexCodeCompletion.cpp index bfd54f5c00..411728b789 100644 --- a/tools/libclang/CIndexCodeCompletion.cpp +++ b/tools/libclang/CIndexCodeCompletion.cpp @@ -562,15 +562,13 @@ namespace { AllocatedResults.Contexts = getContextsForContextKind(contextKind, S); AllocatedResults.Selector = ""; - if (Context.getNumSelIdents() > 0) { - for (unsigned i = 0; i < Context.getNumSelIdents(); i++) { - IdentifierInfo *selIdent = Context.getSelIdents()[i]; - if (selIdent != NULL) { - StringRef selectorString = Context.getSelIdents()[i]->getName(); - AllocatedResults.Selector += selectorString; - } - 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; } + AllocatedResults.Selector += ":"; } QualType baseType = Context.getBaseType(); |