Lines Matching refs:SemaRef
93 Sema &SemaRef; member in __anon3e52c2260111::UnqualUsingDirectiveSet
101 UnqualUsingDirectiveSet(Sema &SemaRef) : SemaRef(SemaRef) {} in UnqualUsingDirectiveSet() argument
120 if (SemaRef.isVisible(I)) in visitScopeChain()
160 if (SemaRef.isVisible(UD) && visited.insert(NS).second) { in addUsingDirectives()
1637 bool LookupResult::isVisibleSlow(Sema &SemaRef, NamedDecl *D) { in isVisibleSlow() argument
1641 Module *DeclModule = SemaRef.getOwningModule(D); in isVisibleSlow()
1645 if (SemaRef.isModuleVisible(DeclModule, D->isModulePrivate())) in isVisibleSlow()
1678 VisibleWithinParent = SemaRef.hasVisibleDefinition(cast<NamedDecl>(DC)); in isVisibleSlow()
1680 VisibleWithinParent = isVisible(SemaRef, cast<NamedDecl>(DC)); in isVisibleSlow()
1682 (isa<FunctionDecl>(DC) && !SemaRef.getLangOpts().CPlusPlus)) in isVisibleSlow()
1683 VisibleWithinParent = isVisible(SemaRef, cast<NamedDecl>(DC)); in isVisibleSlow()
1689 if (SemaRef.hasMergedDefinitionInCurrentModule(cast<NamedDecl>(DC))) { in isVisibleSlow()
1696 VisibleWithinParent = SemaRef.hasVisibleDefinition(cast<NamedDecl>(DC)); in isVisibleSlow()
1699 if (VisibleWithinParent && SemaRef.CodeSynthesisContexts.empty() && in isVisibleSlow()
1701 !SemaRef.getLangOpts().ModulesLocalVisibility) { in isVisibleSlow()
1794 static NamedDecl *findAcceptableDecl(Sema &SemaRef, NamedDecl *D, in findAcceptableDecl() argument
1796 assert(!LookupResult::isVisible(SemaRef, D) && "not in slow case"); in findAcceptableDecl()
1808 LookupResult::isVisible(SemaRef, ND)) in findAcceptableDecl()
3705 void lookupVisibleDecls(Sema &SemaRef, Scope *S, Sema::LookupNameKind Kind, in lookupVisibleDecls() argument
3710 UnqualUsingDirectiveSet UDirs(SemaRef); in lookupVisibleDecls()
3711 if (SemaRef.getLangOpts().CPlusPlus) { in lookupVisibleDecls()
3721 LookupResult Result(SemaRef, DeclarationName(), SourceLocation(), Kind); in lookupVisibleDecls()
3724 Visited.visitedContext(SemaRef.getASTContext().getTranslationUnitDecl()); in lookupVisibleDecls()
3729 void lookupVisibleDecls(Sema &SemaRef, DeclContext *Ctx, in lookupVisibleDecls() argument
3731 LookupResult Result(SemaRef, DeclarationName(), SourceLocation(), Kind); in lookupVisibleDecls()
3734 Visited.visitedContext(SemaRef.getASTContext().getTranslationUnitDecl()); in lookupVisibleDecls()
4081 static void LookupPotentialTypoResult(Sema &SemaRef,
4093 static void checkCorrectionVisibility(Sema &SemaRef, TypoCorrection &TC) { in checkCorrectionVisibility() argument
4097 if (!LookupResult::isVisible(SemaRef, *DI)) in checkCorrectionVisibility()
4109 if (LookupResult::isVisible(SemaRef, *DI)) { in checkCorrectionVisibility()
4185 if (!LookupResult::isVisible(SemaRef, ND) && Name != Typo) in FoundDecl()
4218 TypoCorrection TC(&SemaRef.Context.Idents.get(Name), ND, NNS, ED); in addName()
4239 checkCorrectionVisibility(SemaRef, Correction); in addCorrection()
4250 std::string CorrectionStr = Correction.getAsString(SemaRef.getLangOpts()); in addCorrection()
4258 if (CorrectionStr < RI->getAsString(SemaRef.getLangOpts())) in addCorrection()
4287 auto &Types = SemaRef.getASTContext().getTypes(); in addNamespaces()
4334 LookupPotentialTypoResult(SemaRef, Result, Name, S, TempSS, TempMemberContext, in resolveCorrection()
4367 checkCorrectionVisibility(SemaRef, Candidate); in resolveCorrection()
4412 if (!SemaRef.LookupQualifiedName(Result, Ctx)) in performQualifiedLookups()
4421 std::string NewQualified = TC.getAsString(SemaRef.getLangOpts()); in performQualifiedLookups()
4424 SS->getScopeRep()->print(OldOStream, SemaRef.getPrintingPolicy()); in performQualifiedLookups()
4434 if (SemaRef.CheckMemberAccess(TC.getCorrectionRange().getBegin(), in performQualifiedLookups()
4576 static void LookupPotentialTypoResult(Sema &SemaRef, in LookupPotentialTypoResult() argument
4606 SemaRef.LookupQualifiedName(Res, MemberContext); in LookupPotentialTypoResult()
4610 SemaRef.LookupParsedName(Res, S, SS, /*AllowBuiltinCreation=*/false, in LookupPotentialTypoResult()
4615 if (ObjCMethodDecl *Method = SemaRef.getCurMethodDecl()) { in LookupPotentialTypoResult()
4630 static void AddKeywordsToConsumer(Sema &SemaRef, in AddKeywordsToConsumer() argument
4659 if (SemaRef.getLangOpts().C99) in AddKeywordsToConsumer()
4661 if (SemaRef.getLangOpts().Bool || SemaRef.getLangOpts().CPlusPlus) in AddKeywordsToConsumer()
4663 else if (SemaRef.getLangOpts().C99) in AddKeywordsToConsumer()
4666 if (SemaRef.getLangOpts().CPlusPlus) { in AddKeywordsToConsumer()
4671 if (SemaRef.getLangOpts().CPlusPlus11) { in AddKeywordsToConsumer()
4680 if (SemaRef.getLangOpts().GNUKeywords) in AddKeywordsToConsumer()
4691 if (CCC.WantCXXNamedCasts && SemaRef.getLangOpts().CPlusPlus) { in AddKeywordsToConsumer()
4700 if (SemaRef.getLangOpts().Bool || SemaRef.getLangOpts().CPlusPlus) { in AddKeywordsToConsumer()
4705 if (SemaRef.getLangOpts().CPlusPlus) { in AddKeywordsToConsumer()
4713 if (isa<CXXMethodDecl>(SemaRef.CurContext) && in AddKeywordsToConsumer()
4714 cast<CXXMethodDecl>(SemaRef.CurContext)->isInstance()) in AddKeywordsToConsumer()
4717 if (SemaRef.getLangOpts().CPlusPlus11) { in AddKeywordsToConsumer()
4723 if (SemaRef.getLangOpts().C11) { in AddKeywordsToConsumer()
4731 if (SemaRef.getCurFunctionOrMethodDecl() || SemaRef.getCurBlock()) { in AddKeywordsToConsumer()
4739 if (SemaRef.getLangOpts().CPlusPlus) { in AddKeywordsToConsumer()
4750 if (SemaRef.getCurFunction() && in AddKeywordsToConsumer()
4751 !SemaRef.getCurFunction()->SwitchStack.empty()) { in AddKeywordsToConsumer()
4756 if (SemaRef.getLangOpts().CPlusPlus) { in AddKeywordsToConsumer()
4772 if (SemaRef.getLangOpts().CPlusPlus) { in AddKeywordsToConsumer()
4775 if (SemaRef.getLangOpts().CPlusPlus11) in AddKeywordsToConsumer()
5181 FunctionCallFilterCCC::FunctionCallFilterCCC(Sema &SemaRef, unsigned NumArgs, in FunctionCallFilterCCC() argument
5185 CurContext(SemaRef.CurContext), MemberFn(ME) { in FunctionCallFilterCCC()
5187 WantFunctionLikeCasts = SemaRef.getLangOpts().CPlusPlus && in FunctionCallFilterCCC()