Lines Matching refs:Results
41 /// \brief A container of code-completion results.
53 /// \brief The actual results we have found.
54 std::vector<Result> Results;
89 // 1 -> 2 elements: create the vector of results and push in the
117 /// results.
120 /// \brief The semantic analysis object for which results are being
130 /// results that are not desirable.
158 /// \brief The completion context in which we are gathering results.
200 /// results.
206 /// \brief Set the filter used for code-completion results.
211 Result *data() { return Results.empty()? 0 : &Results.front(); }
212 unsigned size() const { return Results.size(); }
213 bool empty() const { return Results.empty(); }
241 /// \brief Retrieve the code-completion context for which results are
253 /// code completion results.
317 /// results of name lookup. All of the predicates have the same type, so that
490 // added as results.
494 // Class template (partial) specializations are never added as results.
499 // Using declarations themselves are never added as results.
531 // Filter out any unwanted results.
714 // If we have a preferred type, adjust the priority for results with exactly-
764 Results.push_back(R);
769 assert(!ShadowMaps.empty() && "Must enter into a results scope");
772 // For non-declaration results, just add the result.
773 Results.push_back(R);
807 Results[Index].Declaration = R.Declaration;
872 // Insert this result into the set of results and into the current shadow
874 SMap[R.Declaration->getDeclName()].Add(R.Declaration, Results.size());
875 Results.push_back(R);
884 // For non-declaration results, just add the result.
885 Results.push_back(R);
954 // Insert this result into the set of results.
955 Results.push_back(R);
963 "Declaration results need more context");
964 Results.push_back(R);
1194 ResultBuilder &Results;
1198 CodeCompletionDeclConsumer(ResultBuilder &Results, DeclContext *CurContext)
1199 : Results(Results), CurContext(CurContext) { }
1205 Accessible = Results.getSema().IsSimplyAccessible(ND, Ctx);
1208 Results.AddResult(Result, CurContext, Hiding, InBaseClass);
1213 /// \brief Add type specifiers for the current language as keyword results.
1215 ResultBuilder &Results) {
1217 Results.AddResult(Result("short", CCP_Type));
1218 Results.AddResult(Result("long", CCP_Type));
1219 Results.AddResult(Result("signed", CCP_Type));
1220 Results.AddResult(Result("unsigned", CCP_Type));
1221 Results.AddResult(Result("void", CCP_Type));
1222 Results.AddResult(Result("char", CCP_Type));
1223 Results.AddResult(Result("int", CCP_Type));
1224 Results.AddResult(Result("float", CCP_Type));
1225 Results.AddResult(Result("double", CCP_Type));
1226 Results.AddResult(Result("enum", CCP_Type));
1227 Results.AddResult(Result("struct", CCP_Type));
1228 Results.AddResult(Result("union", CCP_Type));
1229 Results.AddResult(Result("const", CCP_Type));
1230 Results.AddResult(Result("volatile", CCP_Type));
1234 Results.AddResult(Result("_Complex", CCP_Type));
1235 Results.AddResult(Result("_Imaginary", CCP_Type));
1236 Results.AddResult(Result("_Bool", CCP_Type));
1237 Results.AddResult(Result("restrict", CCP_Type));
1240 CodeCompletionBuilder Builder(Results.getAllocator(),
1241 Results.getCodeCompletionTUInfo());
1244 Results.AddResult(Result("bool", CCP_Type +
1246 Results.AddResult(Result("class", CCP_Type));
1247 Results.AddResult(Result("wchar_t", CCP_Type));
1255 Results.AddResult(Result(Builder.TakeString()));
1258 Results.AddResult(Result("auto", CCP_Type));
1259 Results.AddResult(Result("char16_t", CCP_Type));
1260 Results.AddResult(Result("char32_t", CCP_Type));
1266 Results.AddResult(Result(Builder.TakeString()));
1273 // Results.AddResult(Result("_Decimal32"));
1274 // Results.AddResult(Result("_Decimal64"));
1275 // Results.AddResult(Result("_Decimal128"));
1280 Results.AddResult(Result(Builder.TakeString()));
1286 Results.AddResult(Result(Builder.TakeString()));
1292 ResultBuilder &Results) {
1297 Results.AddResult(Result("extern"));
1298 Results.AddResult(Result("static"));
1303 ResultBuilder &Results) {
1309 Results.AddResult(Result("explicit"));
1310 Results.AddResult(Result("friend"));
1311 Results.AddResult(Result("mutable"));
1312 Results.AddResult(Result("virtual"));
1321 Results.AddResult(Result("inline"));
1337 static void AddObjCExpressionResults(ResultBuilder &Results, bool NeedAt);
1338 static void AddObjCStatementResults(ResultBuilder &Results, bool NeedAt);
1340 ResultBuilder &Results,
1343 ResultBuilder &Results,
1346 ResultBuilder &Results,
1348 static void AddObjCTopLevelResults(ResultBuilder &Results, bool NeedAt);
1350 static void AddTypedefResult(ResultBuilder &Results) {
1351 CodeCompletionBuilder Builder(Results.getAllocator(),
1352 Results.getCodeCompletionTUInfo());
1358 Results.AddResult(CodeCompletionResult(Builder.TakeString()));
1439 static void addThisCompletion(Sema &S, ResultBuilder &Results) {
1444 CodeCompletionAllocator &Allocator = Results.getAllocator();
1445 CodeCompletionBuilder Builder(Allocator, Results.getCodeCompletionTUInfo());
1452 Results.AddResult(CodeCompletionResult(Builder.TakeString()));
1459 ResultBuilder &Results) {
1460 CodeCompletionAllocator &Allocator = Results.getAllocator();
1461 CodeCompletionBuilder Builder(Allocator, Results.getCodeCompletionTUInfo());
1468 if (Results.includeCodePatterns()) {
1477 Results.AddResult(Result(Builder.TakeString()));
1486 Results.AddResult(Result(Builder.TakeString()));
1494 Results.AddResult(Result(Builder.TakeString()));
1501 Results.AddResult(Result(Builder.TakeString()));
1503 if (Results.includeCodePatterns()) {
1508 Results.AddResult(Result(Builder.TakeString()));
1513 AddObjCTopLevelResults(Results, true);
1515 AddTypedefResult(Results);
1526 Results.AddResult(Result(Builder.TakeString()));
1537 Results.AddResult(Result(Builder.TakeString()));
1541 AddTypedefResult(Results);
1545 if (Results.includeCodePatterns())
1547 Results.AddResult(Result(Builder.TakeString()));
1551 if (Results.includeCodePatterns())
1553 Results.AddResult(Result(Builder.TakeString()));
1557 if (Results.includeCodePatterns())
1559 Results.AddResult(Result(Builder.TakeString()));
1566 if (SemaRef.getLangOpts().CPlusPlus && Results.includeCodePatterns()) {
1572 Results.AddResult(Result(Builder.TakeString()));
1575 AddStorageSpecifiers(CCC, SemaRef.getLangOpts(), Results);
1576 AddFunctionSpecifiers(CCC, SemaRef.getLangOpts(), Results);
1580 AddObjCInterfaceResults(SemaRef.getLangOpts(), Results, true);
1581 AddStorageSpecifiers(CCC, SemaRef.getLangOpts(), Results);
1582 AddFunctionSpecifiers(CCC, SemaRef.getLangOpts(), Results);
1586 AddObjCImplementationResults(SemaRef.getLangOpts(), Results, true);
1587 AddStorageSpecifiers(CCC, SemaRef.getLangOpts(), Results);
1588 AddFunctionSpecifiers(CCC, SemaRef.getLangOpts(), Results);
1592 AddObjCVisibilityResults(SemaRef.getLangOpts(), Results, true);
1597 AddTypedefResult(Results);
1599 if (SemaRef.getLangOpts().CPlusPlus && Results.includeCodePatterns() &&
1614 Results.AddResult(Result(Builder.TakeString()));
1617 AddObjCStatementResults(Results, true);
1619 if (Results.includeCodePatterns()) {
1632 Results.AddResult(Result(Builder.TakeString()));
1645 Results.AddResult(Result(Builder.TakeString()));
1655 Results.AddResult(Result(Builder.TakeString()));
1660 Results.AddResult(Result(Builder.TakeString()));
1663 if (Results.includeCodePatterns()) {
1676 Results.AddResult(Result(Builder.TakeString()));
1688 Results.AddResult(Result(Builder.TakeString()));
1707 Results.AddResult(Result(Builder.TakeString()));
1713 Results.AddResult(Result(Builder.TakeString()));
1719 Results.AddResult(Result(Builder.TakeString()));
1738 Results.AddResult(Result(Builder.TakeString()));
1744 Results.AddResult(Result(Builder.TakeString()));
1752 Results.AddResult(Result(Builder.TakeString()));
1758 AddStorageSpecifiers(CCC, SemaRef.getLangOpts(), Results);
1770 Results.AddResult(Result(Builder.TakeString()));
1778 Results.AddResult(Result(Builder.TakeString()));
1786 Results.AddResult(Result(Builder.TakeString()));
1793 addThisCompletion(SemaRef, Results);
1798 Results.AddResult(Result(Builder.TakeString()));
1803 Results.AddResult(Result(Builder.TakeString()));
1814 Results.AddResult(Result(Builder.TakeString()));
1825 Results.AddResult(Result(Builder.TakeString()));
1835 Results.AddResult(Result(Builder.TakeString()));
1845 Results.AddResult(Result(Builder.TakeString()));
1854 Results.AddResult(Result(Builder.TakeString()));
1864 Results.AddResult(Result(Builder.TakeString()));
1876 Results.AddResult(Result(Builder.TakeString()));
1883 Results.AddResult(Result(Builder.TakeString()));
1893 Results.AddResult(Result(Builder.TakeString()));
1901 Results.AddResult(Result(Builder.TakeString()));
1910 Results.AddResult(Result(Builder.TakeString()));
1918 Results.AddResult(Result(Builder.TakeString()));
1926 Results.AddResult(Result(Builder.TakeString()));
1934 Results.AddResult(Result(Builder.TakeString()));
1951 Results.AddResult(Result(Builder.TakeString()));
1955 AddObjCExpressionResults(Results, true);
1964 Results.AddResult(Result(Builder.TakeString()));
1974 AddTypeSpecifierResults(SemaRef.getLangOpts(), Results);
1977 Results.AddResult(Result("operator"));
2874 static void AddMacroResults(Preprocessor &PP, ResultBuilder &Results,
2878 Results.EnterNewScope();
2883 Results.AddResult(Result(M->first,
2889 Results.ExitScope();
2894 ResultBuilder &Results) {
2897 Results.EnterNewScope();
2899 Results.AddResult(Result("__PRETTY_FUNCTION__", CCP_Constant));
2900 Results.AddResult(Result("__FUNCTION__", CCP_Constant));
2902 Results.AddResult(Result("__func__", CCP_Constant));
2903 Results.ExitScope();
2909 CodeCompletionResult *Results,
2912 CodeCompleter->ProcessCodeCompleteResults(*S, Context, Results, NumResults);
2971 /// \brief If we're in a C++ virtual member function, add completion results
2975 /// \param S The semantic analysis object for which we are generating results.
2980 ResultBuilder &Results) {
3005 CodeCompletionBuilder Builder(Results.getAllocator(),
3006 Results.getCodeCompletionTUInfo());
3020 Builder.AddTextChunk(Results.getAllocator().CopyString(OS.str()));
3025 Builder.AddTypedTextChunk(Results.getAllocator().CopyString(
3037 Builder.AddPlaceholderChunk(Results.getAllocator().CopyString(
3041 Results.AddResult(CodeCompletionResult(Builder.TakeString(),
3046 Results.Ignore(Overridden);
3053 ResultBuilder Results(*this, CodeCompleter->getAllocator(),
3056 Results.EnterNewScope();
3058 CodeCompletionAllocator &Allocator = Results.getAllocator();
3059 CodeCompletionBuilder Builder(Allocator, Results.getCodeCompletionTUInfo());
3068 Results.AddResult(Result(Builder.TakeString(),
3088 Results.AddResult(Result(Builder.TakeString(),
3097 Results.ExitScope();
3098 HandleCodeCompleteResults(this, CodeCompleter, Results.getCompletionContext(),
3099 Results.data(),Results.size());
3105 ResultBuilder Results(*this, CodeCompleter->getAllocator(),
3108 Results.EnterNewScope();
3110 // Determine how to filter results, e.g., so that the names of
3123 Results.setFilter(&ResultBuilder::IsOrdinaryNonValueName);
3132 Results.setFilter(&ResultBuilder::IsOrdinaryName);
3134 Results.setFilter(&ResultBuilder::IsOrdinaryNonTypeName);
3137 MaybeAddOverrideCalls(*this, /*InContext=*/0, Results);
3146 // the member function to filter/prioritize the results list.
3149 Results.setObjectTypeQualifiers(
3152 CodeCompletionDeclConsumer Consumer(Results, CurContext);
3156 AddOrdinaryNameResults(CompletionContext, S, *this, Results);
3157 Results.ExitScope();
3165 AddPrettyFunctionResults(PP.getLangOpts(), Results);
3183 AddMacroResults(PP, Results);
3185 HandleCodeCompleteResults(this, CodeCompleter, Results.getCompletionContext(),
3186 Results.data(),Results.size());
3195 ResultBuilder &Results);
3201 ResultBuilder Results(*this, CodeCompleter->getAllocator(),
3206 Results.EnterNewScope();
3209 Results.AddResult(Result("const"));
3210 Results.AddResult(Result("volatile"));
3212 Results.AddResult(Result("restrict"));
3216 Results.AddResult(Result("operator"));
3221 Results.allowNestedNameSpecifiers();
3222 Results.setFilter(&ResultBuilder::IsImpossibleToSatisfy);
3223 CodeCompletionDeclConsumer Consumer(Results, CurContext);
3226 Results.setFilter(0);
3229 Results.ExitScope();
3249 AddClassMessageCompletions(*this, S, T, 0, 0, false, false, Results);
3252 // Note that we intentionally suppress macro results here, since we do not
3256 Results.getCompletionContext(),
3257 Results.data(), Results.size());
3279 ResultBuilder Results(*this, CodeCompleter->getAllocator(),
3283 Results.setFilter(&ResultBuilder::IsObjCCollection);
3285 Results.setFilter(&ResultBuilder::IsIntegralConstantValue);
3287 Results.setFilter(&ResultBuilder::IsOrdinaryName);
3289 Results.setFilter(&ResultBuilder::IsOrdinaryNonTypeName);
3292 Results.setPreferredType(Data.PreferredType.getNonReferenceType());
3296 Results.Ignore(Data.IgnoreDecls[I]);
3298 CodeCompletionDeclConsumer Consumer(Results, CurContext);
3302 Results.EnterNewScope();
3303 AddOrdinaryNameResults(PCC_Expression, S, *this, Results);
3304 Results.ExitScope();
3315 AddPrettyFunctionResults(PP.getLangOpts(), Results);
3318 AddMacroResults(PP, Results, PreferredTypeIsPointer);
3322 Results.data(),Results.size());
3341 ResultBuilder &Results) {
3350 Results.MaybeAddResult(Result(*P, 0), CurContext);
3356 PrintingPolicy Policy = getCompletionPrintingPolicy(Results.getSema());
3363 CodeCompletionBuilder Builder(Results.getAllocator(),
3364 Results.getCodeCompletionTUInfo());
3367 Results.getAllocator().CopyString(Name->getName()));
3369 Results.MaybeAddResult(Result(Builder.TakeString(), *M,
3383 AddedProperties, Results);
3390 CurContext, AddedProperties, Results);
3398 AddedProperties, Results);
3404 AddedProperties, Results);
3412 AddedProperties, Results);
3455 ResultBuilder Results(*this, CodeCompleter->getAllocator(),
3460 Results.EnterNewScope();
3464 Results.setObjectTypeQualifiers(BaseType.getQualifiers());
3467 Results.allowNestedNameSpecifiers();
3468 CodeCompletionDeclConsumer Consumer(Results, CurContext);
3473 if (!Results.empty()) {
3487 Results.AddResult(Result("template"));
3494 // Add property results based on our interface.
3500 AddedProperties, Results);
3507 AddedProperties, Results);
3520 CodeCompletionDeclConsumer Consumer(Results, CurContext);
3521 Results.setFilter(&ResultBuilder::IsObjCIvar);
3529 Results.ExitScope();
3531 // Hand off the results found for code completion.
3533 Results.getCompletionContext(),
3534 Results.data(),Results.size());
3566 ResultBuilder Results(*this, CodeCompleter->getAllocator(),
3568 CodeCompletionDeclConsumer Consumer(Results, CurContext);
3571 Results.setFilter(Filter);
3577 Results.setFilter(&ResultBuilder::IsNestedNameSpecifier);
3581 HandleCodeCompleteResults(this, CodeCompleter, Results.getCompletionContext(),
3582 Results.data(),Results.size());
3586 ResultBuilder Results(*this, CodeCompleter->getAllocator(),
3589 Results.EnterNewScope();
3591 Results.AddResult("const");
3593 Results.AddResult("volatile");
3596 Results.AddResult("restrict");
3597 Results.ExitScope();
3599 Results.getCompletionContext(),
3600 Results.data(), Results.size());
3667 ResultBuilder Results(*this, CodeCompleter->getAllocator(),
3670 Results.EnterNewScope();
3679 Results.AddResult(R, CurContext, 0, false);
3681 Results.ExitScope();
3687 AddMacroResults(PP, Results);
3693 Results.data(),Results.size());
3730 // results. We may want to revisit this strategy in the future,
3731 // e.g., by merging the two kinds of results.
3751 SmallVector<ResultCandidate, 8> Results;
3762 Results.push_back(ResultCandidate(FDecl));
3782 Results.push_back(ResultCandidate(Cand->Function));
3786 for (unsigned I = 0, N = Results.size(); I != N; ++I) {
3787 if (const FunctionType *FType = Results[I].getFunctionType())
3825 if (!Results.empty())
3826 CodeCompleter->ProcessOverloadCandidates(*this, Args.size(), Results.data(),
3827 Results.size());
3858 ResultBuilder Results(*this, CodeCompleter->getAllocator(),
3861 Results.setFilter(&ResultBuilder::IsOrdinaryName);
3862 Results.EnterNewScope();
3864 CodeCompletionDeclConsumer Consumer(Results, CurContext);
3868 AddOrdinaryNameResults(PCC_Statement, S, *this, Results);
3871 CodeCompletionBuilder Builder(Results.getAllocator(),
3872 Results.getCodeCompletionTUInfo());
3874 if (Results.includeCodePatterns()) {
3882 Results.AddResult(Builder.TakeString());
3895 if (Results.includeCodePatterns()) {
3903 Results.AddResult(Builder.TakeString());
3905 Results.ExitScope();
3908 AddPrettyFunctionResults(PP.getLangOpts(), Results);
3911 AddMacroResults(PP, Results);
3913 HandleCodeCompleteResults(this, CodeCompleter, Results.getCompletionContext(),
3914 Results.data(),Results.size());
3938 ResultBuilder Results(*this, CodeCompleter->getAllocator(),
3941 Results.EnterNewScope();
3946 if (!Results.empty() && NNS->isDependent())
3947 Results.AddResult("template");
3955 MaybeAddOverrideCalls(*this, Ctx, Results);
3956 Results.ExitScope();
3958 CodeCompletionDeclConsumer Consumer(Results, CurContext);
3962 Results.getCompletionContext(),
3963 Results.data(),Results.size());
3970 ResultBuilder Results(*this, CodeCompleter->getAllocator(),
3974 Results.EnterNewScope();
3978 Results.AddResult(CodeCompletionResult("namespace"));
3982 CodeCompletionDeclConsumer Consumer(Results, CurContext);
3985 Results.ExitScope();
3989 Results.data(),Results.size());
3998 ResultBuilder Results(*this, CodeCompleter->getAllocator(),
4002 Results.EnterNewScope();
4003 CodeCompletionDeclConsumer Consumer(Results, CurContext);
4006 Results.ExitScope();
4009 Results.data(),Results.size());
4023 ResultBuilder Results(*this, CodeCompleter->getAllocator(),
4042 // namespace to the list of results.
4043 Results.EnterNewScope();
4048 Results.AddResult(CodeCompletionResult(NS->second, 0),
4050 Results.ExitScope();
4054 Results.getCompletionContext(),
4055 Results.data(),Results.size());
4063 ResultBuilder Results(*this, CodeCompleter->getAllocator(),
4067 CodeCompletionDeclConsumer Consumer(Results, CurContext);
4071 Results.getCompletionContext(),
4072 Results.data(),Results.size());
4080 ResultBuilder Results(*this, CodeCompleter->getAllocator(),
4084 Results.EnterNewScope();
4089 Results.AddResult(Result(Spelling));
4093 Results.allowNestedNameSpecifiers();
4094 CodeCompletionDeclConsumer Consumer(Results, CurContext);
4099 AddTypeSpecifierResults(getLangOpts(), Results);
4100 Results.ExitScope();
4104 Results.data(),Results.size());
4116 ResultBuilder Results(*this, CodeCompleter->getAllocator(),
4119 Results.EnterNewScope();
4134 CodeCompletionBuilder Builder(Results.getAllocator(),
4135 Results.getCodeCompletionTUInfo());
4151 Results.getAllocator().CopyString(
4156 Results.AddResult(CodeCompletionResult(Builder.TakeString(),
4181 Results.AddResult(CodeCompletionResult(Builder.TakeString(),
4207 Results.AddResult(CodeCompletionResult(Builder.TakeString(),
4215 Results.ExitScope();
4217 HandleCodeCompleteResults(this, CodeCompleter, Results.getCompletionContext(),
4218 Results.data(), Results.size());
4232 ResultBuilder Results(*this, CodeCompleter->getAllocator(),
4235 Results.EnterNewScope();
4262 Results.AddResult(CodeCompletionResult(Var), CurContext, 0, false);
4268 addThisCompletion(*this, Results);
4270 Results.ExitScope();
4272 HandleCodeCompleteResults(this, CodeCompleter, Results.getCompletionContext(),
4273 Results.data(), Results.size());
4280 ResultBuilder &Results,
4284 Results.AddResult(Result(OBJC_AT_KEYWORD_NAME(NeedAt,end)));
4286 CodeCompletionBuilder Builder(Results.getAllocator(),
4287 Results.getCodeCompletionTUInfo());
4293 Results.AddResult(Result(Builder.TakeString()));
4299 Results.AddResult(Result(Builder.TakeString()));
4304 ResultBuilder &Results,
4309 Results.AddResult(Result(OBJC_AT_KEYWORD_NAME(NeedAt,end)));
4313 Results.AddResult(Result(OBJC_AT_KEYWORD_NAME(NeedAt,property)));
4316 Results.AddResult(Result(OBJC_AT_KEYWORD_NAME(NeedAt,required)));
4319 Results.AddResult(Result(OBJC_AT_KEYWORD_NAME(NeedAt,optional)));
4323 static void AddObjCTopLevelResults(ResultBuilder &Results, bool NeedAt) {
4325 CodeCompletionBuilder Builder(Results.getAllocator(),
4326 Results.getCodeCompletionTUInfo());
4332 Results
4334 if (Results.includeCodePatterns()) {
4341 Results.AddResult(Result(Builder.TakeString()));
4347 Results.AddResult(Result(Builder.TakeString()));
4353 Results.AddResult(Result(Builder.TakeString()));
4362 Results.AddResult(Result(Builder.TakeString()));
4367 ResultBuilder Results(*this, CodeCompleter->getAllocator(),
4370 Results.EnterNewScope();
4372 AddObjCImplementationResults(getLangOpts(), Results, false);
4374 AddObjCInterfaceResults(getLangOpts(), Results, false);
4376 AddObjCTopLevelResults(Results, false);
4377 Results.ExitScope();
4380 Results.data(),Results.size());
4383 static void AddObjCExpressionResults(ResultBuilder &Results, bool NeedAt) {
4385 CodeCompletionBuilder Builder(Results.getAllocator(),
4386 Results.getCodeCompletionTUInfo());
4390 if (Results.getSema().getLangOpts().CPlusPlus ||
4391 Results.getSema().getLangOpts().ConstStrings)
4398 Results.AddResult(Result(Builder.TakeString()));
4406 Results.AddResult(Result(Builder.TakeString()));
4414 Results.AddResult(Result(Builder.TakeString()));
4422 Results.AddResult(Result(Builder.TakeString()));
4434 Results.AddResult(Result(Builder.TakeString()));
4437 static void AddObjCStatementResults(ResultBuilder &Results, bool NeedAt) {
4439 CodeCompletionBuilder Builder(Results.getAllocator(),
4440 Results.getCodeCompletionTUInfo());
4442 if (Results.includeCodePatterns()) {
4460 Results.AddResult(Result(Builder.TakeString()));
4467 Results.AddResult(Result(Builder.TakeString()));
4469 if (Results.includeCodePatterns()) {
4479 Results.AddResult(Result(Builder.TakeString()));
4484 ResultBuilder &Results,
4487 Results.AddResult(Result(OBJC_AT_KEYWORD_NAME(NeedAt,private)));
4488 Results.AddResult(Result(OBJC_AT_KEYWORD_NAME(NeedAt,protected)));
4489 Results.AddResult(Result(OBJC_AT_KEYWORD_NAME(NeedAt,public)));
4491 Results.AddResult(Result(OBJC_AT_KEYWORD_NAME(NeedAt,package)));
4495 ResultBuilder Results(*this, CodeCompleter->getAllocator(),
4498 Results.EnterNewScope();
4499 AddObjCVisibilityResults(getLangOpts(), Results, false);
4500 Results.ExitScope();
4503 Results.data(),Results.size());
4507 ResultBuilder Results(*this, CodeCompleter->getAllocator(),
4510 Results.EnterNewScope();
4511 AddObjCStatementResults(Results, false);
4512 AddObjCExpressionResults(Results, false);
4513 Results.ExitScope();
4516 Results.data(),Results.size());
4520 ResultBuilder Results(*this, CodeCompleter->getAllocator(),
4523 Results.EnterNewScope();
4524 AddObjCExpressionResults(Results, false);
4525 Results.ExitScope();
4528 Results.data(),Results.size());
4574 ResultBuilder Results(*this, CodeCompleter->getAllocator(),
4577 Results.EnterNewScope();
4579 Results.AddResult(CodeCompletionResult("readonly"));
4581 Results.AddResult(CodeCompletionResult("assign"));
4584 Results.AddResult(CodeCompletionResult("unsafe_unretained"));
4586 Results.AddResult(CodeCompletionResult("readwrite"));
4588 Results.AddResult(CodeCompletionResult("retain"));
4590 Results.AddResult(CodeCompletionResult("strong"));
4592 Results.AddResult(CodeCompletionResult("copy"));
4594 Results.AddResult(CodeCompletionResult("nonatomic"));
4596 Results.AddResult(CodeCompletionResult("atomic"));
4598 CodeCompletionBuilder Setter(Results.getAllocator(),
4599 Results.getCodeCompletionTUInfo());
4603 Results.AddResult(CodeCompletionResult(Setter.TakeString()));
4606 CodeCompletionBuilder Getter(Results.getAllocator(),
4607 Results.getCodeCompletionTUInfo());
4611 Results.AddResult(CodeCompletionResult(Getter.TakeString()));
4613 Results.ExitScope();
4616 Results.data(),Results.size());
4667 /// container to the set of results.
4685 /// \param Results the structure into which we'll add results.
4694 ResultBuilder &Results,
4715 Results.MaybeAddResult(R, CurContext);
4729 Results, false);
4742 CurContext, Selectors, AllowSameLength, Results, false);
4749 Results, InOriginalClass);
4759 Results, false);
4765 Results, InOriginalClass);
4772 AllowSameLength, Results, false);
4778 Results, InOriginalClass);
4797 ResultBuilder Results(*this, CodeCompleter->getAllocator(),
4800 Results.EnterNewScope();
4804 /*AllowSameLength=*/true, Results);
4805 Results.ExitScope();
4808 Results.data(),Results.size());
4827 ResultBuilder Results(*this, CodeCompleter->getAllocator(),
4830 Results.EnterNewScope();
4834 Selectors, /*AllowSameLength=*/true, Results);
4836 Results.ExitScope();
4839 Results.data(),Results.size());
4845 ResultBuilder Results(*this, CodeCompleter->getAllocator(),
4848 Results.EnterNewScope();
4854 Results.AddResult("in");
4855 Results.AddResult("inout");
4860 Results.AddResult("out");
4862 Results.AddResult("inout");
4867 Results.AddResult("bycopy");
4868 Results.AddResult("byref");
4869 Results.AddResult("oneway");
4878 CodeCompletionBuilder Builder(Results.getAllocator(),
4879 Results.getCodeCompletionTUInfo(),
4889 Results.AddResult(CodeCompletionResult(Builder.TakeString()));
4893 AddOrdinaryNameResults(PCC_Type, S, *this, Results);
4894 Results.ExitScope();
4897 Results.setFilter(&ResultBuilder::IsOrdinaryNonValueName);
4898 CodeCompletionDeclConsumer Consumer(Results, CurContext);
4903 AddMacroResults(PP, Results);
4907 Results.data(), Results.size());
4995 /// \param Results The set of results to augment.
5002 ResultBuilder &Results) {
5051 CodeCompletionBuilder Builder(Results.getAllocator(),
5052 Results.getCodeCompletionTUInfo());
5098 Results.AddResult(CodeCompletionResult(Builder.TakeString(), SuperMethod,
5105 ResultBuilder Results(*this, CodeCompleter->getAllocator(),
5112 CodeCompletionDeclConsumer Consumer(Results, CurContext);
5113 Results.EnterNewScope();
5122 Results.AddResult(Result("super"));
5124 Results);
5128 addThisCompletion(*this, Results);
5130 Results.ExitScope();
5133 AddMacroResults(PP, Results);
5134 HandleCodeCompleteResults(this, CodeCompleter, Results.getCompletionContext(),
5135 Results.data(), Results.size());
5204 /// \brief Given a set of code-completion results for the argument of a message
5206 static QualType getPreferredArgumentTypeForMessageSend(ResultBuilder &Results,
5209 ASTContext &Context = Results.getSema().Context;
5213 Result *ResultsData = Results.data();
5214 for (unsigned I = 0, N = Results.size(); I != N; ++I) {
5244 ResultBuilder &Results) {
5259 Results.EnterNewScope();
5266 Results))
5267 Results.Ignore(SuperMethod);
5273 Results.setPreferredSelector(CurMethod->getSelector());
5279 Results);
5310 Results.MaybeAddResult(R, SemaRef.CurContext);
5315 Results.ExitScope();
5326 ResultBuilder Results(*this, CodeCompleter->getAllocator(),
5332 AtArgumentExpression, IsSuper, Results);
5338 // our preferred type, improving completion results.
5340 QualType PreferredType = getPreferredArgumentTypeForMessageSend(Results,
5350 Results.getCompletionContext(),
5351 Results.data(), Results.size());
5392 ResultBuilder Results(*this, CodeCompleter->getAllocator(),
5397 Results.EnterNewScope();
5404 Results))
5405 Results.Ignore(SuperMethod);
5411 Results.setPreferredSelector(CurMethod->getSelector());
5424 CurContext, Selectors, AtArgumentExpression, Results);
5435 Selectors, AtArgumentExpression, Results);
5443 Results);
5450 Selectors, AtArgumentExpression, Results);
5455 // about as code-completion results.
5486 Results.MaybeAddResult(R, CurContext);
5490 Results.ExitScope();
5497 // our preferred type, improving completion results.
5499 QualType PreferredType = getPreferredArgumentTypeForMessageSend(Results,
5509 Results.getCompletionContext(),
5510 Results.data(),Results.size());
5544 ResultBuilder Results(*this, CodeCompleter->getAllocator(),
5547 Results.EnterNewScope();
5556 CodeCompletionBuilder Builder(Results.getAllocator(),
5557 Results.getCodeCompletionTUInfo());
5561 Results.AddResult(Builder.TakeString());
5579 Results.AddResult(Builder.TakeString());
5581 Results.ExitScope();
5585 Results.data(), Results.size());
5592 ResultBuilder &Results) {
5601 Results.AddResult(Result(Proto, 0), CurContext, 0, false);
5607 ResultBuilder Results(*this, CodeCompleter->getAllocator(),
5612 Results.EnterNewScope();
5616 // FIXME: This doesn't work when caching code-completion results.
5620 Results.Ignore(Protocol);
5624 Results);
5626 Results.ExitScope();
5631 Results.data(),Results.size());
5635 ResultBuilder Results(*this, CodeCompleter->getAllocator(),
5640 Results.EnterNewScope();
5644 Results);
5646 Results.ExitScope();
5651 Results.data(),Results.size());
5659 ResultBuilder &Results) {
5669 Results.AddResult(Result(Class, 0), CurContext, 0, false);
5674 ResultBuilder Results(*this, CodeCompleter->getAllocator(),
5677 Results.EnterNewScope();
5682 false, Results);
5685 Results.ExitScope();
5689 Results.data(),Results.size());
5694 ResultBuilder Results(*this, CodeCompleter->getAllocator(),
5697 Results.EnterNewScope();
5703 Results.Ignore(CurClass);
5708 false, Results);
5711 Results.ExitScope();
5715 Results.data(),Results.size());
5719 ResultBuilder Results(*this, CodeCompleter->getAllocator(),
5722 Results.EnterNewScope();
5727 true, Results);
5730 Results.ExitScope();
5734 Results.data(),Results.size());
5742 ResultBuilder Results(*this, CodeCompleter->getAllocator(),
5757 Results.EnterNewScope();
5764 Results.AddResult(Result(Category, 0), CurContext, 0, false);
5765 Results.ExitScope();
5769 Results.data(),Results.size());
5786 ResultBuilder Results(*this, CodeCompleter->getAllocator(),
5794 Results.EnterNewScope();
5801 Results.AddResult(Result(Category, 0), CurContext, 0, false);
5806 Results.ExitScope();
5810 Results.data(),Results.size());
5815 ResultBuilder Results(*this, CodeCompleter->getAllocator(),
5832 Results.Ignore(PropertyImpl->getPropertyDecl());
5836 Results.EnterNewScope();
5841 AddedProperties, Results);
5845 AddedProperties, Results);
5846 Results.ExitScope();
5850 Results.data(),Results.size());
5856 ResultBuilder Results(*this, CodeCompleter->getAllocator(),
5886 Results.setPreferredType(PropertyType);
5891 Results.EnterNewScope();
5901 Results.AddResult(Result(Ivar, 0), CurContext, 0, false);
5911 // advantage over other results whose names don't match so closely.
5912 if (Results.size() &&
5913 Results.data()[Results.size() - 1].Kind
5915 Results.data()[Results.size() - 1].Declaration == Ivar)
5916 Results.data()[Results.size() - 1].Priority--;
5926 CodeCompletionAllocator &Allocator = Results.getAllocator();
5927 Results.getCodeCompletionTUInfo(),
5934 Results.AddResult(Result(Builder.TakeString(), Priority,
5938 Results.ExitScope();
5942 Results.data(),Results.size());
6069 ResultBuilder &Results) {
6074 PrintingPolicy Policy = getCompletionPrintingPolicy(Results.getSema());
6078 CodeCompletionAllocator &Allocator = Results.getAllocator();
6079 CodeCompletionBuilder Builder(Allocator, Results.getCodeCompletionTUInfo());
6122 Results.AddResult(Result(Builder.TakeString(), CCP_CodePattern,
6145 Results.AddResult(Result(Builder.TakeString(), CCP_CodePattern,
6168 Results.AddResult(Result(Builder.TakeString(), CCP_CodePattern,
6216 Results.AddResult(Result(Builder.TakeString(),
6242 Results.AddResult(Result(Builder.TakeString(), IndexedGetterPriority,
6269 Results.AddResult(Result(Builder.TakeString(), IndexedGetterPriority,
6301 Results
6335 Results.AddResult(Result(Builder.TakeString(), IndexedSetterPriority,
6366 Results.AddResult(Result(Builder.TakeString(), IndexedSetterPriority,
6388 Results.AddResult(Result(Builder.TakeString(), IndexedSetterPriority,
6410 Results.AddResult(Result(Builder.TakeString(), IndexedSetterPriority,
6442 Results.AddResult(Result(Builder.TakeString(), IndexedSetterPriority,
6475 Results.AddResult(Result(Builder.TakeString(), IndexedSetterPriority,
6498 Results.AddResult(Result(Builder.TakeString(), UnorderedGetterPriority,
6528 Results.AddResult(Result(Builder.TakeString(), UnorderedGetterPriority,
6552 Results.AddResult(Result(Builder.TakeString(), UnorderedSetterPriority,
6573 Results.AddResult(Result(Builder.TakeString(), UnorderedSetterPriority,
6596 Results.AddResult(Result(Builder.TakeString(), UnorderedSetterPriority,
6617 Results.AddResult(Result(Builder.TakeString(), UnorderedSetterPriority,
6638 Results.AddResult(Result(Builder.TakeString(), UnorderedSetterPriority,
6662 Results.AddResult(Result(Builder.TakeString(), CCP_CodePattern,
6683 Results.AddResult(Result(Builder.TakeString(), CCP_CodePattern,
6734 ResultBuilder Results(*this, CodeCompleter->getAllocator(),
6737 Results.EnterNewScope();
6743 CodeCompletionBuilder Builder(Results.getAllocator(),
6744 Results.getCodeCompletionTUInfo());
6791 if (IsInImplementation && Results.includeCodePatterns()) {
6813 Results.AddResult(Result(Builder.TakeString(), Method, Priority));
6845 KnownSelectors, Results);
6850 Results.ExitScope();
6854 Results.data(),Results.size());
6878 ResultBuilder Results(*this, CodeCompleter->getAllocator(),
6883 Results.setPreferredType(GetTypeFromParser(ReturnTy).getNonReferenceType());
6885 Results.EnterNewScope();
6902 CodeCompletionBuilder Builder(Results.getAllocator(),
6903 Results.getCodeCompletionTUInfo());
6906 Results.AddResult(Builder.TakeString());
6917 Results.MaybeAddResult(R, CurContext);
6921 Results.ExitScope();
6924 Results.data(),Results.size());
6928 ResultBuilder Results(*this, CodeCompleter->getAllocator(),
6931 Results.EnterNewScope();
6934 CodeCompletionBuilder Builder(Results.getAllocator(),
6935 Results.getCodeCompletionTUInfo());
6939 Results.AddResult(Builder.TakeString());
6945 Results.AddResult(Builder.TakeString());
6951 Results.AddResult(Builder.TakeString());
6958 Results.AddResult(Builder.TakeString());
6962 Results.AddResult(Builder.TakeString());
6966 Results.AddResult(Builder.TakeString());
6975 Results.AddResult(Builder.TakeString());
6983 Results.AddResult(Builder.TakeString());
6989 Results.AddResult(Builder.TakeString());
6998 Results.AddResult(Builder.TakeString());
7004 Results.AddResult(Builder.TakeString());
7010 Results.AddResult(Builder.TakeString());
7020 Results.AddResult(Builder.TakeString());
7026 Results.AddResult(Builder.TakeString());
7032 Results.AddResult(Builder.TakeString());
7041 Results.AddResult(Builder.TakeString());
7049 Results.AddResult(Builder.TakeString());
7058 Results.AddResult(Builder.TakeString());
7066 Results.AddResult(Builder.TakeString());
7072 Results.AddResult(Builder.TakeString());
7079 Results.ExitScope();
7083 Results.data(), Results.size());
7093 ResultBuilder Results(*this, CodeCompleter->getAllocator(),
7099 CodeCompletionBuilder Builder(Results.getAllocator(),
7100 Results.getCodeCompletionTUInfo());
7101 Results.EnterNewScope();
7107 Results.AddResult(Builder.TakeString());
7109 Results.ExitScope();
7114 HandleCodeCompleteResults(this, CodeCompleter, Results.getCompletionContext(),
7115 Results.data(), Results.size());
7119 ResultBuilder Results(*this, CodeCompleter->getAllocator(),
7124 AddMacroResults(PP, Results);
7127 Results.EnterNewScope();
7128 CodeCompletionBuilder Builder(Results.getAllocator(),
7129 Results.getCodeCompletionTUInfo());
7135 Results.AddResult(Builder.TakeString());
7136 Results.ExitScope();
7140 Results.data(), Results.size());
7147 // FIXME: In the future, we could provide "overload" results, much like we
7162 SmallVectorImpl<CodeCompletionResult> &Results) {
7175 Results.clear();
7176 Results.insert(Results.end(),