Lines Matching refs:SemaRef
96 Sema &SemaRef; member in __anonb0e6ccc60111::UnqualUsingDirectiveSet
104 UnqualUsingDirectiveSet(Sema &SemaRef) : SemaRef(SemaRef) {} in UnqualUsingDirectiveSet() argument
123 if (SemaRef.isVisible(I)) in visitScopeChain()
163 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()
1921 if (SemaRef.isModuleUnitOfCurrentTU(DeclModule)) in isReachableSlow()
2015 static NamedDecl *findAcceptableDecl(Sema &SemaRef, NamedDecl *D, in findAcceptableDecl() argument
2017 assert(!LookupResult::isAvailableForLookup(SemaRef, D) && "not in slow case"); in findAcceptableDecl()
2029 LookupResult::isAvailableForLookup(SemaRef, ND)) in findAcceptableDecl()
2074 bool LookupResult::isVisible(Sema &SemaRef, NamedDecl *D) { in isVisible() argument
2081 return isAcceptableSlow(SemaRef, D, Sema::AcceptableKind::Visible); in isVisible()
2084 bool LookupResult::isReachable(Sema &SemaRef, NamedDecl *D) { in isReachable() argument
2088 return isAcceptableSlow(SemaRef, D, Sema::AcceptableKind::Reachable); in isReachable()
2091 bool LookupResult::isAvailableForLookup(Sema &SemaRef, NamedDecl *ND) { in isAvailableForLookup() argument
2093 if (isVisible(SemaRef, ND)) in isAvailableForLookup()
2101 return SemaRef.hasReachableDefinition(DeductionGuide); in isAvailableForLookup()
2146 return SemaRef.hasReachableDefinition(TD); in isAvailableForLookup()
4067 void lookupVisibleDecls(Sema &SemaRef, Scope *S, Sema::LookupNameKind Kind, in lookupVisibleDecls() argument
4072 UnqualUsingDirectiveSet UDirs(SemaRef); in lookupVisibleDecls()
4073 if (SemaRef.getLangOpts().CPlusPlus) { in lookupVisibleDecls()
4083 LookupResult Result(SemaRef, DeclarationName(), SourceLocation(), Kind); in lookupVisibleDecls()
4086 Visited.visitedContext(SemaRef.getASTContext().getTranslationUnitDecl()); in lookupVisibleDecls()
4091 void lookupVisibleDecls(Sema &SemaRef, DeclContext *Ctx, in lookupVisibleDecls() argument
4093 LookupResult Result(SemaRef, DeclarationName(), SourceLocation(), Kind); in lookupVisibleDecls()
4096 Visited.visitedContext(SemaRef.getASTContext().getTranslationUnitDecl()); in lookupVisibleDecls()
4453 static void LookupPotentialTypoResult(Sema &SemaRef,
4465 static void checkCorrectionVisibility(Sema &SemaRef, TypoCorrection &TC) { in checkCorrectionVisibility() argument
4469 if (!LookupResult::isVisible(SemaRef, *DI)) in checkCorrectionVisibility()
4481 if (LookupResult::isVisible(SemaRef, *DI)) { in checkCorrectionVisibility()
4557 if (!LookupResult::isVisible(SemaRef, ND) && Name != Typo) in FoundDecl()
4590 TypoCorrection TC(&SemaRef.Context.Idents.get(Name), ND, NNS, ED); in addName()
4611 checkCorrectionVisibility(SemaRef, Correction); in addCorrection()
4642 Correction.getAsString(SemaRef.getLangOpts())}; in addCorrection()
4646 RI->getAsString(SemaRef.getLangOpts())}; in addCorrection()
4676 auto &Types = SemaRef.getASTContext().getTypes(); in addNamespaces()
4723 LookupPotentialTypoResult(SemaRef, Result, Name, S, TempSS, TempMemberContext, in resolveCorrection()
4756 checkCorrectionVisibility(SemaRef, Candidate); in resolveCorrection()
4801 if (!SemaRef.LookupQualifiedName(Result, Ctx)) in performQualifiedLookups()
4810 std::string NewQualified = TC.getAsString(SemaRef.getLangOpts()); in performQualifiedLookups()
4813 SS->getScopeRep()->print(OldOStream, SemaRef.getPrintingPolicy()); in performQualifiedLookups()
4823 if (SemaRef.CheckMemberAccess(TC.getCorrectionRange().getBegin(), in performQualifiedLookups()
4962 static void LookupPotentialTypoResult(Sema &SemaRef, in LookupPotentialTypoResult() argument
4992 SemaRef.LookupQualifiedName(Res, MemberContext); in LookupPotentialTypoResult()
4996 SemaRef.LookupParsedName(Res, S, SS, /*AllowBuiltinCreation=*/false, in LookupPotentialTypoResult()
5001 if (ObjCMethodDecl *Method = SemaRef.getCurMethodDecl()) { in LookupPotentialTypoResult()
5016 static void AddKeywordsToConsumer(Sema &SemaRef, in AddKeywordsToConsumer() argument
5044 if (SemaRef.getLangOpts().C99) in AddKeywordsToConsumer()
5046 if (SemaRef.getLangOpts().Bool || SemaRef.getLangOpts().CPlusPlus) in AddKeywordsToConsumer()
5048 else if (SemaRef.getLangOpts().C99) in AddKeywordsToConsumer()
5051 if (SemaRef.getLangOpts().CPlusPlus) { in AddKeywordsToConsumer()
5056 if (SemaRef.getLangOpts().CPlusPlus11) { in AddKeywordsToConsumer()
5065 if (SemaRef.getLangOpts().GNUKeywords) in AddKeywordsToConsumer()
5076 if (CCC.WantCXXNamedCasts && SemaRef.getLangOpts().CPlusPlus) { in AddKeywordsToConsumer()
5085 if (SemaRef.getLangOpts().Bool || SemaRef.getLangOpts().CPlusPlus) { in AddKeywordsToConsumer()
5090 if (SemaRef.getLangOpts().CPlusPlus) { in AddKeywordsToConsumer()
5097 if (isa<CXXMethodDecl>(SemaRef.CurContext) && in AddKeywordsToConsumer()
5098 cast<CXXMethodDecl>(SemaRef.CurContext)->isInstance()) in AddKeywordsToConsumer()
5101 if (SemaRef.getLangOpts().CPlusPlus11) { in AddKeywordsToConsumer()
5107 if (SemaRef.getLangOpts().C11) { in AddKeywordsToConsumer()
5115 if (SemaRef.getCurFunctionOrMethodDecl() || SemaRef.getCurBlock()) { in AddKeywordsToConsumer()
5122 if (SemaRef.getLangOpts().CPlusPlus) { in AddKeywordsToConsumer()
5133 if (SemaRef.getCurFunction() && in AddKeywordsToConsumer()
5134 !SemaRef.getCurFunction()->SwitchStack.empty()) { in AddKeywordsToConsumer()
5139 if (SemaRef.getLangOpts().CPlusPlus) { in AddKeywordsToConsumer()
5155 if (SemaRef.getLangOpts().CPlusPlus) { in AddKeywordsToConsumer()
5158 if (SemaRef.getLangOpts().CPlusPlus11) in AddKeywordsToConsumer()
5564 FunctionCallFilterCCC::FunctionCallFilterCCC(Sema &SemaRef, unsigned NumArgs, in FunctionCallFilterCCC() argument
5568 CurContext(SemaRef.CurContext), MemberFn(ME) { in FunctionCallFilterCCC()
5570 WantFunctionLikeCasts = SemaRef.getLangOpts().CPlusPlus && in FunctionCallFilterCCC()