Lines Matching defs:SemaRef
97 Sema &SemaRef;
105 UnqualUsingDirectiveSet(Sema &SemaRef) : SemaRef(SemaRef) {}
124 if (SemaRef.isVisible(I))
164 if (SemaRef.isVisible(UD) && visited.insert(NS).second) {
1819 bool LookupResult::isAcceptableSlow(Sema &SemaRef, NamedDecl *D,
1824 Module *DeclModule = SemaRef.getOwningModule(D);
1828 if (SemaRef.isModuleVisible(DeclModule,
1863 SemaRef.hasAcceptableDefinition(cast<NamedDecl>(DC), Kind);
1866 isAcceptable(SemaRef, cast<NamedDecl>(DC), Kind);
1868 (isa<FunctionDecl>(DC) && !SemaRef.getLangOpts().CPlusPlus))
1869 AcceptableWithinParent = isAcceptable(SemaRef, cast<NamedDecl>(DC), Kind);
1875 if (SemaRef.hasMergedDefinitionInCurrentModule(cast<NamedDecl>(DC))) {
1883 SemaRef.hasAcceptableDefinition(cast<NamedDecl>(DC), Kind);
1886 if (AcceptableWithinParent && SemaRef.CodeSynthesisContexts.empty() &&
1889 !SemaRef.getLangOpts().ModulesLocalVisibility) {
1902 return isReachableSlow(SemaRef, D);
1946 bool LookupResult::isReachableSlow(Sema &SemaRef, NamedDecl *D) {
1947 assert(!isVisible(SemaRef, D) && "Shouldn't call the slow case.\n");
1949 Module *DeclModule = SemaRef.getOwningModule(D);
2050 static NamedDecl *findAcceptableDecl(Sema &SemaRef, NamedDecl *D,
2052 assert(!LookupResult::isAvailableForLookup(SemaRef, D) && "not in slow case");
2064 LookupResult::isAvailableForLookup(SemaRef, ND))
2109 bool LookupResult::isVisible(Sema &SemaRef, NamedDecl *D) {
2116 return isAcceptableSlow(SemaRef, D, Sema::AcceptableKind::Visible);
2119 bool LookupResult::isReachable(Sema &SemaRef, NamedDecl *D) {
2123 return isAcceptableSlow(SemaRef, D, Sema::AcceptableKind::Reachable);
2126 bool LookupResult::isAvailableForLookup(Sema &SemaRef, NamedDecl *ND) {
2128 if (isVisible(SemaRef, ND))
2136 return SemaRef.hasReachableDefinition(DeductionGuide);
2181 return SemaRef.hasReachableDefinition(TD);
4085 void lookupVisibleDecls(Sema &SemaRef, Scope *S, Sema::LookupNameKind Kind,
4090 UnqualUsingDirectiveSet UDirs(SemaRef);
4091 if (SemaRef.getLangOpts().CPlusPlus) {
4101 LookupResult Result(SemaRef, DeclarationName(), SourceLocation(), Kind);
4104 Visited.visitedContext(SemaRef.getASTContext().getTranslationUnitDecl());
4109 void lookupVisibleDecls(Sema &SemaRef, DeclContext *Ctx,
4111 LookupResult Result(SemaRef, DeclarationName(), SourceLocation(), Kind);
4114 Visited.visitedContext(SemaRef.getASTContext().getTranslationUnitDecl());
4467 static void LookupPotentialTypoResult(Sema &SemaRef,
4479 static void checkCorrectionVisibility(Sema &SemaRef, TypoCorrection &TC) {
4483 if (!LookupResult::isVisible(SemaRef, *DI))
4495 if (LookupResult::isVisible(SemaRef, *DI)) {
4571 if (!LookupResult::isVisible(SemaRef, ND) && Name != Typo)
4604 TypoCorrection TC(&SemaRef.Context.Idents.get(Name), ND, NNS, ED);
4625 checkCorrectionVisibility(SemaRef, Correction);
4656 Correction.getAsString(SemaRef.getLangOpts())};
4660 RI->getAsString(SemaRef.getLangOpts())};
4690 auto &Types = SemaRef.getASTContext().getTypes();
4737 LookupPotentialTypoResult(SemaRef, Result, Name, S, TempSS, TempMemberContext,
4770 checkCorrectionVisibility(SemaRef, Candidate);
4815 if (!SemaRef.LookupQualifiedName(Result, Ctx))
4824 std::string NewQualified = TC.getAsString(SemaRef.getLangOpts());
4827 SS->getScopeRep()->print(OldOStream, SemaRef.getPrintingPolicy());
4837 if (SemaRef.CheckMemberAccess(TC.getCorrectionRange().getBegin(),
4975 static void LookupPotentialTypoResult(Sema &SemaRef,
5005 SemaRef.LookupQualifiedName(Res, MemberContext);
5009 SemaRef.LookupParsedName(Res, S, SS,
5015 if (ObjCMethodDecl *Method = SemaRef.getCurMethodDecl()) {
5030 static void AddKeywordsToConsumer(Sema &SemaRef,
5058 if (SemaRef.getLangOpts().C99 && !SemaRef.getLangOpts().C2y)
5061 if (SemaRef.getLangOpts().C99)
5063 if (SemaRef.getLangOpts().Bool || SemaRef.getLangOpts().CPlusPlus)
5065 else if (SemaRef.getLangOpts().C99)
5068 if (SemaRef.getLangOpts().CPlusPlus) {
5073 if (SemaRef.getLangOpts().CPlusPlus11) {
5082 if (SemaRef.getLangOpts().GNUKeywords)
5093 if (CCC.WantCXXNamedCasts && SemaRef.getLangOpts().CPlusPlus) {
5102 if (SemaRef.getLangOpts().Bool || SemaRef.getLangOpts().CPlusPlus) {
5107 if (SemaRef.getLangOpts().CPlusPlus) {
5114 if (isa<CXXMethodDecl>(SemaRef.CurContext) &&
5115 cast<CXXMethodDecl>(SemaRef.CurContext)->isInstance())
5118 if (SemaRef.getLangOpts().CPlusPlus11) {
5124 if (SemaRef.getLangOpts().C11) {
5132 if (SemaRef.getCurFunctionOrMethodDecl() || SemaRef.getCurBlock()) {
5139 if (SemaRef.getLangOpts().CPlusPlus) {
5150 if (SemaRef.getCurFunction() &&
5151 !SemaRef.getCurFunction()->SwitchStack.empty()) {
5156 if (SemaRef.getLangOpts().CPlusPlus) {
5172 if (SemaRef.getLangOpts().CPlusPlus) {
5175 if (SemaRef.getLangOpts().CPlusPlus11)
5512 FunctionCallFilterCCC::FunctionCallFilterCCC(Sema &SemaRef, unsigned NumArgs,
5516 CurContext(SemaRef.CurContext), MemberFn(ME) {
5518 WantFunctionLikeCasts = SemaRef.getLangOpts().CPlusPlus &&