Lines Matching refs:SemaRef

94     Sema &SemaRef;  member in __anon5c0384df0111::UnqualUsingDirectiveSet
102 UnqualUsingDirectiveSet(Sema &SemaRef) : SemaRef(SemaRef) {} in UnqualUsingDirectiveSet() argument
121 if (SemaRef.isVisible(I)) in visitScopeChain()
161 if (SemaRef.isVisible(UD) && visited.insert(NS).second) { in addUsingDirectives()
1774 bool LookupResult::isAcceptableSlow(Sema &SemaRef, NamedDecl *D, in isAcceptableSlow() argument
1779 Module *DeclModule = SemaRef.getOwningModule(D); in isAcceptableSlow()
1783 if (SemaRef.isModuleVisible(DeclModule, in isAcceptableSlow()
1818 SemaRef.hasAcceptableDefinition(cast<NamedDecl>(DC), Kind); in isAcceptableSlow()
1821 isAcceptable(SemaRef, cast<NamedDecl>(DC), Kind); in isAcceptableSlow()
1823 (isa<FunctionDecl>(DC) && !SemaRef.getLangOpts().CPlusPlus)) in isAcceptableSlow()
1824 AcceptableWithinParent = isAcceptable(SemaRef, cast<NamedDecl>(DC), Kind); in isAcceptableSlow()
1830 if (SemaRef.hasMergedDefinitionInCurrentModule(cast<NamedDecl>(DC))) { in isAcceptableSlow()
1838 SemaRef.hasAcceptableDefinition(cast<NamedDecl>(DC), Kind); in isAcceptableSlow()
1841 if (AcceptableWithinParent && SemaRef.CodeSynthesisContexts.empty() && in isAcceptableSlow()
1844 !SemaRef.getLangOpts().ModulesLocalVisibility) { in isAcceptableSlow()
1857 return isReachableSlow(SemaRef, D); in isAcceptableSlow()
1908 bool LookupResult::isReachableSlow(Sema &SemaRef, NamedDecl *D) { in isReachableSlow() argument
1909 assert(!isVisible(SemaRef, D) && "Shouldn't call the slow case.\n"); in isReachableSlow()
1911 Module *DeclModule = SemaRef.getOwningModule(D); in isReachableSlow()
1924 if (SemaRef.getCurrentModule() && in isReachableSlow()
1925 SemaRef.getCurrentModule()->getTopLevelModule() == in isReachableSlow()
2020 static NamedDecl *findAcceptableDecl(Sema &SemaRef, NamedDecl *D, in findAcceptableDecl() argument
2022 assert(!LookupResult::isAvailableForLookup(SemaRef, D) && "not in slow case"); in findAcceptableDecl()
2034 LookupResult::isAvailableForLookup(SemaRef, ND)) in findAcceptableDecl()
2079 bool LookupResult::isVisible(Sema &SemaRef, NamedDecl *D) { in isVisible() argument
2086 return isAcceptableSlow(SemaRef, D, Sema::AcceptableKind::Visible); in isVisible()
2089 bool LookupResult::isReachable(Sema &SemaRef, NamedDecl *D) { in isReachable() argument
2093 return isAcceptableSlow(SemaRef, D, Sema::AcceptableKind::Reachable); in isReachable()
2096 bool LookupResult::isAvailableForLookup(Sema &SemaRef, NamedDecl *ND) { in isAvailableForLookup() argument
2098 if (isVisible(SemaRef, ND)) in isAvailableForLookup()
2106 return SemaRef.hasReachableDefinition(DeductionGuide); in isAvailableForLookup()
2135 return SemaRef.hasReachableDefinition(TD); in isAvailableForLookup()
4055 void lookupVisibleDecls(Sema &SemaRef, Scope *S, Sema::LookupNameKind Kind, in lookupVisibleDecls() argument
4060 UnqualUsingDirectiveSet UDirs(SemaRef); in lookupVisibleDecls()
4061 if (SemaRef.getLangOpts().CPlusPlus) { in lookupVisibleDecls()
4071 LookupResult Result(SemaRef, DeclarationName(), SourceLocation(), Kind); in lookupVisibleDecls()
4074 Visited.visitedContext(SemaRef.getASTContext().getTranslationUnitDecl()); in lookupVisibleDecls()
4079 void lookupVisibleDecls(Sema &SemaRef, DeclContext *Ctx, in lookupVisibleDecls() argument
4081 LookupResult Result(SemaRef, DeclarationName(), SourceLocation(), Kind); in lookupVisibleDecls()
4084 Visited.visitedContext(SemaRef.getASTContext().getTranslationUnitDecl()); in lookupVisibleDecls()
4441 static void LookupPotentialTypoResult(Sema &SemaRef,
4453 static void checkCorrectionVisibility(Sema &SemaRef, TypoCorrection &TC) { in checkCorrectionVisibility() argument
4457 if (!LookupResult::isVisible(SemaRef, *DI)) in checkCorrectionVisibility()
4469 if (LookupResult::isVisible(SemaRef, *DI)) { in checkCorrectionVisibility()
4545 if (!LookupResult::isVisible(SemaRef, ND) && Name != Typo) in FoundDecl()
4578 TypoCorrection TC(&SemaRef.Context.Idents.get(Name), ND, NNS, ED); in addName()
4599 checkCorrectionVisibility(SemaRef, Correction); in addCorrection()
4630 Correction.getAsString(SemaRef.getLangOpts())}; in addCorrection()
4634 RI->getAsString(SemaRef.getLangOpts())}; in addCorrection()
4664 auto &Types = SemaRef.getASTContext().getTypes(); in addNamespaces()
4711 LookupPotentialTypoResult(SemaRef, Result, Name, S, TempSS, TempMemberContext, in resolveCorrection()
4744 checkCorrectionVisibility(SemaRef, Candidate); in resolveCorrection()
4789 if (!SemaRef.LookupQualifiedName(Result, Ctx)) in performQualifiedLookups()
4798 std::string NewQualified = TC.getAsString(SemaRef.getLangOpts()); in performQualifiedLookups()
4801 SS->getScopeRep()->print(OldOStream, SemaRef.getPrintingPolicy()); in performQualifiedLookups()
4811 if (SemaRef.CheckMemberAccess(TC.getCorrectionRange().getBegin(), in performQualifiedLookups()
4950 static void LookupPotentialTypoResult(Sema &SemaRef, in LookupPotentialTypoResult() argument
4980 SemaRef.LookupQualifiedName(Res, MemberContext); in LookupPotentialTypoResult()
4984 SemaRef.LookupParsedName(Res, S, SS, /*AllowBuiltinCreation=*/false, in LookupPotentialTypoResult()
4989 if (ObjCMethodDecl *Method = SemaRef.getCurMethodDecl()) { in LookupPotentialTypoResult()
5004 static void AddKeywordsToConsumer(Sema &SemaRef, in AddKeywordsToConsumer() argument
5033 if (SemaRef.getLangOpts().C99) in AddKeywordsToConsumer()
5035 if (SemaRef.getLangOpts().Bool || SemaRef.getLangOpts().CPlusPlus) in AddKeywordsToConsumer()
5037 else if (SemaRef.getLangOpts().C99) in AddKeywordsToConsumer()
5040 if (SemaRef.getLangOpts().CPlusPlus) { in AddKeywordsToConsumer()
5045 if (SemaRef.getLangOpts().CPlusPlus11) { in AddKeywordsToConsumer()
5054 if (SemaRef.getLangOpts().GNUKeywords) in AddKeywordsToConsumer()
5065 if (CCC.WantCXXNamedCasts && SemaRef.getLangOpts().CPlusPlus) { in AddKeywordsToConsumer()
5074 if (SemaRef.getLangOpts().Bool || SemaRef.getLangOpts().CPlusPlus) { in AddKeywordsToConsumer()
5079 if (SemaRef.getLangOpts().CPlusPlus) { in AddKeywordsToConsumer()
5087 if (isa<CXXMethodDecl>(SemaRef.CurContext) && in AddKeywordsToConsumer()
5088 cast<CXXMethodDecl>(SemaRef.CurContext)->isInstance()) in AddKeywordsToConsumer()
5091 if (SemaRef.getLangOpts().CPlusPlus11) { in AddKeywordsToConsumer()
5097 if (SemaRef.getLangOpts().C11) { in AddKeywordsToConsumer()
5105 if (SemaRef.getCurFunctionOrMethodDecl() || SemaRef.getCurBlock()) { in AddKeywordsToConsumer()
5113 if (SemaRef.getLangOpts().CPlusPlus) { in AddKeywordsToConsumer()
5124 if (SemaRef.getCurFunction() && in AddKeywordsToConsumer()
5125 !SemaRef.getCurFunction()->SwitchStack.empty()) { in AddKeywordsToConsumer()
5130 if (SemaRef.getLangOpts().CPlusPlus) { in AddKeywordsToConsumer()
5146 if (SemaRef.getLangOpts().CPlusPlus) { in AddKeywordsToConsumer()
5149 if (SemaRef.getLangOpts().CPlusPlus11) in AddKeywordsToConsumer()
5555 FunctionCallFilterCCC::FunctionCallFilterCCC(Sema &SemaRef, unsigned NumArgs, in FunctionCallFilterCCC() argument
5559 CurContext(SemaRef.CurContext), MemberFn(ME) { in FunctionCallFilterCCC()
5561 WantFunctionLikeCasts = SemaRef.getLangOpts().CPlusPlus && in FunctionCallFilterCCC()