Lines Matching refs:SemaRef
153 Sema &SemaRef; member in __anon5739d2400111::ResultBuilder
208 explicit ResultBuilder(Sema &SemaRef, CodeCompletionAllocator &Allocator, in ResultBuilder() argument
212 : SemaRef(SemaRef), Allocator(Allocator), CCTUInfo(CCTUInfo), in ResultBuilder()
224 if (ObjCMethodDecl *Method = SemaRef.getCurMethodDecl()) in ResultBuilder()
241 return SemaRef.CodeCompleter && in includeCodePatterns()
242 SemaRef.CodeCompleter->includeCodePatterns(); in includeCodePatterns()
254 PreferredType = SemaRef.Context.getCanonicalType(T); in setPreferredType()
290 Sema &getSema() const { return SemaRef; } in getSema()
711 static bool shouldIgnoreDueToReservedName(const NamedDecl *ND, Sema &SemaRef) { in shouldIgnoreDueToReservedName() argument
724 SemaRef.SourceMgr.isInSystemHeader( in shouldIgnoreDueToReservedName()
725 SemaRef.SourceMgr.getSpellingLoc(ND->getLocation()))) in shouldIgnoreDueToReservedName()
756 if (shouldIgnoreDueToReservedName(ND, SemaRef)) in isInterestingDecl()
767 if (AllowNestedNameSpecifiers && SemaRef.getLangOpts().CPlusPlus && in isInterestingDecl()
787 if (!SemaRef.getLangOpts().CPlusPlus) in CheckHiddenResult()
805 R.Qualifier = getRequiredQualification(SemaRef.Context, CurContext, in CheckHiddenResult()
997 QualType T = getDeclUsageType(SemaRef.Context, R.Declaration); in AdjustResultPriorityForDecl()
999 CanQualType TC = SemaRef.Context.getCanonicalType(T); in AdjustResultPriorityForDecl()
1001 if (SemaRef.Context.hasSameUnqualifiedType(PreferredType, TC)) in AdjustResultPriorityForDecl()
1022 if (!SemaRef.getLangOpts().CPlusPlus || !R.Declaration || in MaybeAddConstructorResults()
1043 for (NamedDecl *Ctor : getConstructors(SemaRef.Context, Record)) { in MaybeAddConstructorResults()
1157 NestedNameSpecifier::Create(SemaRef.Context, nullptr, Namespace); in MaybeAddResult()
1160 SemaRef.Context, nullptr, false, in MaybeAddResult()
1161 SemaRef.Context.getTypeDeclType(Tag).getTypePtr()); in MaybeAddResult()
1280 NestedNameSpecifier::Create(SemaRef.Context, nullptr, Namespace); in AddResult()
1283 SemaRef.Context, nullptr, false, in AddResult()
1284 SemaRef.Context.getTypeDeclType(Tag).getTypePtr()); in AddResult()
1375 if (SemaRef.getLangOpts().CPlusPlus) in IsOrdinaryName()
1377 else if (SemaRef.getLangOpts().ObjC) { in IsOrdinaryName()
1400 if (SemaRef.getLangOpts().CPlusPlus) in IsOrdinaryNonTypeName()
1402 else if (SemaRef.getLangOpts().ObjC) { in IsOrdinaryNonTypeName()
1427 if (SemaRef.getLangOpts().CPlusPlus) in IsOrdinaryNonValueName()
1441 return SemaRef.isAcceptableNestedNameSpecifier(ND); in IsNestedNameSpecifier()
1535 QualType T = getDeclUsageType(SemaRef.Context, ND); in IsObjCMessageReceiver()
1539 T = SemaRef.Context.getBaseElementType(T); in IsObjCMessageReceiver()
1540 return isObjCReceiverType(SemaRef.Context, T); in IsObjCMessageReceiver()
1556 if ((SemaRef.getLangOpts().CPlusPlus && !IsOrdinaryName(ND)) || in IsObjCCollection()
1557 (!SemaRef.getLangOpts().CPlusPlus && !IsOrdinaryNonTypeName(ND))) in IsObjCCollection()
1560 QualType T = getDeclUsageType(SemaRef.Context, ND); in IsObjCCollection()
1564 T = SemaRef.Context.getBaseElementType(T); in IsObjCCollection()
1567 (SemaRef.getLangOpts().CPlusPlus && T->isRecordType()); in IsObjCCollection()
2003 Sema &SemaRef, ResultBuilder &Results) { in AddOrdinaryNameResults() argument
2010 if (SemaRef.getLangOpts().CPlusPlus) { in AddOrdinaryNameResults()
2059 if (SemaRef.getLangOpts().ObjC) in AddOrdinaryNameResults()
2066 if (SemaRef.getLangOpts().CPlusPlus) { in AddOrdinaryNameResults()
2076 if (SemaRef.getLangOpts().CPlusPlus11) in AddOrdinaryNameResults()
2080 if (SemaRef.CurContext->isDependentContext()) { in AddOrdinaryNameResults()
2090 AddStaticAssertResult(Builder, Results, SemaRef.getLangOpts()); in AddOrdinaryNameResults()
2126 if (SemaRef.getLangOpts().CPlusPlus && Results.includeCodePatterns()) { in AddOrdinaryNameResults()
2137 AddStorageSpecifiers(CCC, SemaRef.getLangOpts(), Results); in AddOrdinaryNameResults()
2138 AddFunctionSpecifiers(CCC, SemaRef.getLangOpts(), Results); in AddOrdinaryNameResults()
2142 AddObjCInterfaceResults(SemaRef.getLangOpts(), Results, true); in AddOrdinaryNameResults()
2143 AddStorageSpecifiers(CCC, SemaRef.getLangOpts(), Results); in AddOrdinaryNameResults()
2144 AddFunctionSpecifiers(CCC, SemaRef.getLangOpts(), Results); in AddOrdinaryNameResults()
2148 AddObjCImplementationResults(SemaRef.getLangOpts(), Results, true); in AddOrdinaryNameResults()
2149 AddStorageSpecifiers(CCC, SemaRef.getLangOpts(), Results); in AddOrdinaryNameResults()
2150 AddFunctionSpecifiers(CCC, SemaRef.getLangOpts(), Results); in AddOrdinaryNameResults()
2154 AddObjCVisibilityResults(SemaRef.getLangOpts(), Results, true); in AddOrdinaryNameResults()
2159 if (SemaRef.getLangOpts().CPlusPlus11) in AddOrdinaryNameResults()
2164 if (SemaRef.getLangOpts().CPlusPlus && Results.includeCodePatterns() && in AddOrdinaryNameResults()
2165 SemaRef.getLangOpts().CXXExceptions) { in AddOrdinaryNameResults()
2187 if (SemaRef.getLangOpts().ObjC) in AddOrdinaryNameResults()
2195 if (SemaRef.getLangOpts().CPlusPlus) in AddOrdinaryNameResults()
2212 if (SemaRef.getLangOpts().CPlusPlus) in AddOrdinaryNameResults()
2227 if (SemaRef.getCurFunction() && in AddOrdinaryNameResults()
2228 !SemaRef.getCurFunction()->SwitchStack.empty()) { in AddOrdinaryNameResults()
2247 if (SemaRef.getLangOpts().CPlusPlus) in AddOrdinaryNameResults()
2279 if (SemaRef.getLangOpts().CPlusPlus || SemaRef.getLangOpts().C99) in AddOrdinaryNameResults()
2315 if (const auto *Function = dyn_cast<FunctionDecl>(SemaRef.CurContext)) in AddOrdinaryNameResults()
2317 else if (const auto *Method = dyn_cast<ObjCMethodDecl>(SemaRef.CurContext)) in AddOrdinaryNameResults()
2319 else if (SemaRef.getCurBlock() && in AddOrdinaryNameResults()
2320 !SemaRef.getCurBlock()->ReturnType.isNull()) in AddOrdinaryNameResults()
2321 ReturnType = SemaRef.getCurBlock()->ReturnType;; in AddOrdinaryNameResults()
2345 if (SemaRef.getLangOpts().CPlusPlus11 && in AddOrdinaryNameResults()
2367 AddStaticAssertResult(Builder, Results, SemaRef.getLangOpts()); in AddOrdinaryNameResults()
2374 AddStorageSpecifiers(CCC, SemaRef.getLangOpts(), Results); in AddOrdinaryNameResults()
2379 if (SemaRef.getLangOpts().ObjCAutoRefCount && in AddOrdinaryNameResults()
2409 if (SemaRef.getLangOpts().CPlusPlus) { in AddOrdinaryNameResults()
2411 addThisCompletion(SemaRef, Results); in AddOrdinaryNameResults()
2423 if (SemaRef.getLangOpts().RTTI) { in AddOrdinaryNameResults()
2465 if (SemaRef.getLangOpts().RTTI) { in AddOrdinaryNameResults()
2513 if (SemaRef.getLangOpts().CXXExceptions) { in AddOrdinaryNameResults()
2524 if (SemaRef.getLangOpts().CPlusPlus11) { in AddOrdinaryNameResults()
2556 if (SemaRef.getLangOpts().ObjC) { in AddOrdinaryNameResults()
2558 if (ObjCMethodDecl *Method = SemaRef.getCurMethodDecl()) { in AddOrdinaryNameResults()
2576 if (SemaRef.getLangOpts().C11) { in AddOrdinaryNameResults()
2579 if (SemaRef.PP.isMacroDefined("alignof")) in AddOrdinaryNameResults()
2604 if (WantTypesInContext(CCC, SemaRef.getLangOpts())) in AddOrdinaryNameResults()
2605 AddTypeSpecifierResults(SemaRef.getLangOpts(), Results); in AddOrdinaryNameResults()
2607 if (SemaRef.getLangOpts().CPlusPlus && CCC != Sema::PCC_Type) in AddOrdinaryNameResults()
4206 static void AddClassMessageCompletions(Sema &SemaRef, Scope *S,
4721 Sema &SemaRef, ResultBuilder &Results, Scope *S, QualType BaseType, in AddRecordMembersCompletionResults() argument
4733 SemaRef.LookupVisibleDecls(RD, Sema::LookupMemberName, Consumer, in AddRecordMembersCompletionResults()
4734 SemaRef.CodeCompleter->includeGlobals(), in AddRecordMembersCompletionResults()
4736 SemaRef.CodeCompleter->loadExternal()); in AddRecordMembersCompletionResults()
4738 if (SemaRef.getLangOpts().CPlusPlus) { in AddRecordMembersCompletionResults()
5506 Sema &SemaRef, SmallVectorImpl<ResultCandidate> &Results, in mergeCandidatesWithResults() argument
5511 return isBetterOverloadCandidate(SemaRef, X, Y, Loc, in mergeCandidatesWithResults()
5537 static QualType getParamType(Sema &SemaRef, in getParamType() argument
5550 else if (!SemaRef.Context.hasSameUnqualifiedType( in getParamType()
5562 ProduceSignatureHelp(Sema &SemaRef, Scope *S, in ProduceSignatureHelp() argument
5567 SemaRef.CodeCompleter->ProcessOverloadCandidates( in ProduceSignatureHelp()
5568 SemaRef, CurrentArg, Candidates.data(), Candidates.size(), OpenParLoc); in ProduceSignatureHelp()
5569 return getParamType(SemaRef, Candidates, CurrentArg); in ProduceSignatureHelp()
7319 static void AddClassMessageCompletions(Sema &SemaRef, Scope *S, in AddClassMessageCompletions() argument
7330 QualType T = SemaRef.GetTypeFromParser(Receiver, nullptr); in AddClassMessageCompletions()
7344 AddSuperSendCompletion(SemaRef, false, SelIdents, Results)) in AddClassMessageCompletions()
7350 if (ObjCMethodDecl *CurMethod = SemaRef.getCurMethodDecl()) in AddClassMessageCompletions()
7355 AddObjCMethods(CDecl, false, MK_Any, SelIdents, SemaRef.CurContext, in AddClassMessageCompletions()
7362 if (SemaRef.getExternalSource()) { in AddClassMessageCompletions()
7364 N = SemaRef.getExternalSource()->GetNumExternalSelectors(); in AddClassMessageCompletions()
7366 Selector Sel = SemaRef.getExternalSource()->GetExternalSelector(I); in AddClassMessageCompletions()
7367 if (Sel.isNull() || SemaRef.MethodPool.count(Sel)) in AddClassMessageCompletions()
7370 SemaRef.ReadMethodPool(Sel); in AddClassMessageCompletions()
7374 for (Sema::GlobalMethodPool::iterator M = SemaRef.MethodPool.begin(), in AddClassMessageCompletions()
7375 MEnd = SemaRef.MethodPool.end(); in AddClassMessageCompletions()
7386 Results.MaybeAddResult(R, SemaRef.CurContext); in AddClassMessageCompletions()