Home
last modified time | relevance | path

Searched refs:SemaRef (Results 1 – 25 of 39) sorted by relevance

12

/openbsd-src/gnu/llvm/clang/lib/Sema/
H A DSemaTemplateInstantiateDecl.cpp48 static bool SubstQualifier(Sema &SemaRef, const DeclT *OldDecl, DeclT *NewDecl, in SubstQualifier() argument
57 SemaRef, in SubstQualifier()
63 = SemaRef.SubstNestedNameSpecifierLoc(OldDecl->getQualifierLoc(), in SubstQualifier()
75 return ::SubstQualifier(SemaRef, OldDecl, NewDecl, TemplateArgs); in SubstQualifier()
80 return ::SubstQualifier(SemaRef, OldDecl, NewDecl, TemplateArgs); in SubstQualifier()
915 LabelDecl *Inst = LabelDecl::Create(SemaRef.Context, Owner, D->getLocation(), in VisitLabelDecl()
929 = NamespaceAliasDecl::Create(SemaRef.Context, Owner, in VisitNamespaceAliasDecl()
946 DI = SemaRef.SubstType(DI, TemplateArgs, in InstantiateTypedefNameDecl()
950 DI = SemaRef.Context.getTrivialTypeSourceInfo(SemaRef.Context.IntTy); in InstantiateTypedefNameDecl()
953 SemaRef.MarkDeclarationsReferencedInType(D->getLocation(), DI->getType()); in InstantiateTypedefNameDecl()
[all …]
H A DSemaTemplateInstantiate.cpp381 Sema &SemaRef, CodeSynthesisContext::SynthesisKind Kind, in InstantiatingTemplate() argument
385 : SemaRef(SemaRef) { in InstantiatingTemplate()
389 if (SemaRef.Diags.hasFatalErrorOccurred() && in InstantiatingTemplate()
390 SemaRef.hasUncompilableErrorOccurred()) { in InstantiatingTemplate()
405 SemaRef.pushCodeSynthesisContext(Inst); in InstantiatingTemplate()
408 !SemaRef.InstantiatingSpecializations in InstantiatingTemplate()
411 atTemplateBegin(SemaRef.TemplateInstCallbacks, SemaRef, Inst); in InstantiatingTemplate()
416 Sema &SemaRef, SourceLocation PointOfInstantiation, Decl *Entity, in InstantiatingTemplate() argument
418 : InstantiatingTemplate(SemaRef, in InstantiatingTemplate()
423 Sema &SemaRef, SourceLocation PointOfInstantiation, FunctionDecl *Entity, in InstantiatingTemplate() argument
[all …]
H A DSemaOpenMP.cpp53 Sema &SemaRef, Expr *E,
235 Sema &SemaRef; member in __anon7e4ded5b0111::DSAStackTy
340 explicit DSAStackTy(Sema &S) : SemaRef(S) {} in DSAStackTy()
468 const FunctionScopeInfo *CurFnScope = SemaRef.getCurFunction(); in pushFunction()
481 for (const FunctionScopeInfo *FSI : llvm::reverse(SemaRef.FunctionScopes)) { in popFunction()
676 SemaRef.Diag(CNew->getBeginLoc(), in hasDuplicateRequiresClause()
679 SemaRef.Diag(CPrev->getBeginLoc(), in hasDuplicateRequiresClause()
1528 static VarDecl *buildVarDecl(Sema &SemaRef, SourceLocation Loc, QualType Type, in buildVarDecl() argument
1531 DeclContext *DC = SemaRef.CurContext; in buildVarDecl()
1532 IdentifierInfo *II = &SemaRef.PP.getIdentifierTable().get(Name); in buildVarDecl()
[all …]
H A DSemaAvailability.cpp655 Sema &SemaRef; member in __anon9b3817270411::DiagnoseUnguardedAvailability
666 DiagnoseUnguardedAvailability(Sema &SemaRef, Decl *Ctx) in DiagnoseUnguardedAvailability() argument
667 : SemaRef(SemaRef), Ctx(Ctx) { in DiagnoseUnguardedAvailability()
669 SemaRef.Context.getTargetInfo().getPlatformMinVersion()); in DiagnoseUnguardedAvailability()
717 SemaRef.Diag(E->getBeginLoc(), diag::warn_at_available_unchecked_use) in VisitObjCAvailabilityCheckExpr()
718 << (!SemaRef.getLangOpts().ObjC); in VisitObjCAvailabilityCheckExpr()
730 ShouldDiagnoseAvailabilityOfDecl(SemaRef, D, nullptr, ReceiverClass); in DiagnoseDeclAvailability()
738 getAttrForPlatform(SemaRef.getASTContext(), OffendingDecl); in DiagnoseDeclAvailability()
746 if (!ShouldDiagnoseAvailabilityInContext(SemaRef, Result, Introduced, Ctx, in DiagnoseDeclAvailability()
756 SemaRef.Context, in DiagnoseDeclAvailability()
[all …]
H A DSemaInit.cpp297 Sema &SemaRef; member in __anonbcef1c200211::InitListChecker
307 DummyExpr = new (SemaRef.Context) NoInitExpr(SemaRef.Context.VoidTy); in getDummyInit()
399 unsigned DiagID = SemaRef.getLangOpts().CPlusPlus in diagnoseInitOverride()
403 if (InOverloadResolution && SemaRef.getLangOpts().CPlusPlus) { in diagnoseInitOverride()
443 SemaRef.Diag(NewInitRange.getBegin(), DiagID) in diagnoseInitOverride()
445 SemaRef.Diag(OldInit->getBeginLoc(), diag::note_previous_initializer) in diagnoseInitOverride()
446 << (OldInit->HasSideEffects(SemaRef.Context) && FullyOverwritten) in diagnoseInitOverride()
507 InitListExpr DummyInitList(SemaRef.Context, Loc, std::nullopt, Loc); in PerformEmptyInit()
513 bool EmptyInitList = SemaRef.getLangOpts().CPlusPlus11 && in PerformEmptyInit()
528 : new (SemaRef.Context) in PerformEmptyInit()
[all …]
H A DSemaLookup.cpp96 Sema &SemaRef; member in __anonb0e6ccc60111::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()
1774 bool LookupResult::isAcceptableSlow(Sema &SemaRef, NamedDecl *D, in isAcceptableSlow() argument
1779 Module *DeclModule = SemaRef.getOwningModule(D); in isAcceptableSlow()
1783 if (SemaRef.isModuleVisible(DeclModule, in isAcceptableSlow()
1818 SemaRef.hasAcceptableDefinition(cast<NamedDecl>(DC), Kind); in isAcceptableSlow()
1821 isAcceptable(SemaRef, cast<NamedDecl>(DC), Kind); in isAcceptableSlow()
1823 (isa<FunctionDecl>(DC) && !SemaRef.getLangOpts().CPlusPlus)) in isAcceptableSlow()
[all …]
H A DTreeTransform.h121 Sema &SemaRef;
130 TreeTransform(Sema &SemaRef) : SemaRef(SemaRef) { } in TreeTransform() argument
145 Sema &getSema() const { return SemaRef; } in getSema()
156 bool AlwaysRebuild() { return SemaRef.ArgumentPackSubstitutionIndex != -1; } in AlwaysRebuild()
630 return SemaRef.Context.getTrivialTypeSourceInfo(T, in InventTypeSourceInfo()
982 return SemaRef.Context.getUsingType(Found, Underlying); in RebuildUsingType()
987 return SemaRef.Context.getTypeDeclType(Typedef); in RebuildTypedefType()
993 return SemaRef.Context.getMacroQualifiedType(T, MacroII); in RebuildMacroQualifiedType()
998 return SemaRef.Context.getTypeDeclType(Record); in RebuildRecordType()
1003 return SemaRef.Context.getTypeDeclType(Enum); in RebuildEnumType()
[all …]
H A DSemaExprMember.cpp32 static bool isProvablyNotDerivedFrom(Sema &SemaRef, CXXRecordDecl *Record, in isProvablyNotDerivedFrom() argument
88 static IMAKind ClassifyImplicitMemberAccess(Sema &SemaRef, in ClassifyImplicitMemberAccess() argument
92 DeclContext *DC = SemaRef.getFunctionLevelDeclContext(); in ClassifyImplicitMemberAccess()
94 bool isStaticContext = SemaRef.CXXThisTypeOverride.isNull() && in ClassifyImplicitMemberAccess()
134 switch (SemaRef.ExprEvalContexts.back().Context) { in ClassifyImplicitMemberAccess()
137 if (isField && SemaRef.getLangOpts().CPlusPlus11) in ClassifyImplicitMemberAccess()
188 if (isProvablyNotDerivedFrom(SemaRef, contextClass, Classes)) in ClassifyImplicitMemberAccess()
197 static void diagnoseInstanceReference(Sema &SemaRef, in diagnoseInstanceReference() argument
208 DeclContext *FunctionLevelDC = SemaRef.getFunctionLevelDeclContext(); in diagnoseInstanceReference()
218 SemaRef.Diag(Loc, diag::err_invalid_member_use_in_static_method) in diagnoseInstanceReference()
[all …]
H A DSemaStmt.cpp867 Sema &SemaRef; member in __anonceb37bf40a11::CommaVisitor
869 CommaVisitor(Sema &SemaRef) : Inherited(SemaRef.Context), SemaRef(SemaRef) {} in CommaVisitor() argument
872 SemaRef.DiagnoseCommaOperator(E->getLHS(), E->getExprLoc()); in VisitBinaryOperator()
2368 static bool FinishForRangeVarDecl(Sema &SemaRef, VarDecl *Decl, Expr *Init, in FinishForRangeVarDecl() argument
2371 ExprResult Res = SemaRef.CorrectDelayedTyposInExpr(Init); in FinishForRangeVarDecl()
2383 SemaRef.Diag(Loc, DiagID) << Init->getType(); in FinishForRangeVarDecl()
2386 Sema::TemplateDeductionResult Result = SemaRef.DeduceAutoType( in FinishForRangeVarDecl()
2389 SemaRef.Diag(Loc, DiagID) << Init->getType(); in FinishForRangeVarDecl()
2401 if (SemaRef.getLangOpts().ObjCAutoRefCount && in FinishForRangeVarDecl()
2402 SemaRef.inferObjCARCLifetime(Decl)) in FinishForRangeVarDecl()
[all …]
H A DSemaCodeComplete.cpp158 Sema &SemaRef; member in __anon4b9354e00111::ResultBuilder
213 explicit ResultBuilder(Sema &SemaRef, CodeCompletionAllocator &Allocator, in ResultBuilder() argument
217 : SemaRef(SemaRef), Allocator(Allocator), CCTUInfo(CCTUInfo), in ResultBuilder()
229 if (ObjCMethodDecl *Method = SemaRef.getCurMethodDecl()) in ResultBuilder()
246 return SemaRef.CodeCompleter && in includeCodePatterns()
247 SemaRef.CodeCompleter->includeCodePatterns(); in includeCodePatterns()
259 PreferredType = SemaRef.Context.getCanonicalType(T); in setPreferredType()
295 Sema &getSema() const { return SemaRef; } in getSema()
745 static bool shouldIgnoreDueToReservedName(const NamedDecl *ND, Sema &SemaRef) { in shouldIgnoreDueToReservedName() argument
746 ReservedIdentifierStatus Status = ND->isReserved(SemaRef.getLangOpts()); in shouldIgnoreDueToReservedName()
[all …]
H A DCodeCompleteConsumer.cpp641 Sema &SemaRef, CodeCompletionContext Context, CodeCompletionResult *Results, in ProcessCodeCompleteResults() argument
648 StringRef Filter = SemaRef.getPreprocessor().getCodeCompletionFilter(); in ProcessCodeCompleteResults()
670 SemaRef, Context, getAllocator(), CCTUInfo, in ProcessCodeCompleteResults()
685 SemaRef, Context, getAllocator(), CCTUInfo, in ProcessCodeCompleteResults()
699 SourceManager &SM = SemaRef.SourceMgr; in ProcessCodeCompleteResults()
704 EInfo.second += Lexer::MeasureTokenLength(ELoc, SM, SemaRef.LangOpts); in ProcessCodeCompleteResults()
749 Sema &SemaRef, unsigned CurrentArg, OverloadCandidate *Candidates, in ProcessOverloadCandidates() argument
752 OpenParLoc.print(OS, SemaRef.getSourceManager()); in ProcessOverloadCandidates()
757 CurrentArg, SemaRef, getAllocator(), CCTUInfo, in ProcessOverloadCandidates()
H A DSemaDeclCXX.cpp1665 static bool CheckLiteralType(Sema &SemaRef, Sema::CheckConstexprKind Kind, in CheckLiteralType() argument
1673 return SemaRef.RequireLiteralType(Loc, T, DiagID, in CheckLiteralType()
1677 return !T->isLiteralType(SemaRef.Context); in CheckLiteralType()
1684 static bool CheckConstexprDestructorSubobjects(Sema &SemaRef, in CheckConstexprDestructorSubobjects() argument
1694 SemaRef.Diag(DD->getLocation(), diag::err_constexpr_dtor_subobject) in CheckConstexprDestructorSubobjects()
1697 SemaRef.Diag(Loc, diag::note_constexpr_dtor_subobject) in CheckConstexprDestructorSubobjects()
1715 static bool CheckConstexprParameterTypes(Sema &SemaRef, in CheckConstexprParameterTypes() argument
1725 if (CheckLiteralType(SemaRef, Kind, ParamLoc, *i, in CheckConstexprParameterTypes()
1736 static bool CheckConstexprReturnType(Sema &SemaRef, const FunctionDecl *FD, in CheckConstexprReturnType() argument
1738 if (CheckLiteralType(SemaRef, Kind, FD->getLocation(), FD->getReturnType(), in CheckConstexprReturnType()
[all …]
H A DSemaConcept.cpp66 ExprResult recreateBinOp(Sema &SemaRef, ExprResult LHS) const { in recreateBinOp() argument
67 return recreateBinOp(SemaRef, LHS, const_cast<Expr *>(getRHS())); in recreateBinOp()
70 ExprResult recreateBinOp(Sema &SemaRef, ExprResult LHS, in recreateBinOp() argument
80 return BinaryOperator::Create(SemaRef.Context, LHS.get(), RHS.get(), in recreateBinOp()
82 SemaRef.Context.BoolTy, VK_PRValue, in recreateBinOp()
152 Sema &SemaRef; member
154 SatisfactionStackRAII(Sema &SemaRef, const NamedDecl *ND, in SatisfactionStackRAII()
156 : SemaRef(SemaRef) { in SatisfactionStackRAII()
158 SemaRef.PushSatisfactionStackEntry(ND, FSNID); in SatisfactionStackRAII()
164 SemaRef.PopSatisfactionStackEntry(); in ~SatisfactionStackRAII()
[all …]
H A DSemaSYCL.cpp52 static bool isZeroSizedArray(Sema &SemaRef, QualType Ty) { in isZeroSizedArray() argument
53 if (const auto *CAT = SemaRef.getASTContext().getAsConstantArrayType(Ty)) in isZeroSizedArray()
H A DSemaTemplate.cpp924 static TemplateArgumentLoc translateTemplateArgument(Sema &SemaRef, in translateTemplateArgument() argument
930 QualType T = SemaRef.GetTypeFromParser(Arg.getAsType(), &DI); in translateTemplateArgument()
932 DI = SemaRef.Context.getTrivialTypeSourceInfo(T, Arg.getLocation()); in translateTemplateArgument()
949 SemaRef.Context, TArg, in translateTemplateArgument()
950 Arg.getScopeSpec().getWithLocInContext(SemaRef.Context), in translateTemplateArgument()
967 static void maybeDiagnoseTemplateParameterShadow(Sema &SemaRef, Scope *S, in maybeDiagnoseTemplateParameterShadow() argument
970 NamedDecl *PrevDecl = SemaRef.LookupSingleName( in maybeDiagnoseTemplateParameterShadow()
973 SemaRef.DiagnoseTemplateParameterShadow(Loc, PrevDecl); in maybeDiagnoseTemplateParameterShadow()
1725 ConstraintRefersToContainingTemplateChecker(Sema &SemaRef, in ConstraintRefersToContainingTemplateChecker() argument
1728 : inherited(SemaRef), Friend(Friend), TemplateDepth(TemplateDepth) {} in ConstraintRefersToContainingTemplateChecker()
[all …]
H A DSemaOverload.cpp6047 diagnoseAmbiguousConversion(Sema &SemaRef, SourceLocation Loc, Expr *From, in diagnoseAmbiguousConversion() argument
6054 Converter.diagnoseAmbiguous(SemaRef, Loc, T) << From->getSourceRange(); in diagnoseAmbiguousConversion()
6059 Converter.noteAmbiguous(SemaRef, Conv, ConvTy); in diagnoseAmbiguousConversion()
6065 diagnoseNoViableConversion(Sema &SemaRef, SourceLocation Loc, Expr *&From, in diagnoseNoViableConversion() argument
6078 ConvTy.getAsStringInternal(TypeStr, SemaRef.getPrintingPolicy()); in diagnoseNoViableConversion()
6080 Converter.diagnoseExplicitConv(SemaRef, Loc, T, ConvTy) in diagnoseNoViableConversion()
6084 SemaRef.getLocForEndOfToken(From->getEndLoc()), ")"); in diagnoseNoViableConversion()
6085 Converter.noteExplicitConv(SemaRef, Conversion, ConvTy); in diagnoseNoViableConversion()
6089 if (SemaRef.isSFINAEContext()) in diagnoseNoViableConversion()
6092 SemaRef.CheckMemberOperatorAccess(From->getExprLoc(), From, nullptr, Found); in diagnoseNoViableConversion()
[all …]
H A DSemaExprCXX.cpp707 getUuidAttrOfType(Sema &SemaRef, QualType QT, in getUuidAttrOfType() argument
731 getUuidAttrOfType(SemaRef, TA.getAsType(), UuidAttrs); in getUuidAttrOfType()
733 getUuidAttrOfType(SemaRef, TA.getAsDecl()->getType(), UuidAttrs); in getUuidAttrOfType()
3517 DiagnoseMismatchedNewDelete(Sema &SemaRef, SourceLocation DeleteLoc, in DiagnoseMismatchedNewDelete() argument
3519 SourceLocation EndOfDelete = SemaRef.getLocForEndOfToken(DeleteLoc); in DiagnoseMismatchedNewDelete()
3525 DeleteLoc, tok::l_square, SemaRef.getSourceManager(), in DiagnoseMismatchedNewDelete()
3526 SemaRef.getLangOpts(), true); in DiagnoseMismatchedNewDelete()
3530 SemaRef.Diag(DeleteLoc, diag::warn_mismatched_delete_new) in DiagnoseMismatchedNewDelete()
3534 SemaRef.Diag(NE->getExprLoc(), diag::note_allocated_here) in DiagnoseMismatchedNewDelete()
7693 canRecoverDotPseudoDestructorCallsOnPointerObjects(Sema &SemaRef, in canRecoverDotPseudoDestructorCallsOnPointerObjects() argument
[all …]
/openbsd-src/gnu/llvm/clang/include/clang/Sema/
H A DTemplate.h342 Sema &SemaRef;
397 LocalInstantiationScope(Sema &SemaRef, bool CombineWithOuterScope = false)
398 : SemaRef(SemaRef), Outer(SemaRef.CurrentInstantiationScope), in SemaRef() argument
400 SemaRef.CurrentInstantiationScope = this; in SemaRef()
411 const Sema &getSema() const { return SemaRef; } in getSema()
421 SemaRef.CurrentInstantiationScope = Outer; in Exit()
432 LocalInstantiationScope *oldScope = SemaRef.CurrentInstantiationScope; in cloneScopes()
435 new LocalInstantiationScope(SemaRef, CombineWithOuterScope); in cloneScopes()
461 SemaRef.CurrentInstantiationScope = oldScope; in cloneScopes()
530 Sema &SemaRef; variable
[all …]
H A DLookup.h145 LookupResult(Sema &SemaRef, const DeclarationNameInfo &NameInfo,
148 : SemaPtr(&SemaRef), NameInfo(NameInfo), LookupKind(LookupKind),
158 LookupResult(Sema &SemaRef, DeclarationName Name,
161 : SemaPtr(&SemaRef), NameInfo(Name, NameLoc), LookupKind(LookupKind),
349 static bool isVisible(Sema &SemaRef, NamedDecl *D);
351 static bool isReachable(Sema &SemaRef, NamedDecl *D);
353 static bool isAcceptable(Sema &SemaRef, NamedDecl *D, in isAcceptable() argument
355 return Kind == Sema::AcceptableKind::Visible ? isVisible(SemaRef, D) in isAcceptable()
356 : isReachable(SemaRef, D); in isAcceptable()
381 static bool isAvailableForLookup(Sema &SemaRef, NamedDecl *ND);
[all …]
H A DSemaInternal.h91 TypoCorrectionConsumer(Sema &SemaRef, in TypoCorrectionConsumer() argument
99 SavedTCIndex(0), SemaRef(SemaRef), S(S), in TypoCorrectionConsumer()
102 Result(SemaRef, TypoName, LookupKind), in TypoCorrectionConsumer()
103 Namespaces(SemaRef.Context, SemaRef.CurContext, SS), in TypoCorrectionConsumer()
201 ASTContext &getContext() const { return SemaRef.Context; } in getContext()
309 Sema &SemaRef; variable
/openbsd-src/gnu/llvm/clang/include/clang/Serialization/
H A DASTWriter.h527 void WriteSelectors(Sema &SemaRef);
528 void WriteReferencedSelectorsPool(Sema &SemaRef);
534 void WriteOpenCLExtensions(Sema &SemaRef);
535 void WriteCUDAPragmas(Sema &SemaRef);
537 void WriteLateParsedTemplates(Sema &SemaRef);
538 void WriteOptimizePragmaOptions(Sema &SemaRef);
539 void WriteMSStructPragmaOptions(Sema &SemaRef);
540 void WriteMSPointersToMembersPragmaOptions(Sema &SemaRef);
541 void WritePackPragmaOptions(Sema &SemaRef);
542 void WriteFloatControlPragmaOptions(Sema &SemaRef);
[all …]
H A DModuleFileExtension.h132 virtual void writeExtensionContents(Sema &SemaRef,
/openbsd-src/gnu/llvm/clang/lib/Serialization/
H A DASTWriter.cpp3313 void ASTWriter::WriteSelectors(Sema &SemaRef) { in WriteSelectors() argument
3317 if (SemaRef.MethodPool.empty() && SelectorIDs.empty()) in WriteSelectors()
3331 Sema::GlobalMethodPool::iterator F = SemaRef.MethodPool.find(S); in WriteSelectors()
3337 if (F != SemaRef.MethodPool.end()) { in WriteSelectors()
3419 void ASTWriter::WriteReferencedSelectorsPool(Sema &SemaRef) { in WriteReferencedSelectorsPool() argument
3422 if (SemaRef.ReferencedSelectors.empty()) in WriteReferencedSelectorsPool()
3431 for (auto &SelectorAndLocation : SemaRef.ReferencedSelectors) { in WriteReferencedSelectorsPool()
4166 void ASTWriter::WriteOpenCLExtensions(Sema &SemaRef) { in WriteOpenCLExtensions() argument
4167 if (!SemaRef.Context.getLangOpts().OpenCL) in WriteOpenCLExtensions()
4170 const OpenCLOptions &Opts = SemaRef.getOpenCLOptions(); in WriteOpenCLExtensions()
[all …]
/openbsd-src/gnu/llvm/clang/lib/ARCMigrate/
H A DInternals.h151 Sema &SemaRef; variable
160 : Ctx(Ctx), OrigGCMode(OrigGCMode), SemaRef(sema), TA(TA), in MigrationPass()
/openbsd-src/gnu/llvm/clang/lib/Frontend/
H A DTestModuleFileExtension.h33 void writeExtensionContents(Sema &SemaRef,

12