Lines Matching defs:SemaRef

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