Lines Matching refs:SemaRef
96 Sema &SemaRef; member in __anonc10198650111::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()
1787 bool LookupResult::isAcceptableSlow(Sema &SemaRef, NamedDecl *D, in isAcceptableSlow() argument
1792 Module *DeclModule = SemaRef.getOwningModule(D); in isAcceptableSlow()
1796 if (SemaRef.isModuleVisible(DeclModule, in isAcceptableSlow()
1831 SemaRef.hasAcceptableDefinition(cast<NamedDecl>(DC), Kind); in isAcceptableSlow()
1834 isAcceptable(SemaRef, cast<NamedDecl>(DC), Kind); in isAcceptableSlow()
1836 (isa<FunctionDecl>(DC) && !SemaRef.getLangOpts().CPlusPlus)) in isAcceptableSlow()
1837 AcceptableWithinParent = isAcceptable(SemaRef, cast<NamedDecl>(DC), Kind); in isAcceptableSlow()
1843 if (SemaRef.hasMergedDefinitionInCurrentModule(cast<NamedDecl>(DC))) { in isAcceptableSlow()
1851 SemaRef.hasAcceptableDefinition(cast<NamedDecl>(DC), Kind); in isAcceptableSlow()
1854 if (AcceptableWithinParent && SemaRef.CodeSynthesisContexts.empty() && in isAcceptableSlow()
1857 !SemaRef.getLangOpts().ModulesLocalVisibility) { in isAcceptableSlow()
1870 return isReachableSlow(SemaRef, D); in isAcceptableSlow()
1914 bool LookupResult::isReachableSlow(Sema &SemaRef, NamedDecl *D) { in isReachableSlow() argument
1915 assert(!isVisible(SemaRef, D) && "Shouldn't call the slow case.\n"); in isReachableSlow()
1917 Module *DeclModule = SemaRef.getOwningModule(D); in isReachableSlow()
2018 static NamedDecl *findAcceptableDecl(Sema &SemaRef, NamedDecl *D, in findAcceptableDecl() argument
2020 assert(!LookupResult::isAvailableForLookup(SemaRef, D) && "not in slow case"); in findAcceptableDecl()
2032 LookupResult::isAvailableForLookup(SemaRef, ND)) in findAcceptableDecl()
2077 bool LookupResult::isVisible(Sema &SemaRef, NamedDecl *D) { in isVisible() argument
2084 return isAcceptableSlow(SemaRef, D, Sema::AcceptableKind::Visible); in isVisible()
2087 bool LookupResult::isReachable(Sema &SemaRef, NamedDecl *D) { in isReachable() argument
2091 return isAcceptableSlow(SemaRef, D, Sema::AcceptableKind::Reachable); in isReachable()
2094 bool LookupResult::isAvailableForLookup(Sema &SemaRef, NamedDecl *ND) { in isAvailableForLookup() argument
2096 if (isVisible(SemaRef, ND)) in isAvailableForLookup()
2104 return SemaRef.hasReachableDefinition(DeductionGuide); in isAvailableForLookup()
2149 return SemaRef.hasReachableDefinition(TD); in isAvailableForLookup()
4086 void lookupVisibleDecls(Sema &SemaRef, Scope *S, Sema::LookupNameKind Kind, in lookupVisibleDecls() argument
4091 UnqualUsingDirectiveSet UDirs(SemaRef); in lookupVisibleDecls()
4092 if (SemaRef.getLangOpts().CPlusPlus) { in lookupVisibleDecls()
4102 LookupResult Result(SemaRef, DeclarationName(), SourceLocation(), Kind); in lookupVisibleDecls()
4105 Visited.visitedContext(SemaRef.getASTContext().getTranslationUnitDecl()); in lookupVisibleDecls()
4110 void lookupVisibleDecls(Sema &SemaRef, DeclContext *Ctx, in lookupVisibleDecls() argument
4112 LookupResult Result(SemaRef, DeclarationName(), SourceLocation(), Kind); in lookupVisibleDecls()
4115 Visited.visitedContext(SemaRef.getASTContext().getTranslationUnitDecl()); in lookupVisibleDecls()
4471 static void LookupPotentialTypoResult(Sema &SemaRef,
4483 static void checkCorrectionVisibility(Sema &SemaRef, TypoCorrection &TC) { in checkCorrectionVisibility() argument
4487 if (!LookupResult::isVisible(SemaRef, *DI)) in checkCorrectionVisibility()
4499 if (LookupResult::isVisible(SemaRef, *DI)) { in checkCorrectionVisibility()
4575 if (!LookupResult::isVisible(SemaRef, ND) && Name != Typo) in FoundDecl()
4608 TypoCorrection TC(&SemaRef.Context.Idents.get(Name), ND, NNS, ED); in addName()
4629 checkCorrectionVisibility(SemaRef, Correction); in addCorrection()
4660 Correction.getAsString(SemaRef.getLangOpts())}; in addCorrection()
4664 RI->getAsString(SemaRef.getLangOpts())}; in addCorrection()
4694 auto &Types = SemaRef.getASTContext().getTypes(); in addNamespaces()
4741 LookupPotentialTypoResult(SemaRef, Result, Name, S, TempSS, TempMemberContext, in resolveCorrection()
4774 checkCorrectionVisibility(SemaRef, Candidate); in resolveCorrection()
4819 if (!SemaRef.LookupQualifiedName(Result, Ctx)) in performQualifiedLookups()
4828 std::string NewQualified = TC.getAsString(SemaRef.getLangOpts()); in performQualifiedLookups()
4831 SS->getScopeRep()->print(OldOStream, SemaRef.getPrintingPolicy()); in performQualifiedLookups()
4841 if (SemaRef.CheckMemberAccess(TC.getCorrectionRange().getBegin(), in performQualifiedLookups()
4980 static void LookupPotentialTypoResult(Sema &SemaRef, in LookupPotentialTypoResult() argument
5010 SemaRef.LookupQualifiedName(Res, MemberContext); in LookupPotentialTypoResult()
5014 SemaRef.LookupParsedName(Res, S, SS, /*AllowBuiltinCreation=*/false, in LookupPotentialTypoResult()
5019 if (ObjCMethodDecl *Method = SemaRef.getCurMethodDecl()) { in LookupPotentialTypoResult()
5034 static void AddKeywordsToConsumer(Sema &SemaRef, in AddKeywordsToConsumer() argument
5062 if (SemaRef.getLangOpts().C99) in AddKeywordsToConsumer()
5064 if (SemaRef.getLangOpts().Bool || SemaRef.getLangOpts().CPlusPlus) in AddKeywordsToConsumer()
5066 else if (SemaRef.getLangOpts().C99) in AddKeywordsToConsumer()
5069 if (SemaRef.getLangOpts().CPlusPlus) { in AddKeywordsToConsumer()
5074 if (SemaRef.getLangOpts().CPlusPlus11) { in AddKeywordsToConsumer()
5083 if (SemaRef.getLangOpts().GNUKeywords) in AddKeywordsToConsumer()
5094 if (CCC.WantCXXNamedCasts && SemaRef.getLangOpts().CPlusPlus) { in AddKeywordsToConsumer()
5103 if (SemaRef.getLangOpts().Bool || SemaRef.getLangOpts().CPlusPlus) { in AddKeywordsToConsumer()
5108 if (SemaRef.getLangOpts().CPlusPlus) { in AddKeywordsToConsumer()
5115 if (isa<CXXMethodDecl>(SemaRef.CurContext) && in AddKeywordsToConsumer()
5116 cast<CXXMethodDecl>(SemaRef.CurContext)->isInstance()) in AddKeywordsToConsumer()
5119 if (SemaRef.getLangOpts().CPlusPlus11) { in AddKeywordsToConsumer()
5125 if (SemaRef.getLangOpts().C11) { in AddKeywordsToConsumer()
5133 if (SemaRef.getCurFunctionOrMethodDecl() || SemaRef.getCurBlock()) { in AddKeywordsToConsumer()
5140 if (SemaRef.getLangOpts().CPlusPlus) { in AddKeywordsToConsumer()
5151 if (SemaRef.getCurFunction() && in AddKeywordsToConsumer()
5152 !SemaRef.getCurFunction()->SwitchStack.empty()) { in AddKeywordsToConsumer()
5157 if (SemaRef.getLangOpts().CPlusPlus) { in AddKeywordsToConsumer()
5173 if (SemaRef.getLangOpts().CPlusPlus) { in AddKeywordsToConsumer()
5176 if (SemaRef.getLangOpts().CPlusPlus11) in AddKeywordsToConsumer()
5582 FunctionCallFilterCCC::FunctionCallFilterCCC(Sema &SemaRef, unsigned NumArgs, in FunctionCallFilterCCC() argument
5586 CurContext(SemaRef.CurContext), MemberFn(ME) { in FunctionCallFilterCCC()
5588 WantFunctionLikeCasts = SemaRef.getLangOpts().CPlusPlus && in FunctionCallFilterCCC()