Lines Matching refs:SemaRef
98 Sema &SemaRef; member in __anon506a0daf0111::UnqualUsingDirectiveSet
106 UnqualUsingDirectiveSet(Sema &SemaRef) : SemaRef(SemaRef) {} in UnqualUsingDirectiveSet() argument
125 if (SemaRef.isVisible(I)) in visitScopeChain()
165 if (SemaRef.isVisible(UD) && visited.insert(NS).second) { in addUsingDirectives()
1808 bool LookupResult::isAcceptableSlow(Sema &SemaRef, NamedDecl *D, in isAcceptableSlow() argument
1813 Module *DeclModule = SemaRef.getOwningModule(D); in isAcceptableSlow()
1817 if (SemaRef.isModuleVisible(DeclModule, in isAcceptableSlow()
1852 SemaRef.hasAcceptableDefinition(cast<NamedDecl>(DC), Kind); in isAcceptableSlow()
1855 isAcceptable(SemaRef, cast<NamedDecl>(DC), Kind); in isAcceptableSlow()
1857 (isa<FunctionDecl>(DC) && !SemaRef.getLangOpts().CPlusPlus)) in isAcceptableSlow()
1858 AcceptableWithinParent = isAcceptable(SemaRef, cast<NamedDecl>(DC), Kind); in isAcceptableSlow()
1864 if (SemaRef.hasMergedDefinitionInCurrentModule(cast<NamedDecl>(DC))) { in isAcceptableSlow()
1872 SemaRef.hasAcceptableDefinition(cast<NamedDecl>(DC), Kind); in isAcceptableSlow()
1875 if (AcceptableWithinParent && SemaRef.CodeSynthesisContexts.empty() && in isAcceptableSlow()
1878 !SemaRef.getLangOpts().ModulesLocalVisibility) { in isAcceptableSlow()
1891 return isReachableSlow(SemaRef, D); in isAcceptableSlow()
1935 bool LookupResult::isReachableSlow(Sema &SemaRef, NamedDecl *D) { in isReachableSlow() argument
1936 assert(!isVisible(SemaRef, D) && "Shouldn't call the slow case.\n"); in isReachableSlow()
1938 Module *DeclModule = SemaRef.getOwningModule(D); in isReachableSlow()
2039 static NamedDecl *findAcceptableDecl(Sema &SemaRef, NamedDecl *D, in findAcceptableDecl() argument
2041 assert(!LookupResult::isAvailableForLookup(SemaRef, D) && "not in slow case"); in findAcceptableDecl()
2053 LookupResult::isAvailableForLookup(SemaRef, ND)) in findAcceptableDecl()
2098 bool LookupResult::isVisible(Sema &SemaRef, NamedDecl *D) { in isVisible() argument
2105 return isAcceptableSlow(SemaRef, D, Sema::AcceptableKind::Visible); in isVisible()
2108 bool LookupResult::isReachable(Sema &SemaRef, NamedDecl *D) { in isReachable() argument
2112 return isAcceptableSlow(SemaRef, D, Sema::AcceptableKind::Reachable); in isReachable()
2115 bool LookupResult::isAvailableForLookup(Sema &SemaRef, NamedDecl *ND) { in isAvailableForLookup() argument
2117 if (isVisible(SemaRef, ND)) in isAvailableForLookup()
2125 return SemaRef.hasReachableDefinition(DeductionGuide); in isAvailableForLookup()
2170 return SemaRef.hasReachableDefinition(TD); in isAvailableForLookup()
4020 void lookupVisibleDecls(Sema &SemaRef, Scope *S, Sema::LookupNameKind Kind, in lookupVisibleDecls() argument
4025 UnqualUsingDirectiveSet UDirs(SemaRef); in lookupVisibleDecls()
4026 if (SemaRef.getLangOpts().CPlusPlus) { in lookupVisibleDecls()
4036 LookupResult Result(SemaRef, DeclarationName(), SourceLocation(), Kind); in lookupVisibleDecls()
4039 Visited.visitedContext(SemaRef.getASTContext().getTranslationUnitDecl()); in lookupVisibleDecls()
4044 void lookupVisibleDecls(Sema &SemaRef, DeclContext *Ctx, in lookupVisibleDecls() argument
4046 LookupResult Result(SemaRef, DeclarationName(), SourceLocation(), Kind); in lookupVisibleDecls()
4049 Visited.visitedContext(SemaRef.getASTContext().getTranslationUnitDecl()); in lookupVisibleDecls()
4402 static void LookupPotentialTypoResult(Sema &SemaRef,
4414 static void checkCorrectionVisibility(Sema &SemaRef, TypoCorrection &TC) { in checkCorrectionVisibility() argument
4418 if (!LookupResult::isVisible(SemaRef, *DI)) in checkCorrectionVisibility()
4430 if (LookupResult::isVisible(SemaRef, *DI)) { in checkCorrectionVisibility()
4506 if (!LookupResult::isVisible(SemaRef, ND) && Name != Typo) in FoundDecl()
4539 TypoCorrection TC(&SemaRef.Context.Idents.get(Name), ND, NNS, ED); in addName()
4560 checkCorrectionVisibility(SemaRef, Correction); in addCorrection()
4591 Correction.getAsString(SemaRef.getLangOpts())}; in addCorrection()
4595 RI->getAsString(SemaRef.getLangOpts())}; in addCorrection()
4625 auto &Types = SemaRef.getASTContext().getTypes(); in addNamespaces()
4672 LookupPotentialTypoResult(SemaRef, Result, Name, S, TempSS, TempMemberContext, in resolveCorrection()
4705 checkCorrectionVisibility(SemaRef, Candidate); in resolveCorrection()
4750 if (!SemaRef.LookupQualifiedName(Result, Ctx)) in performQualifiedLookups()
4759 std::string NewQualified = TC.getAsString(SemaRef.getLangOpts()); in performQualifiedLookups()
4762 SS->getScopeRep()->print(OldOStream, SemaRef.getPrintingPolicy()); in performQualifiedLookups()
4772 if (SemaRef.CheckMemberAccess(TC.getCorrectionRange().getBegin(), in performQualifiedLookups()
4911 static void LookupPotentialTypoResult(Sema &SemaRef, in LookupPotentialTypoResult() argument
4941 SemaRef.LookupQualifiedName(Res, MemberContext); in LookupPotentialTypoResult()
4945 SemaRef.LookupParsedName(Res, S, SS, in LookupPotentialTypoResult()
4951 if (ObjCMethodDecl *Method = SemaRef.getCurMethodDecl()) { in LookupPotentialTypoResult()
4966 static void AddKeywordsToConsumer(Sema &SemaRef, in AddKeywordsToConsumer() argument
4994 if (SemaRef.getLangOpts().C99 && !SemaRef.getLangOpts().C2y) in AddKeywordsToConsumer()
4997 if (SemaRef.getLangOpts().C99) in AddKeywordsToConsumer()
4999 if (SemaRef.getLangOpts().Bool || SemaRef.getLangOpts().CPlusPlus) in AddKeywordsToConsumer()
5001 else if (SemaRef.getLangOpts().C99) in AddKeywordsToConsumer()
5004 if (SemaRef.getLangOpts().CPlusPlus) { in AddKeywordsToConsumer()
5009 if (SemaRef.getLangOpts().CPlusPlus11) { in AddKeywordsToConsumer()
5018 if (SemaRef.getLangOpts().GNUKeywords) in AddKeywordsToConsumer()
5029 if (CCC.WantCXXNamedCasts && SemaRef.getLangOpts().CPlusPlus) { in AddKeywordsToConsumer()
5038 if (SemaRef.getLangOpts().Bool || SemaRef.getLangOpts().CPlusPlus) { in AddKeywordsToConsumer()
5043 if (SemaRef.getLangOpts().CPlusPlus) { in AddKeywordsToConsumer()
5050 if (isa<CXXMethodDecl>(SemaRef.CurContext) && in AddKeywordsToConsumer()
5051 cast<CXXMethodDecl>(SemaRef.CurContext)->isInstance()) in AddKeywordsToConsumer()
5054 if (SemaRef.getLangOpts().CPlusPlus11) { in AddKeywordsToConsumer()
5060 if (SemaRef.getLangOpts().C11) { in AddKeywordsToConsumer()
5068 if (SemaRef.getCurFunctionOrMethodDecl() || SemaRef.getCurBlock()) { in AddKeywordsToConsumer()
5075 if (SemaRef.getLangOpts().CPlusPlus) { in AddKeywordsToConsumer()
5086 if (SemaRef.getCurFunction() && in AddKeywordsToConsumer()
5087 !SemaRef.getCurFunction()->SwitchStack.empty()) { in AddKeywordsToConsumer()
5092 if (SemaRef.getLangOpts().CPlusPlus) { in AddKeywordsToConsumer()
5108 if (SemaRef.getLangOpts().CPlusPlus) { in AddKeywordsToConsumer()
5111 if (SemaRef.getLangOpts().CPlusPlus11) in AddKeywordsToConsumer()
5448 FunctionCallFilterCCC::FunctionCallFilterCCC(Sema &SemaRef, unsigned NumArgs, in FunctionCallFilterCCC() argument
5452 CurContext(SemaRef.CurContext), MemberFn(ME) { in FunctionCallFilterCCC()
5454 WantFunctionLikeCasts = SemaRef.getLangOpts().CPlusPlus && in FunctionCallFilterCCC()