14 #ifndef LLVM_CLANG_SEMA_SEMA_H 15 #define LLVM_CLANG_SEMA_SEMA_H 50 #include "llvm/ADT/ArrayRef.h" 51 #include "llvm/ADT/Optional.h" 52 #include "llvm/ADT/SetVector.h" 53 #include "llvm/ADT/SmallBitVector.h" 54 #include "llvm/ADT/SmallPtrSet.h" 55 #include "llvm/ADT/SmallVector.h" 56 #include "llvm/ADT/TinyPtrVector.h" 64 template <
typename ValueT>
struct DenseMapInfo;
65 template <
typename ValueT,
typename ValueInfoT>
class DenseSet;
67 struct InlineAsmIdentifierInfo;
74 class ASTMutationListener;
84 class CXXBindTemporaryExpr;
86 class CXXConstructorDecl;
87 class CXXConversionDecl;
89 class CXXDestructorDecl;
90 class CXXFieldCollector;
91 class CXXMemberCallExpr;
97 class ClassTemplateDecl;
98 class ClassTemplatePartialSpecializationDecl;
99 class ClassTemplateSpecializationDecl;
100 class VarTemplatePartialSpecializationDecl;
101 class CodeCompleteConsumer;
102 class CodeCompletionAllocator;
103 class CodeCompletionTUInfo;
104 class CodeCompletionResult;
105 class CoroutineBodyStmt;
107 class DeclAccessPair;
110 class DeclaratorDecl;
111 class DeducedTemplateArgument;
112 class DependentDiagnostic;
113 class DesignatedInitExpr;
116 class EnumConstantDecl;
122 class FunctionProtoType;
123 class FunctionTemplateDecl;
124 class ImplicitConversionSequence;
127 class InitializationKind;
128 class InitializationSequence;
129 class InitializedEntity;
130 class IntegerLiteral;
134 class LocalInstantiationScope;
139 class MultiLevelTemplateArgumentList;
141 class ObjCCategoryDecl;
142 class ObjCCategoryImplDecl;
143 class ObjCCompatibleAliasDecl;
144 class ObjCContainerDecl;
146 class ObjCImplementationDecl;
147 class ObjCInterfaceDecl;
149 template <
class T>
class ObjCList;
150 class ObjCMessageExpr;
151 class ObjCMethodDecl;
152 class ObjCPropertyDecl;
153 class ObjCProtocolDecl;
154 class OMPThreadPrivateDecl;
155 class OMPRequiresDecl;
156 class OMPDeclareReductionDecl;
157 class OMPDeclareSimdDecl;
159 struct OMPVarListLocTy;
160 struct OverloadCandidate;
161 class OverloadCandidateSet;
166 class PseudoDestructorTypeStorage;
167 class PseudoObjectExpr;
169 class StandardConversionSequence;
173 class TemplateArgument;
174 class TemplateArgumentList;
175 class TemplateArgumentLoc;
177 class TemplateInstantiationCallback;
178 class TemplateParameterList;
179 class TemplatePartialOrderingContext;
180 class TemplateTemplateParmDecl;
184 class TypedefNameDecl;
186 class TypoCorrectionConsumer;
188 class UnresolvedLookupExpr;
189 class UnresolvedMemberExpr;
190 class UnresolvedSetImpl;
191 class UnresolvedSetIterator;
193 class UsingShadowDecl;
196 class VarTemplateSpecializationDecl;
197 class VisibilityAttr;
198 class VisibleDeclConsumer;
199 class IndirectFieldDecl;
200 struct DeductionFailureInfo;
201 class TemplateSpecCandidateSet;
204 class AccessedEntity;
205 class BlockScopeInfo;
207 class CapturedRegionScopeInfo;
208 class CapturingScopeInfo;
209 class CompoundScopeInfo;
210 class DelayedDiagnostic;
211 class DelayedDiagnosticPool;
212 class FunctionScopeInfo;
213 class LambdaScopeInfo;
214 class PossiblyUnreachableDiag;
215 class SemaPPCallbacks;
216 class TemplateDeductionInfo;
219 namespace threadSafety {
226 typedef std::pair<llvm::PointerUnion<const TemplateTypeParmType*, NamedDecl*>,
244 bool SawTypeNullability =
false;
251 llvm::DenseMap<FileID, FileNullability> Map;
262 if (file ==
Cache.File)
263 return Cache.Nullability;
266 if (!
Cache.File.isInvalid()) {
272 Cache.Nullability = Map[file];
273 return Cache.Nullability;
296 llvm::function_ref<
QualType()> ComputeType);
308 if (Tok != ExpectedLoc)
313 return ComputeType();
324 llvm::function_ref<QualType()> ComputeType;
330 void operator=(
const Sema &) =
delete;
336 bool isMultiplexExternalSource;
338 static bool mightHaveNonExternalLinkage(
const DeclaratorDecl *FD);
345 bool shouldLinkPossiblyHiddenDecl(
const NamedDecl *Old,
353 "should not have found a non-externally-declarable previous decl");
360 void setupImplicitSpecialMemberType(
CXXMethodDecl *SpecialMem,
443 PSK_Push_Set = PSK_Push | PSK_Set,
444 PSK_Pop_Set = PSK_Pop | PSK_Set,
447 template<
typename ValueType>
454 Slot(llvm::StringRef StackSlotLabel, ValueType Value,
456 : StackSlotLabel(StackSlotLabel), Value(Value),
457 PragmaLocation(PragmaLocation),
458 PragmaPushLocation(PragmaPushLocation) {}
462 llvm::StringRef StackSlotLabel,
480 assert((Action == PSK_Push || Action == PSK_Pop) &&
481 "Can only push / pop #pragma stack sentinels!");
482 Act(CurrentPragmaLocation, Action, Label, CurrentValue);
487 : DefaultValue(Default), CurrentValue(Default) {}
489 bool hasValue()
const {
return CurrentValue != DefaultValue; }
510 static const unsigned kMac68kAlignmentSentinel = ~0U;
605 &ExternalSemaSource::ReadExtVectorDecls, 2, 2>
649 &ExternalSemaSource::ReadTentativeDefinitions, 2, 2>
656 &ExternalSemaSource::ReadUnusedFileScopedDecls, 2, 2>
664 &ExternalSemaSource::ReadDelegatingConstructors, 2, 2>
686 std::unique_ptr<LateParsedTemplate>>
698 LateTemplateParserCleanupCB *LTPCleanup,
700 LateTemplateParser = LTP;
701 LateTemplateParserCleanup = LTPCleanup;
739 state.SavedPool = CurPool;
748 CurPool = state.SavedPool;
755 state.SavedPool = CurPool;
762 assert(CurPool ==
nullptr);
763 CurPool = state.SavedPool;
772 ProcessingContextState SavedContextState;
777 : S(S), SavedContext(S.CurContext),
779 SavedCXXThisTypeOverride(S.CXXThisTypeOverride)
781 assert(ContextToPush &&
"pushing null context");
788 if (!SavedContext)
return;
792 SavedContext =
nullptr;
805 return ExprEvalContexts.back().isConstantEvaluated() ||
806 isConstantEvaluatedOverride;
814 bool PushedCodeSynthesisContext =
false;
818 : S(S), SavedContext(S, DC) {
821 Sema::ExpressionEvaluationContext::PotentiallyEvaluated);
822 if (
auto *FD = dyn_cast<FunctionDecl>(DC))
823 FD->setWillHaveBody(
true);
825 assert(isa<ObjCMethodDecl>(DC));
829 assert(!PushedCodeSynthesisContext);
832 Ctx.
Kind = Sema::CodeSynthesisContext::DefiningSynthesizedFunction;
837 PushedCodeSynthesisContext =
true;
841 if (PushedCodeSynthesisContext)
843 if (
auto *FD = dyn_cast<FunctionDecl>(S.
CurContext))
844 FD->setWillHaveBody(
false);
863 void LoadExternalWeakUndeclaredIdentifiers();
998 PotentiallyEvaluated,
1008 PotentiallyEvaluatedIfUsed
1066 unsigned NumCleanupObjects,
1068 Decl *ManglingContextDecl,
1070 : Context(Context), ParentCleanup(ParentCleanup),
1071 NumCleanupObjects(NumCleanupObjects), NumTypos(0),
1072 ManglingContextDecl(ManglingContextDecl), MangleNumbering(),
1073 ExprContext(ExprContext) {}
1080 return Context == ExpressionEvaluationContext::Unevaluated ||
1081 Context == ExpressionEvaluationContext::UnevaluatedAbstract ||
1082 Context == ExpressionEvaluationContext::UnevaluatedList;
1085 return Context == ExpressionEvaluationContext::ConstantEvaluated;
1104 Decl *&ManglingContextDecl);
1121 llvm::PointerIntPair<CXXMethodDecl*, 2> Pair;
1126 : Pair(MD, MD->isDeleted() ? NoMemberOrDeleted : Success) {}
1136 :
public llvm::FastFoldingSetNode,
1140 : FastFoldingSetNode(ID)
1166 typedef llvm::DenseMap<ParmVarDecl *, llvm::TinyPtrVector<ParmVarDecl *>>
1189 bool isExternalWithNoLinkageType(
ValueDecl *VD);
1192 void getUndefinedButUsed(
1197 const llvm::MapVector<FieldDecl *, DeleteLocs> &
1198 getMismatchingDeleteExpressions()
const;
1231 typedef llvm::PointerIntPair<CXXRecordDecl *, 3, CXXSpecialMember>
1250 void updateOutOfDateSelector(
Selector Sel);
1253 bool isSelfExpr(
Expr *RExpr);
1259 void EmitCurrentDiagnostic(
unsigned DiagID);
1273 void addImplicitTypedef(StringRef Name,
QualType T);
1302 void addExternalSource(ExternalSemaSource *E);
1304 void PrintStats()
const;
1333 if (!isActive())
return;
1352 template<
typename T>
1386 void emitAndClearUnusedLocalTypedefWarnings();
1400 void ActOnStartOfTranslationUnit();
1401 void ActOnEndOfTranslationUnit();
1404 void CheckDelegatingCtorCycles();
1408 void PushFunctionScope();
1415 void RecordParsingTemplateParameterDepth(
unsigned Depth);
1432 std::unique_ptr<sema::FunctionScopeInfo, PoppedFunctionScopeDeleter>;
1436 const Decl *D =
nullptr,
1440 return FunctionScopes.empty() ? nullptr : FunctionScopes.back();
1445 void setFunctionHasBranchIntoScope();
1446 void setFunctionHasBranchProtectedScope();
1447 void setFunctionHasIndirectGoto();
1449 void PushCompoundScope(
bool IsStmtExpr);
1450 void PopCompoundScope();
1454 bool hasAnyUnrecoverableErrorsInThisFunction()
const;
1464 getCurLambda(
bool IgnoreNonLambdaCapturingScope =
false);
1490 Expr *ArraySize,
unsigned Quals,
1560 void UpdateExceptionSpec(FunctionDecl *FD,
1563 bool CheckDistantExceptionSpec(
QualType T);
1564 bool CheckEquivalentExceptionSpec(FunctionDecl *Old, FunctionDecl *New);
1565 bool CheckEquivalentExceptionSpec(
1568 bool CheckEquivalentExceptionSpec(
1620 std::tuple<
const Ts &...> Args;
1624 llvm::index_sequence<Is...>)
const {
1626 bool Dummy[] = {
false, (DB << getPrintable(std::get<Is>(Args)))...};
1633 assert(DiagID != 0 &&
"no diagnostic for type diagnoser");
1638 emit(DB, llvm::index_sequence_for<Ts...>());
1652 void CheckAddressOfNoDeref(
const Expr *E);
1653 void CheckMemberAccessOfNoDeref(
const MemberExpr *E);
1658 struct ModuleScope {
1661 bool ModuleInterface =
false;
1662 bool ImplicitGlobalModuleFragment =
false;
1669 llvm::SmallPtrSet<const NamespaceDecl*, 8> DeferredExportedNamespaces;
1672 Module *getCurrentModule()
const {
1673 return ModuleScopes.empty() ? nullptr : ModuleScopes.back().Module;
1684 void makeMergedDefinitionVisible(
NamedDecl *ND);
1686 bool isModuleVisible(
const Module *M,
bool ModulePrivate =
false);
1690 return !D->
isHidden() || isVisibleSlow(D);
1697 return isVisible(D) || hasVisibleDeclarationSlow(D, Modules);
1699 bool hasVisibleDeclarationSlow(
const NamedDecl *D,
1702 bool hasVisibleMergedDefinition(
NamedDecl *Def);
1703 bool hasMergedDefinitionInCurrentModule(
NamedDecl *Def);
1707 bool hasStructuralCompatLayout(
Decl *D,
Decl *Suggested);
1712 bool OnlyNeedComplete =
false);
1715 return hasVisibleDefinition(const_cast<NamedDecl*>(D), &Hidden);
1726 bool hasVisibleExplicitSpecialization(
1731 bool hasVisibleMemberSpecialization(
1737 bool isEquivalentInternalLinkageDeclaration(
const NamedDecl *A,
1739 void diagnoseEquivalentInternalLinkageDeclarations(
1746 return !RequireCompleteTypeImpl(Loc, T,
nullptr);
1753 template <
typename... Ts>
1755 const Ts &...Args) {
1757 return RequireCompleteType(Loc, T, Diagnoser);
1760 void completeExprArrayBound(
Expr *E);
1762 bool RequireCompleteExprType(
Expr *E,
unsigned DiagID);
1764 template <
typename... Ts>
1767 return RequireCompleteExprType(E, Diagnoser);
1774 template <
typename... Ts>
1776 const Ts &...Args) {
1778 return RequireLiteralType(Loc, T, Diagnoser);
1783 TagDecl *OwnedTagDecl =
nullptr);
1789 bool AsUnevaluated =
true);
1808 DeclGroupPtrTy ConvertDeclToDeclGroup(
Decl *Ptr,
Decl *OwnedType =
nullptr);
1810 void DiagnoseUseOfUnimplementedSelectors();
1816 bool isClassName =
false,
bool HasTrailingDot =
false,
1818 bool IsCtorOrDtorName =
false,
1819 bool WantNontrivialTypeSourceInfo =
false,
1820 bool IsClassTemplateDeductionContext =
true,
1829 bool IsTemplateName =
false);
1837 bool IsTemplateTypeArg);
1883 Result.Template = Name;
1889 Result.Template = Name;
1895 Result.Template = Name;
1901 Result.Template = Name;
1908 assert(Kind == NC_Type);
1913 assert(Kind == NC_Expression);
1918 assert(Kind == NC_TypeTemplate || Kind == NC_FunctionTemplate ||
1919 Kind == NC_VarTemplate || Kind == NC_UndeclaredTemplate);
1925 case NC_TypeTemplate:
1927 case NC_FunctionTemplate:
1929 case NC_VarTemplate:
1931 case NC_UndeclaredTemplate:
1934 llvm_unreachable(
"unsupported name classification.");
1965 const Token &NextToken,
1966 bool IsAddressOfOperand,
1975 TemplateTemplateParam,
1988 if (
auto *DRE = dyn_cast<DeclRefExpr>(E.
get()))
1989 return !DRE->hasExplicitTemplateArgs();
1990 if (
auto *ME = dyn_cast<MemberExpr>(E.
get()))
1991 return !ME->hasExplicitTemplateArgs();
1993 if (
auto *DSDRE = dyn_cast<DependentScopeDeclRefExpr>(E.
get()))
1994 return !DSDRE->hasExplicitTemplateArgs();
1995 if (
auto *DSME = dyn_cast<CXXDependentScopeMemberExpr>(E.
get()))
1996 return !DSME->hasExplicitTemplateArgs();
2015 diagnoseIgnoredQualifiers(
unsigned DiagID,
unsigned Quals,
2023 static bool adjustContextForLocalExternDecl(
DeclContext *&DC);
2024 void DiagnoseFunctionSpecifiers(
const DeclSpec &DS);
2025 NamedDecl *getShadowedDeclaration(
const TypedefNameDecl *D,
2030 void CheckShadow(
Scope *S, VarDecl *D);
2041 llvm::DenseMap<const NamedDecl *, const NamedDecl *> ShadowingDecls;
2045 void handleTagNumbering(
const TagDecl *Tag,
Scope *TagScope);
2046 void setTagNameForLinkagePurposes(
TagDecl *TagFromDeclSpec,
2047 TypedefNameDecl *NewTD);
2048 void CheckTypedefForVariablyModifiedType(
Scope *S, TypedefNameDecl *D);
2064 bool CheckVariableDeclaration(VarDecl *NewVD,
LookupResult &Previous);
2065 void CheckVariableDeclarationType(VarDecl *NewVD);
2066 bool DeduceVariableDeclarationType(VarDecl *VDecl,
bool DirectInit,
2068 void CheckCompleteVariableDeclaration(VarDecl *VD);
2070 void MaybeSuggestAddingStaticToDecl(
const FunctionDecl *D);
2079 bool CheckConstexprFunctionDecl(
const FunctionDecl *FD);
2080 bool CheckConstexprFunctionBody(
const FunctionDecl *FD,
Stmt *Body);
2088 bool CheckFunctionDeclaration(
Scope *S,
2090 bool IsMemberSpecialization);
2091 bool shouldLinkDependentDeclWithPrevious(
Decl *D,
Decl *OldDecl);
2094 void CheckMain(FunctionDecl *FD,
const DeclSpec &D);
2095 void CheckMSVCRTEntryPoint(FunctionDecl *FD);
2096 Attr *getImplicitCodeSegOrSectionAttrForFunction(
const FunctionDecl *FD,
2107 void ActOnParamDefaultArgument(
Decl *param,
2110 void ActOnParamUnparsedDefaultArgument(
Decl *param,
2149 NTCUK_Destruct = 0x2,
2157 unsigned NonTrivialKind);
2159 void AddInitializerToDecl(
Decl *dcl,
Expr *init,
bool DirectInit);
2160 void ActOnUninitializedDecl(
Decl *dcl);
2161 void ActOnInitializerError(
Decl *Dcl);
2164 void ActOnCXXForRangeDecl(
Decl *D);
2171 void CheckStaticLocalForDllExport(VarDecl *VD);
2172 void FinalizeDeclaration(
Decl *D);
2173 DeclGroupPtrTy FinalizeDeclaratorGroup(
Scope *S,
const DeclSpec &DS,
2179 void ActOnDocumentableDecl(
Decl *D);
2184 void CheckForFunctionRedefinition(
2185 FunctionDecl *FD,
const FunctionDecl *EffectiveDefinition =
nullptr,
2192 void ActOnStartOfObjCMethodDef(
Scope *S,
Decl *D);
2194 return D && isa<ObjCMethodDecl>(D);
2205 bool canDelayFunctionBody(
const Declarator &D);
2214 bool canSkipFunctionBody(
Decl *D);
2218 Decl *ActOnFinishFunctionBody(Decl *Decl,
Stmt *Body,
bool IsInstantiation);
2219 Decl *ActOnSkippedFunctionBody(Decl *Decl);
2220 void ActOnFinishInlineFunctionDef(FunctionDecl *D);
2224 void ActOnFinishDelayedAttribute(Scope *S, Decl *D,
ParsedAttributes &Attrs);
2237 void DiagnoseInvalidJumps(
Stmt *Body);
2238 Decl *ActOnFileScopeAsmDecl(
Expr *
expr,
2255 ModuleIdPath Path,
bool IsFirstDecl);
2260 DeclGroupPtrTy ActOnGlobalModuleFragmentDecl(
SourceLocation ModuleLoc);
2266 DeclGroupPtrTy ActOnPrivateModuleFragmentDecl(
SourceLocation ModuleLoc,
2282 ModuleIdPath Path = {});
2300 void createImplicitModuleImportForErrorRecovery(
SourceLocation Loc,
2309 ExplicitSpecialization,
2310 PartialSpecialization
2323 Decl *ActOnFinishExportDecl(Scope *S, Decl *
ExportDecl,
2339 return getPrintingPolicy(Context, PP);
2348 void ActOnTranslationUnitScope(Scope *S);
2354 bool IsExplicitInstantiation,
2357 Decl *BuildAnonymousStructOrUnion(Scope *S,
DeclSpec &DS,
2362 Decl *BuildMicrosoftCAnonymousStruct(Scope *S,
DeclSpec &DS,
2383 bool isAcceptableTagRedeclaration(
const TagDecl *Previous,
2395 Decl *ActOnTag(Scope *S,
unsigned TagSpec,
TagUseKind TUK,
2401 bool ScopedEnumUsesClassTag,
TypeResult UnderlyingType,
2402 bool IsTypeSpecifier,
bool IsTemplateParamOrArg,
2405 Decl *ActOnTemplatedFriendTag(Scope *S,
SourceLocation FriendLoc,
2432 Expr *BitfieldWidth,
2440 bool Mutable,
Expr *BitfieldWidth,
2446 bool CheckNontrivialField(
FieldDecl *FD);
2454 TAH_ConsiderTrivialABI
2459 bool Diagnose =
false);
2475 void ActOnTagStartDefinition(Scope *S, Decl *
TagDecl);
2480 bool ActOnDuplicateDefinition(
DeclSpec &DS, Decl *Prev,
2486 SkippedDefinitionContext ActOnTagStartSkippedDefinition(Scope *S, Decl *TD);
2488 Decl *ActOnObjCContainerStartDefinition(Decl *IDecl);
2493 void ActOnStartCXXMemberDeclarations(Scope *S, Decl *
TagDecl,
2495 bool IsFinalSpelledSealed,
2500 void ActOnTagFinishDefinition(Scope *S, Decl *
TagDecl,
2503 void ActOnTagFinishSkippedDefinition(SkippedDefinitionContext Context);
2505 void ActOnObjCContainerFinishDefinition();
2511 void ActOnObjCTemporaryExitContainerContext(
DeclContext *DC);
2512 void ActOnObjCReenterContainerContext(
DeclContext *DC);
2516 void ActOnTagDefinitionError(Scope *S, Decl *
TagDecl);
2524 bool CheckEnumRedeclaration(
SourceLocation EnumLoc,
bool IsScoped,
2525 QualType EnumUnderlyingTy,
bool IsFixed,
2533 Decl *ActOnEnumConstant(Scope *S, Decl *
EnumDecl, Decl *LastEnumConstant,
2545 void PopDeclContext();
2549 void EnterDeclaratorContext(Scope *S,
DeclContext *DC);
2550 void ExitDeclaratorContext(Scope *S);
2553 void ActOnReenterFunctionContext(Scope* S, Decl* D);
2554 void ActOnExitFunctionContext();
2561 FunctionDecl *getCurFunctionDecl();
2571 NamedDecl *getCurFunctionOrMethodDecl();
2574 void PushOnScopeChains(
NamedDecl *D, Scope *S,
bool AddToContext =
true);
2584 bool AllowInlineNamespace =
false);
2588 static Scope *getScopeForDeclContext(Scope *S,
DeclContext *DC);
2593 bool isIncompatibleTypedef(
TypeDecl *Old, TypedefNameDecl *New);
2629 AP_PragmaClangAttribute = 1,
2633 AP_InferredFromOtherPlatform = 2
2637 AvailabilityAttr *mergeAvailabilityAttr(
2639 VersionTuple Introduced, VersionTuple Deprecated, VersionTuple Obsoleted,
2640 bool IsUnavailable, StringRef Message,
bool IsStrict,
2642 unsigned AttrSpellingListIndex);
2643 TypeVisibilityAttr *mergeTypeVisibilityAttr(Decl *D,
SourceRange Range,
2644 TypeVisibilityAttr::VisibilityType Vis,
2645 unsigned AttrSpellingListIndex);
2646 VisibilityAttr *mergeVisibilityAttr(Decl *D,
SourceRange Range,
2647 VisibilityAttr::VisibilityType Vis,
2648 unsigned AttrSpellingListIndex);
2649 UuidAttr *mergeUuidAttr(Decl *D,
SourceRange Range,
2650 unsigned AttrSpellingListIndex, StringRef Uuid);
2651 DLLImportAttr *mergeDLLImportAttr(Decl *D,
SourceRange Range,
2652 unsigned AttrSpellingListIndex);
2653 DLLExportAttr *mergeDLLExportAttr(Decl *D,
SourceRange Range,
2654 unsigned AttrSpellingListIndex);
2656 mergeMSInheritanceAttr(Decl *D,
SourceRange Range,
bool BestCase,
2657 unsigned AttrSpellingListIndex,
2658 MSInheritanceAttr::Spelling SemanticSpelling);
2659 FormatAttr *mergeFormatAttr(Decl *D,
SourceRange Range,
2661 int FirstArg,
unsigned AttrSpellingListIndex);
2662 SectionAttr *mergeSectionAttr(Decl *D,
SourceRange Range, StringRef Name,
2663 unsigned AttrSpellingListIndex);
2664 CodeSegAttr *mergeCodeSegAttr(Decl *D,
SourceRange Range, StringRef Name,
2665 unsigned AttrSpellingListIndex);
2666 AlwaysInlineAttr *mergeAlwaysInlineAttr(Decl *D,
SourceRange Range,
2668 unsigned AttrSpellingListIndex);
2669 MinSizeAttr *mergeMinSizeAttr(Decl *D,
SourceRange Range,
2670 unsigned AttrSpellingListIndex);
2671 NoSpeculativeLoadHardeningAttr *
2672 mergeNoSpeculativeLoadHardeningAttr(Decl *D,
2673 const NoSpeculativeLoadHardeningAttr &AL);
2674 SpeculativeLoadHardeningAttr *
2675 mergeSpeculativeLoadHardeningAttr(Decl *D,
2676 const SpeculativeLoadHardeningAttr &AL);
2677 OptimizeNoneAttr *mergeOptimizeNoneAttr(Decl *D,
SourceRange Range,
2678 unsigned AttrSpellingListIndex);
2679 InternalLinkageAttr *mergeInternalLinkageAttr(Decl *D,
const ParsedAttr &AL);
2680 InternalLinkageAttr *mergeInternalLinkageAttr(Decl *D,
2681 const InternalLinkageAttr &AL);
2682 CommonAttr *mergeCommonAttr(Decl *D,
const ParsedAttr &AL);
2683 CommonAttr *mergeCommonAttr(Decl *D,
const CommonAttr &AL);
2685 void mergeDeclAttributes(
NamedDecl *New, Decl *Old,
2687 void MergeTypedefNameDecl(Scope *S, TypedefNameDecl *New,
2689 bool MergeFunctionDecl(FunctionDecl *New,
NamedDecl *&Old, Scope *S,
2690 bool MergeTypeWithOld);
2691 bool MergeCompatibleFunctionDecls(FunctionDecl *New, FunctionDecl *Old,
2692 Scope *S,
bool MergeTypeWithOld);
2694 void MergeVarDecl(VarDecl *New,
LookupResult &Previous);
2695 void MergeVarDeclTypes(VarDecl *New, VarDecl *Old,
bool MergeTypeWithOld);
2696 void MergeVarDeclExceptionSpecs(VarDecl *New, VarDecl *Old);
2697 bool checkVarDeclRedefinition(VarDecl *OldDefn, VarDecl *NewDefn);
2699 bool MergeCXXFunctionDecl(FunctionDecl *New, FunctionDecl *Old, Scope *S);
2711 AA_Passing_CFAudited
2732 bool IsForUsingDecl);
2733 bool IsOverload(FunctionDecl *New, FunctionDecl *Old,
bool IsForUsingDecl,
2734 bool ConsiderCudaAttrs =
true);
2738 bool SuppressUserConversions,
2740 bool InOverloadResolution,
2742 bool AllowObjCWritebackConversion);
2748 bool InOverloadResolution,
2749 QualType& ConvertedType,
bool &IncompatibleObjC);
2751 QualType& ConvertedType,
bool &IncompatibleObjC);
2758 unsigned *ArgPos =
nullptr);
2764 bool CheckPointerConversion(
Expr *From,
QualType ToType,
2766 CXXCastPath& BasePath,
2767 bool IgnoreBaseAccess,
2768 bool Diagnose =
true);
2770 bool InOverloadResolution,
2772 bool CheckMemberPointerConversion(
Expr *From,
QualType ToType,
2774 CXXCastPath &BasePath,
2775 bool IgnoreBaseAccess);
2777 bool CStyle,
bool &ObjCLifetimeConversion);
2780 bool DiagnoseMultipleUserDefinedConversion(
Expr *From,
QualType ToType);
2784 const VarDecl *NRVOCandidate,
2787 bool AllowNRVO =
true);
2794 bool TopLevelOfInitList =
false,
2795 bool AllowExplicit =
false);
2831 bool SuppressConversion =
false)
2832 : Suppress(Suppress), SuppressConversion(SuppressConversion) {}
2874 bool AllowScopedEnumerations;
2878 bool Suppress,
bool SuppressConversion)
2880 AllowScopedEnumerations(AllowScopedEnumerations) {}
2887 return diagnoseNotInt(S, Loc, T);
2897 ExprResult PerformContextualImplicitConversion(
2933 void AddOverloadCandidate(FunctionDecl *Function,
DeclAccessPair FoundDecl,
2936 bool SuppressUserConversions =
false,
2937 bool PartialOverloading =
false,
2938 bool AllowExplicit =
true,
2939 bool AllowExplicitConversion =
false,
2941 ConversionSequenceList EarlyConversions = None);
2946 bool SuppressUserConversions =
false,
2947 bool PartialOverloading =
false,
2948 bool FirstArgumentIsBase =
false);
2954 bool SuppressUserConversion =
false);
2961 bool SuppressUserConversions =
false,
2962 bool PartialOverloading =
false,
2963 ConversionSequenceList EarlyConversions = None);
2972 bool SuppressUserConversions =
false,
2973 bool PartialOverloading =
false);
2974 void AddTemplateOverloadCandidate(
2978 bool PartialOverloading =
false,
bool AllowExplicit =
true,
2979 ADLCallKind IsADLCandidate = ADLCallKind::NotADL);
2984 ConversionSequenceList &Conversions,
2985 bool SuppressUserConversions,
2989 ObjectClassification = {});
2990 void AddConversionCandidate(
2994 bool AllowExplicit,
bool AllowResultConversion =
true);
2995 void AddTemplateConversionCandidate(
2999 bool AllowExplicit,
bool AllowResultConversion =
true);
3012 bool IsAssignmentOperator =
false,
3013 unsigned NumContextualBoolArguments = 0);
3022 bool PartialOverloading =
false);
3025 void NoteOverloadCandidate(
NamedDecl *Found, FunctionDecl *Fn,
3027 bool TakingAddress =
false);
3032 bool TakingAddress =
false);
3037 bool MissingImplicitThis =
false);
3041 std::pair<Expr *, std::string> findFailedBooleanCondition(
Expr *Cond);
3050 bool diagnoseArgDependentDiagnoseIfAttrs(
const FunctionDecl *Function,
3051 const Expr *ThisArg,
3062 bool diagnoseArgIndependentDiagnoseIfAttrs(
const NamedDecl *ND,
3070 bool Complain =
false,
3082 ResolveAddressOfOverloadedFunction(
Expr *AddressOfExpr,
3086 bool *pHadMultipleCandidates =
nullptr);
3089 resolveAddressOfOnlyViableOverloadCandidate(
Expr *E,
3092 bool resolveAndFixAddressOfOnlyViableOverloadCandidate(
3093 ExprResult &SrcExpr,
bool DoFunctionPointerConversion =
false);
3096 ResolveSingleFunctionTemplateSpecialization(
OverloadExpr *ovl,
3097 bool Complain =
false,
3100 bool ResolveAndFixSingleFunctionTemplateSpecialization(
3102 bool DoFunctionPointerConverion =
false,
3103 bool Complain =
false,
3106 unsigned DiagIDForComplaining = 0);
3109 Expr *FixOverloadedFunctionReference(
Expr *E,
3119 bool PartialOverloading =
false);
3126 FRS_DiagnosticIssued
3142 bool AllowTypoCorrection=
true,
3143 bool CalleesAddressIsTaken=
false);
3153 Expr *input,
bool RequiresADL =
true);
3159 bool RequiresADL =
true);
3166 BuildCallToMemberFunction(Scope *S,
Expr *MemExpr,
3177 bool *NoArrowOperatorFound =
nullptr);
3187 bool CheckParameterNames);
3188 void CheckCXXDefaultArguments(FunctionDecl *FD);
3189 void CheckExtraCXXDefaultArguments(
Declarator &D);
3190 Scope *getNonFieldDeclScope(Scope *S);
3224 LookupOrdinaryName = 0,
3274 NotForRedeclaration = 0,
3281 ForExternalRedeclaration
3289 if (cast<Decl>(CurContext)
3290 ->getOwningModuleForLinkage(
true))
3291 return ForVisibleRedeclaration;
3292 return ForExternalRedeclaration;
3326 typedef std::function<ExprResult(Sema &, TypoExpr *, TypoCorrection)>
3332 struct TypoExprState {
3333 std::unique_ptr<TypoCorrectionConsumer> Consumer;
3334 TypoDiagnosticGenerator DiagHandler;
3337 TypoExprState(TypoExprState &&other) noexcept;
3338 TypoExprState &operator=(TypoExprState &&other) noexcept;
3342 llvm::MapVector<TypoExpr *, TypoExprState> DelayedTypos;
3345 TypoExpr *createDelayedTypo(std::unique_ptr<TypoCorrectionConsumer> TCC,
3346 TypoDiagnosticGenerator TDG,
3353 llvm::MapVector<NamespaceDecl*, bool> KnownNamespaces;
3357 bool LoadedExternalKnownNamespaces;
3362 std::unique_ptr<TypoCorrectionConsumer>
3369 bool ErrorRecovery);
3372 const TypoExprState &getTypoExprState(
TypoExpr *TE)
const;
3375 void clearDelayedTypo(
TypoExpr *TE);
3386 = NotForRedeclaration);
3388 bool AllowBuiltinCreation =
false);
3390 bool InUnqualifiedLookup =
false);
3394 bool AllowBuiltinCreation =
false,
3395 bool EnteringContext =
false);
3398 = NotForRedeclaration);
3409 CXXConstructorDecl *LookupDefaultConstructor(
CXXRecordDecl *Class);
3410 CXXConstructorDecl *LookupCopyingConstructor(
CXXRecordDecl *Class,
3413 bool RValueThis,
unsigned ThisQuals);
3414 CXXConstructorDecl *LookupMovingConstructor(
CXXRecordDecl *Class,
3417 bool RValueThis,
unsigned ThisQuals);
3425 bool AllowStringTemplate,
3426 bool DiagnoseMissing);
3427 bool isKnownName(StringRef name);
3434 bool IncludeGlobalScope =
true,
3435 bool LoadExternal =
true);
3438 bool IncludeGlobalScope =
true,
3439 bool IncludeDependentBases =
false,
3440 bool LoadExternal =
true);
3453 bool EnteringContext =
false,
3455 bool RecordFailure =
true);
3461 TypoDiagnosticGenerator TDG,
3464 bool EnteringContext =
false,
3482 CorrectDelayedTyposInExpr(
Expr *E, VarDecl *InitDecl =
nullptr,
3489 return CorrectDelayedTyposInExpr(E,
nullptr,
Filter);
3502 return CorrectDelayedTyposInExpr(ER,
nullptr,
Filter);
3507 bool ErrorRecovery =
true);
3512 bool ErrorRecovery =
true);
3514 void MarkTypoCorrectedFunctionDefinition(
const NamedDecl *F);
3516 void FindAssociatedClassesAndNamespaces(
SourceLocation InstantiationLoc,
3518 AssociatedNamespaceSet &AssociatedNamespaces,
3519 AssociatedClassSet &AssociatedClasses);
3522 bool ConsiderLinkage,
bool AllowInlineNamespace);
3533 Scope *S,
bool ForRedeclaration,
3537 void AddKnownFunctionAttributes(FunctionDecl *FD);
3541 void ProcessPragmaWeak(Scope *S, Decl *D);
3543 void ProcessDeclAttributes(Scope *S, Decl *D,
const Declarator &PD);
3545 void ProcessDeclAttributeDelayed(Decl *D,
3548 bool IncludeCXX11Attributes =
true);
3552 void checkUnusedDeclAttributes(
Declarator &D);
3558 bool isValidPointerAttrType(
QualType T,
bool RefOkay =
false);
3560 bool CheckRegparmAttr(
const ParsedAttr &attr,
unsigned &value);
3562 const FunctionDecl *FD =
nullptr);
3563 bool CheckAttrTarget(
const ParsedAttr &CurrAttr);
3564 bool CheckAttrNoArgs(
const ParsedAttr &CurrAttr);
3565 bool checkStringLiteralArgumentAttr(
const ParsedAttr &
Attr,
unsigned ArgNum,
3570 bool checkMSInheritanceAttrOnDefinition(
3572 MSInheritanceAttr::Spelling SemanticSpelling);
3574 void CheckAlignasUnderalignment(Decl *D);
3585 bool hasExplicitCallingConv(
QualType T);
3598 bool IsProtocolMethodDecl);
3602 bool IsProtocolMethodDecl);
3608 bool IsProtocolMethodDecl);
3620 void ImplMethodsVsClassMethods(Scope *S,
ObjCImplDecl* IMPDecl,
3622 bool IncompleteImpl =
false);
3626 void DiagnoseUnimplementedProperties(Scope *S,
ObjCImplDecl* IMPDecl,
3628 bool SynthesizeProperties);
3631 void diagnoseNullResettableSynthesizedSetters(
const ObjCImplDecl *impDecl);
3635 void DefaultSynthesizeProperties(Scope *S,
ObjCImplDecl *IMPDecl,
3638 void DefaultSynthesizeProperties(Scope *S, Decl *D,
SourceLocation AtEnd);
3648 void DiagnoseUnusedBackingIvarInAccessor(Scope *S,
3667 const bool isReadWrite,
3668 unsigned &Attributes,
3669 const unsigned AttributesAsWritten,
3685 const bool isReadWrite,
3686 const unsigned Attributes,
3687 const unsigned AttributesAsWritten,
3696 void AtomicPropertySetterGetterRules(
ObjCImplDecl* IMPDecl,
3701 void DiagnoseMissingDesignatedInitOverrides(
3720 void MatchAllMethodDeclarations(
const SelectorSet &InsMap,
3721 const SelectorSet &ClsMap,
3722 SelectorSet &InsMapSeen,
3723 SelectorSet &ClsMapSeen,
3726 bool &IncompleteImpl,
3727 bool ImmediateClass,
3728 bool WarnCategoryMethodImpl=
false);
3741 void AddMethodToGlobalPool(
ObjCMethodDecl *Method,
bool impl,
bool instance);
3746 bool receiverIdOrClass,
3756 CollectMultipleMethodsInGlobalPool(
Selector Sel,
3758 bool InstanceFirst,
bool CheckTheOther,
3769 bool receiverIdOrClass);
3781 bool RecordFailure =
true) {
3783 TypoCorrectionFailures[Typo].insert(TypoLoc);
3793 AddMethodToGlobalPool(Method, impl,
true);
3798 AddMethodToGlobalPool(Method, impl,
false);
3803 void AddAnyMethodToGlobalPool(Decl *D);
3808 bool receiverIdOrClass=
false) {
3809 return LookupMethodInGlobalPool(Sel, R, receiverIdOrClass,
3816 bool receiverIdOrClass=
false) {
3817 return LookupMethodInGlobalPool(Sel, R, receiverIdOrClass,
3865 ActOnFinishFullExpr(Arg, CC,
false).
get());
3878 bool HasLeadingEmptyMacro =
false);
3880 void ActOnStartOfCompoundStmt(
bool IsStmtExpr);
3881 void ActOnFinishOfCompoundStmt();
3893 S.ActOnFinishOfCompoundStmt();
3912 StmtResult ActOnDeclStmt(DeclGroupPtrTy Decl,
3915 void ActOnForEachDeclStmt(DeclGroupPtrTy Decl);
3921 void ActOnCaseStmtBody(Stmt *
CaseStmt, Stmt *SubStmt);
3925 Stmt *SubStmt, Scope *CurScope);
3946 Stmt *Switch, Stmt *Body);
3963 Stmt *First,
Expr *collection,
3965 StmtResult FinishObjCForCollectionStmt(Stmt *ForCollection, Stmt *Body);
3989 Stmt *RangeDecl, Stmt *
Begin, Stmt *
End,
3994 StmtResult FinishCXXForRangeStmt(Stmt *ForRange, Stmt *Body);
4005 void ActOnCapturedRegionStart(
SourceLocation Loc, Scope *CurScope,
4008 void ActOnCapturedRegionStart(
SourceLocation Loc, Scope *CurScope,
4012 void ActOnCapturedRegionError();
4015 unsigned NumParams);
4019 CES_AllowParameters = 1,
4020 CES_AllowDifferentTypes = 2,
4021 CES_AllowExceptionVariables = 4,
4022 CES_FormerDefault = (CES_AllowParameters),
4023 CES_Default = (CES_AllowParameters | CES_AllowDifferentTypes),
4024 CES_AsIfByStdMove = (CES_AllowParameters | CES_AllowDifferentTypes |
4025 CES_AllowExceptionVariables),
4028 VarDecl *getCopyElisionCandidate(
QualType ReturnType,
Expr *E,
4030 bool isCopyElisionCandidate(
QualType ReturnType,
const VarDecl *VD,
4039 bool IsVolatile,
unsigned NumOutputs,
4046 void FillInlineAsmIdentifierInfo(
Expr *Res,
4047 llvm::InlineAsmIdentifierInfo &Info);
4051 bool IsUnevaluatedContext);
4052 bool LookupInlineAsmField(StringRef
Base, StringRef Member,
4054 ExprResult LookupInlineAsmVarDeclField(
Expr *RefExpr, StringRef Member,
4058 StringRef AsmString,
4059 unsigned NumOutputs,
unsigned NumInputs,
4064 LabelDecl *GetOrCreateMSAsmLabel(StringRef ExternalLabelName,
4071 bool Invalid =
false);
4073 Decl *ActOnObjCExceptionDecl(Scope *S,
Declarator &D);
4076 Decl *Parm, Stmt *Body);
4094 VarDecl *BuildExceptionDeclaration(Scope *S,
TypeSourceInfo *TInfo,
4099 Decl *ActOnExceptionDeclarator(Scope *S,
Declarator &D);
4102 Decl *ExDecl, Stmt *HandlerBlock);
4112 void ActOnStartSEHFinallyBlock();
4113 void ActOnAbortSEHFinallyBlock();
4117 void DiagnoseReturnInConstructorExceptionHandler(
CXXTryStmt *TryBlock);
4119 bool ShouldWarnIfUnusedFileScopedDecl(
const DeclaratorDecl *D)
const;
4123 void MarkUnusedFileScopedDecl(
const DeclaratorDecl *D);
4127 void DiagnoseUnusedExprResult(
const Stmt *S);
4128 void DiagnoseUnusedNestedTypedefs(
const RecordDecl *D);
4129 void DiagnoseUnusedDecl(
const NamedDecl *ND);
4143 void DiagnoseEmptyLoopBody(
const Stmt *S,
4144 const Stmt *PossibleBody);
4147 void DiagnoseSelfMove(
const Expr *LHSExpr,
const Expr *RHSExpr,
4152 void diagnoseNullableToNonnullConversion(
QualType DstType,
QualType SrcType,
4161 void PopParsingDeclaration(ParsingDeclState
state, Decl *
decl);
4175 bool ObjCPropertyAccess,
4176 bool AvoidPartialAvailabilityChecks =
false,
4180 UnavailableAttr::ImplicitReason reason);
4183 void DiagnoseUnguardedAvailabilityViolations(Decl *FD);
4188 bool CanUseDecl(
NamedDecl *D,
bool TreatUnavailableAsInvalid);
4191 bool ObjCPropertyAccess =
false,
4192 bool AvoidPartialAvailabilityChecks =
false,
4194 void NoteDeletedFunction(FunctionDecl *FD);
4195 void NoteDeletedInheritingConstructor(CXXConstructorDecl *CD);
4202 void PushExpressionEvaluationContext(
4205 ExpressionEvaluationContextRecord::EK_Other);
4207 void PushExpressionEvaluationContext(
4210 ExpressionEvaluationContextRecord::EK_Other);
4211 void PopExpressionEvaluationContext();
4213 void DiscardCleanupsInEvaluationContext();
4232 void MarkAnyDeclReferenced(
SourceLocation Loc, Decl *D,
bool MightBeOdrUse);
4233 void MarkFunctionReferenced(
SourceLocation Loc, FunctionDecl *Func,
4234 bool MightBeOdrUse =
true);
4240 unsigned CapturingScopeIndex);
4243 void CleanupVarDeclMarking();
4286 const unsigned *
const FunctionScopeIndexToStopAt);
4304 void MarkDeclarationsReferencedInExpr(
Expr *E,
4305 bool SkipLocalVariables =
false);
4311 bool ForceComplain =
false,
4312 bool (*IsPlausibleResult)(
QualType) =
nullptr);
4315 bool tryExprAsCall(
Expr &E,
QualType &ZeroArgCallReturnTy,
4325 bool DiagRuntimeBehavior(
SourceLocation Loc,
const Stmt *Statement,
4337 UnqualifiedId &Id,
bool HasTrailingLParen,
bool IsAddressOfOperand,
4339 bool IsInlineAsmIdentifier =
false,
Token *KeywordReplacement =
nullptr);
4354 bool AllowBuiltinCreation=
false);
4359 bool isAddressOfOperand,
4385 BuildAnonymousStructUnionMemberReference(
4390 Expr *baseObjectExpr =
nullptr,
4402 bool IsDefiniteInstance,
4404 bool UseArgumentDependentLookup(
const CXXScopeSpec &SS,
4406 bool HasTrailingLParen);
4411 bool IsAddressOfOperand,
const Scope *S,
4422 bool AcceptInvalidDecl =
false);
4427 bool AcceptInvalidDecl =
false);
4444 Scope *UDLScope =
nullptr);
4453 Scope *UDLScope =
nullptr);
4458 Expr *ControllingExpr,
4464 Expr *ControllingExpr,
4476 bool isQualifiedMemberAccess(
Expr *E);
4488 bool IsType,
void *TyOrEx,
4492 bool CheckVecStepExpr(
Expr *E);
4498 ExprResult ActOnSizeofParameterPackExpr(Scope *S,
4540 bool SuppressQualifierCheck =
false,
4551 bool CheckQualifiedMemberReference(
Expr *BaseExpr,
QualType BaseType,
4575 bool HadMultipleCandidates,
4583 bool HadMultipleCandidates,
4588 void ActOnDefaultCtorInitializers(Decl *CDtorDecl);
4590 FunctionDecl *FDecl,
4594 bool ExecConfig =
false);
4597 const Expr *ArgExpr);
4604 Expr *ExecConfig =
nullptr);
4607 Expr *ExecConfig =
nullptr,
4608 bool IsExecConfig =
false);
4612 Expr *Config =
nullptr,
bool IsExecConfig =
false,
4633 ExprResult MaybeConvertParenListExprToParenExpr(Scope *S,
Expr *ME);
4677 void ActOnStartStmtExpr();
4682 void ActOnStmtExprError();
4731 bool CheckCaseExpression(
Expr *E);
4750 CheckMicrosoftIfExistsSymbol(Scope *S,
CXXScopeSpec &SS,
4754 CheckMicrosoftIfExistsSymbol(Scope *S,
SourceLocation KeywordLoc,
4825 llvm::SmallBitVector FullyCheckedComparisonCategories;
4854 bool isInitListConstructor(
const FunctionDecl *Ctor);
4856 Decl *ActOnUsingDirective(Scope *CurScope,
SourceLocation UsingLoc,
4864 Decl *ActOnNamespaceAliasDef(Scope *CurScope,
4881 bool HasTypenameKeyword,
4899 bool CheckInheritingConstructorUsingDecl(
UsingDecl *UD);
4904 CXXConstructorDecl *
4905 findInheritingConstructor(
SourceLocation Loc, CXXConstructorDecl *BaseCtor,
4927 bool HadMultipleCandidates,
bool IsListInitialization,
4928 bool IsStdInitListInitialization,
4929 bool RequiresZeroInit,
unsigned ConstructKind,
4936 CXXConstructorDecl *Constructor,
bool Elidable,
4938 bool HadMultipleCandidates,
bool IsListInitialization,
4939 bool IsStdInitListInitialization,
4940 bool RequiresZeroInit,
unsigned ConstructKind,
4948 CXXConstructorDecl *Constructor,
bool Elidable,
4950 bool IsListInitialization,
4951 bool IsStdInitListInitialization,
bool RequiresZeroInit,
4959 bool CheckCXXDefaultArgExpr(
SourceLocation CallLoc, FunctionDecl *FD,
4970 void FinalizeVarWithDestructor(VarDecl *VD,
const RecordType *DeclInitType);
4984 llvm::SmallPtrSet<CanQualType, 4> ExceptionsSeen;
4987 void ClearExceptions() {
4988 ExceptionsSeen.clear();
5002 "noexcept(expr) should not be a possible result");
5007 unsigned size()
const {
return Exceptions.size(); }
5016 void CalledExpr(
Expr *E);
5022 ESI.
Type = getExceptionSpecType();
5031 tok::kw_false).
get();
5053 ComputeDefaultedCopyAssignmentExceptionSpec(
CXXMethodDecl *MD);
5063 ComputeDefaultedMoveAssignmentExceptionSpec(
CXXMethodDecl *MD);
5074 CXXConstructorDecl *CD);
5087 void checkExceptionSpecification(
bool IsTopLevel,
5097 bool isLibstdcxxEagerExceptionSpecHack(
const Declarator &D);
5102 void actOnDelayedExceptionSpecification(Decl *Method,
5107 Expr *NoexceptExpr);
5115 bool Diagnose =
false);
5123 CXXConstructorDecl *DeclareImplicitDefaultConstructor(
5128 void DefineImplicitDefaultConstructor(
SourceLocation CurrentLocation,
5129 CXXConstructorDecl *Constructor);
5152 CXXConstructorDecl *Constructor);
5160 CXXConstructorDecl *DeclareImplicitCopyConstructor(
CXXRecordDecl *ClassDecl);
5164 void DefineImplicitCopyConstructor(
SourceLocation CurrentLocation,
5165 CXXConstructorDecl *Constructor);
5174 CXXConstructorDecl *DeclareImplicitMoveConstructor(
CXXRecordDecl *ClassDecl);
5178 void DefineImplicitMoveConstructor(
SourceLocation CurrentLocation,
5179 CXXConstructorDecl *Constructor);
5190 void DefineImplicitCopyAssignment(
SourceLocation CurrentLocation,
5203 void DefineImplicitMoveAssignment(
SourceLocation CurrentLocation,
5208 void ForceDeclarationOfImplicitMembers(
CXXRecordDecl *Class);
5211 void CheckImplicitSpecialMemberDeclaration(Scope *S, FunctionDecl *FD);
5215 bool isImplicitlyDeleted(FunctionDecl *FD);
5221 bool checkThisInStaticMemberFunctionType(
CXXMethodDecl *Method);
5225 bool checkThisInStaticMemberFunctionExceptionSpec(
CXXMethodDecl *Method);
5231 bool checkThisInStaticMemberFunctionAttributes(
CXXMethodDecl *Method);
5238 bool CompleteConstructorCall(CXXConstructorDecl *Constructor,
5242 bool AllowExplicit =
false,
5243 bool IsListInitialization =
false);
5251 bool EnteringContext);
5256 bool EnteringContext);
5362 bool Enabled =
true);
5382 bool CheckCXXThisCapture(
SourceLocation Loc,
bool Explicit =
false,
5383 bool BuildAndDiagnose =
true,
5384 const unsigned *
const FunctionScopeIndexToStopAt =
nullptr,
5385 bool ByCopy =
false);
5390 bool isThisOutsideMemberFunctionBody(
QualType BaseType);
5409 bool IsThrownVarInScope);
5420 bool ListInitialization);
5426 bool ListInitialization);
5448 bool isUnavailableAlignedAllocationFunction(
const FunctionDecl &FD)
const;
5452 void diagnoseUnavailableAlignedAllocation(
const FunctionDecl &FD,
5477 FunctionDecl *&OperatorNew,
5478 FunctionDecl *&OperatorDelete,
5479 bool Diagnose =
true);
5480 void DeclareGlobalNewDelete();
5486 bool Diagnose =
true);
5487 FunctionDecl *FindUsualDeallocationFunction(
SourceLocation StartLoc,
5488 bool CanProvideSize,
5491 FunctionDecl *FindDeallocationFunctionForDestructor(
SourceLocation StartLoc,
5496 bool UseGlobal,
bool ArrayForm,
5499 bool IsDelete,
bool CallCanBeVirtual,
5500 bool WarnOnNonAbstractTypes,
5542 ExprResult ActOnStartCXXMemberReference(Scope *S,
5547 bool &MayBePseudoDestructor);
5576 Expr *MaybeCreateExprWithCleanups(
Expr *SubExpr);
5577 Stmt *MaybeCreateStmtWithCleanups(Stmt *SubStmt);
5581 CreateMaterializeTemporaryExpr(
QualType T,
Expr *Temporary,
5582 bool BoundToLvalueReference);
5585 return ActOnFinishFullExpr(
5589 bool DiscardedValue,
bool IsConstexpr =
false);
5597 bool EnteringContext =
false);
5598 bool isDependentScopeSpecifier(
const CXXScopeSpec &SS);
5624 bool isAcceptableNestedNameSpecifier(
const NamedDecl *SD,
5625 bool *CanCorrect =
nullptr);
5647 : ObjectType(ObjectType), Identifier(II), IdentifierLoc(IdLoc),
5648 CCLoc(ColonColonLoc) {
5653 : ObjectType(
ParsedType::make(ObjectType)), Identifier(II),
5654 IdentifierLoc(IdLoc), CCLoc(ColonColonLoc) {
5658 bool isNonTypeNestedNameSpecifier(Scope *S,
CXXScopeSpec &SS,
5661 bool BuildCXXNestedNameSpecifier(Scope *S,
5663 bool EnteringContext,
5666 bool ErrorRecoveryLookup,
5667 bool *IsCorrectedToColon =
nullptr,
5668 bool OnlyNamespace =
false);
5695 bool ActOnCXXNestedNameSpecifier(Scope *S,
5697 bool EnteringContext,
5699 bool ErrorRecoveryLookup =
false,
5700 bool *IsCorrectedToColon =
nullptr,
5701 bool OnlyNamespace =
false);
5705 bool ActOnCXXNestedNameSpecifierDecltype(
CXXScopeSpec &SS,
5709 bool IsInvalidUnlessNestedName(Scope *S,
CXXScopeSpec &SS,
5711 bool EnteringContext);
5736 bool ActOnCXXNestedNameSpecifier(Scope *S,
5739 TemplateTy TemplateName,
5745 bool EnteringContext);
5755 void *SaveNestedNameSpecifierAnnotation(
CXXScopeSpec &SS);
5767 void RestoreNestedNameSpecifierAnnotation(
void *Annotation,
5771 bool ShouldEnterDeclaratorScope(Scope *S,
const CXXScopeSpec &SS);
5779 bool ActOnCXXEnterDeclaratorScope(Scope *S,
CXXScopeSpec &SS);
5786 void ActOnCXXExitDeclaratorScope(Scope *S,
const CXXScopeSpec &SS);
5793 void ActOnCXXEnterDeclInitializer(Scope *S, Decl *Dcl);
5797 void ActOnCXXExitDeclInitializer(Scope *S, Decl *Dcl);
5802 bool KnownDependent,
5811 Optional<std::pair<unsigned, Decl *>> Mangling = None);
5819 bool ExplicitParams,
5820 bool ExplicitResultType,
5829 return ParsedType::make(buildLambdaInitCaptureInitialization(
5830 Loc, ByRef, EllipsisLoc, None, Id,
5831 InitKind != LambdaCaptureInitKind::CopyInit, Init));
5833 QualType buildLambdaInitCaptureInitialization(
5847 unsigned InitStyle, Expr *Init);
5858 void ActOnLambdaExplicitTemplateParameterList(
SourceLocation LAngleLoc,
5863 void addLambdaParameters(
5881 bool IsInstantiation =
false);
5893 bool DiagnoseUnusedLambdaCapture(
SourceRange CaptureRange,
5902 bool IsOpenMPMapping =
false);
5921 void DefineImplicitLambdaToFunctionPointerConversion(
5931 void DefineImplicitLambdaToBlockPointerConversion(
SourceLocation CurrentLoc,
5973 bool HadMultipleCandidates);
5987 bool WarnMultipleSelectors);
6000 Decl *ActOnStartLinkageSpecification(Scope *S,
6004 Decl *ActOnFinishLinkageSpecification(Scope *S,
6027 void ActOnStartCXXInClassMemberInitializer();
6028 void ActOnFinishCXXInClassMemberInitializer(Decl *VarDecl,
6078 bool SetDelegatingInitializer(CXXConstructorDecl *Constructor,
6081 bool SetCtorInitializers(CXXConstructorDecl *Constructor,
bool AnyErrors,
6096 typedef std::pair<CXXRecordDecl*, SourceLocation>
VTableUse;
6109 void LoadExternalVTableUses();
6114 bool DefinitionRequired =
false);
6124 bool ConstexprOnly =
false);
6131 bool DefineUsedVTables();
6133 void AddImplicitlyDeclaredMembersToClass(
CXXRecordDecl *ClassDecl);
6135 void ActOnMemInitializers(Decl *ConstructorDecl,
6146 void referenceDLLExportedClassMethods();
6148 void propagateDLLAttrToBaseClassTemplate(
6159 void ActOnFinishCXXMemberSpecification(Scope *S,
SourceLocation RLoc,
6163 void ActOnFinishCXXMemberDecls();
6164 void ActOnFinishCXXNonNestedClass(Decl *D);
6166 void ActOnReenterCXXMethodParameter(Scope *S,
ParmVarDecl *Param);
6167 unsigned ActOnReenterTemplateScope(Scope *S, Decl *Template);
6168 void ActOnStartDelayedMemberDeclarations(Scope *S, Decl *Record);
6169 void ActOnStartDelayedCXXMethodDeclaration(Scope *S, Decl *Method);
6170 void ActOnDelayedCXXMethodParameter(Scope *S, Decl *Param);
6171 void ActOnFinishDelayedMemberDeclarations(Scope *S, Decl *Record);
6172 void ActOnFinishDelayedCXXMethodDeclaration(Scope *S, Decl *Method);
6173 void ActOnFinishDelayedMemberInitializers(Decl *Record);
6174 void MarkAsLateParsedTemplate(FunctionDecl *FD, Decl *FnD,
6176 void UnmarkAsLateParsedTemplate(FunctionDecl *FD);
6177 bool IsInsideALocalClassWithinATemplateFunction();
6179 Decl *ActOnStaticAssertDeclaration(
SourceLocation StaticAssertLoc,
6181 Expr *AssertMessageExpr,
6183 Decl *BuildStaticAssertDeclaration(
SourceLocation StaticAssertLoc,
6192 Decl *ActOnFriendTypeDecl(Scope *S,
const DeclSpec &DS,
6199 void CheckConstructor(CXXConstructorDecl *Constructor);
6210 void CheckExplicitlyDefaultedSpecialMember(
CXXMethodDecl *MD);
6211 void CheckDelayedMemberExceptionSpecs();
6224 BaseResult ActOnBaseSpecifier(Decl *classdecl,
6234 void ActOnBaseSpecifiers(Decl *ClassDecl,
6246 CXXCastPath *BasePath =
nullptr,
6247 bool IgnoreAccess =
false);
6249 unsigned InaccessibleBaseID,
6250 unsigned AmbigiousBaseConvID,
6253 CXXCastPath *BasePath,
6254 bool IgnoreAccess =
false);
6256 std::string getAmbiguousPathsDisplayString(
CXXBasePaths &Paths);
6258 bool CheckOverridingFunctionAttributes(
const CXXMethodDecl *New,
6263 bool CheckOverridingFunctionReturnType(
const CXXMethodDecl *New,
6268 bool CheckOverridingFunctionExceptionSpec(
const CXXMethodDecl *New,
6274 void CheckOverrideControl(
NamedDecl *D);
6278 void DiagnoseAbsenceOfOverrideControl(
NamedDecl *D);
6283 bool CheckIfOverriddenFunctionIsMarkedFinal(
const CXXMethodDecl *New,
6298 bool SetMemberAccessSpecifier(
NamedDecl *MemberDecl,
6310 bool Diagnose =
true);
6312 CXXConstructorDecl *D,
6315 bool IsCopyBindingRefToTemp =
false);
6317 CXXConstructorDecl *D,
6343 bool ForceCheck =
false,
6344 bool ForceUnprivileged =
false);
6348 bool isSpecialMemberAccessibleForDeletion(
CXXMethodDecl *decl,
6354 void PerformDependentDiagnostics(
const DeclContext *Pattern,
6377 template <
typename... Ts>
6379 const Ts &...Args) {
6381 return RequireNonAbstractType(Loc, T, Diagnoser);
6390 bool CheckOverloadedOperatorDeclaration(FunctionDecl *FnDecl);
6392 bool CheckLiteralOperatorDeclaration(FunctionDecl *FnDecl);
6398 bool AllowFunctionTemplates =
true,
6399 bool AllowDependent =
true);
6401 bool AllowFunctionTemplates =
true,
6402 bool AllowDependent =
true,
6403 bool AllowNonTemplateFunctions =
false);
6412 bool AllowFunctionTemplates =
true,
6413 bool AllowDependent =
true);
6425 QualType ObjectType,
bool EnteringContext,
6426 bool &MemberOfUnknownSpecialization,
6432 bool hasTemplateKeyword,
6435 bool EnteringContext,
6436 TemplateTy &Template,
6437 bool &MemberOfUnknownSpecialization);
6444 void ActOnUndeclaredTypeTemplateName(Scope *S, TemplateTy &Name,
6449 bool resolveAssumedTemplateNameAsType(Scope *S, TemplateName &Name,
6451 bool Diagnose =
true);
6463 TemplateTy &SuggestedTemplate,
6466 bool DiagnoseUninstantiableTemplate(
SourceLocation PointOfInstantiation,
6468 bool InstantiatedFromMember,
6472 bool Complain =
true);
6474 void DiagnoseTemplateParameterShadow(
SourceLocation Loc, Decl *PrevDecl);
6477 NamedDecl *ActOnTypeParameter(Scope *S,
bool Typename,
6482 unsigned Depth,
unsigned Position,
6495 NamedDecl *ActOnTemplateTemplateParameter(Scope *S,
6507 ActOnTemplateParameterList(
unsigned Depth,
6513 Expr *RequiresClause);
6524 TPC_TypeAliasTemplate
6535 bool IsFriend,
bool &IsMemberSpecialization,
bool &Invalid);
6555 void NoteAllFoundTemplates(TemplateName Name);
6557 QualType CheckTemplateIdType(TemplateName Template,
6566 bool IsCtorOrDtorName =
false,
bool IsClassName =
false);
6575 TemplateTy TemplateD,
6604 void diagnoseMissingTemplateArguments(TemplateName Name,
SourceLocation Loc);
6620 TemplateTy &Template,
bool AllowInjectedClassName =
false);
6631 unsigned NumExplicitArgs,
6633 void CheckTemplatePartialSpecialization(
6635 void CheckTemplatePartialSpecialization(
6638 Decl *ActOnTemplateDeclarator(Scope *S,
6650 bool CheckDependentFunctionTemplateSpecialization(FunctionDecl *FD,
6654 bool CheckFunctionTemplateSpecialization(
6674 DeclResult ActOnExplicitInstantiation(Scope *S,
6680 SubstDefaultTemplateArgumentIfAvailable(
TemplateDecl *Template,
6686 bool &HasDefaultArg);
6701 CTAK_DeducedFromArrayBound
6704 bool CheckTemplateArgument(
NamedDecl *Param,
6709 unsigned ArgumentPackIndex,
6741 bool PartialTemplateArgs,
6743 bool UpdateArgsWithConversions =
true);
6752 QualType InstantiatedParamType, Expr *Arg,
6797 TPL_TemplateTemplateArgumentMatch
6840 TemplateTy TemplateName,
6856 bool RebuildNestedNameSpecifierInCurrentInstantiation(
CXXScopeSpec &SS);
6858 ExprResult RebuildExprInCurrentInstantiation(Expr *E);
6859 bool RebuildTemplateParamsInCurrentInstantiation(
6872 Decl *ActOnConceptDefinition(
6882 bool isUnexpandedParameterPackPermitted();
6891 UPPC_Expression = 0,
6984 bool DiagnoseUnexpandedParameterPack(Expr *E,
6994 bool DiagnoseUnexpandedParameterPack(
const CXXScopeSpec &SS,
7017 TemplateName Template,
7168 bool &RetainExpansion,
7196 bool containsUnexpandedParameterPacks(
Declarator &D);
7228 bool AdjustExceptionSpec =
false);
7288 TDK_CUDATargetMismatch
7312 unsigned ArgIdx,
QualType OriginalArgType)
7313 : OriginalParamType(OriginalParamType),
7314 DecomposedParam(DecomposedParam), ArgIdx(ArgIdx),
7315 OriginalArgType(OriginalArgType) {}
7326 unsigned NumExplicitlySpecified, FunctionDecl *&Specialization,
7329 bool PartialOverloading =
false,
7330 llvm::function_ref<
bool()> CheckNonDependent = []{
return false; });
7336 bool PartialOverloading,
7343 FunctionDecl *&Specialization,
7345 bool IsAddressOfFunction =
false);
7356 FunctionDecl *&Specialization,
7358 bool IsAddressOfFunction =
false);
7373 DAR_FailedAlreadyDiagnosed
7382 void DiagnoseAutoDeductionFailure(VarDecl *VDecl, Expr *Init);
7384 bool Diagnose =
true);
7388 void DeclareImplicitDeductionGuides(
TemplateDecl *Template,
7391 QualType DeduceTemplateSpecializationFromInitializer(
7400 TypeLoc getReturnTypeLoc(FunctionDecl *FD)
const;
7402 bool DeduceFunctionTypeFromReturnExpr(FunctionDecl *FD,
7410 unsigned NumCallArguments1,
7411 unsigned NumCallArguments2);
7422 getMoreSpecializedPartialSpecialization(
7437 bool isTemplateTemplateParameterAtLeastAsSpecializedAs(
7443 llvm::SmallBitVector &
Used);
7446 llvm::SmallBitVector &Deduced) {
7447 return MarkDeducedTemplateParameters(Context, FunctionTemplate, Deduced);
7449 static void MarkDeducedTemplateParameters(
ASTContext &Ctx,
7451 llvm::SmallBitVector &Deduced);
7458 getTemplateInstantiationArgs(
NamedDecl *D,
7460 bool RelativeToPrimary =
false,
7461 const FunctionDecl *Pattern =
nullptr);
7556 assert(Kind != DeclaringSpecialMember);
7557 return {TemplateArgs, NumTemplateArgs};
7570 : Kind(TemplateInstantiation),
7571 SavedInNonInstantiationSFINAEContext(
false), Entity(nullptr),
7572 Template(nullptr), TemplateArgs(nullptr), NumTemplateArgs(0),
7573 DeductionInfo(nullptr) {}
7577 bool isInstantiationRecord()
const;
7633 unsigned LastEmittedCodeSynthesisContextDepth = 0;
7640 std::vector<std::unique_ptr<TemplateInstantiationCallback>>
7657 int OldSubstitutionIndex;
7661 : Self(Self), OldSubstitutionIndex(Self.ArgumentPackSubstitutionIndex) {
7670 friend class ArgumentPackSubstitutionRAII;
7677 typedef llvm::DenseMap<Decl *, SmallVector<PartialDiagnosticAt, 1> >
7797 bool AlreadyInstantiating;
7798 bool CheckInstantiationDepth(
SourceLocation PointOfInstantiation,
7804 Decl *Entity,
NamedDecl *Template =
nullptr,
7815 void popCodeSynthesisContext();
7819 return CodeSynthesisContexts.size() > NonInstantiationEntries;
7823 if (!CodeSynthesisContexts.empty() &&
7824 CodeSynthesisContexts.size() != LastEmittedCodeSynthesisContextDepth) {
7825 PrintInstantiationStack();
7826 LastEmittedCodeSynthesisContextDepth = CodeSynthesisContexts.size();
7828 if (PragmaAttributeCurrentTargetDecl)
7829 PrintPragmaAttributeInstantiationPoint();
7831 void PrintInstantiationStack();
7833 void PrintPragmaAttributeInstantiationPoint();
7848 assert(!ExprEvalContexts.empty() &&
7849 "Must be in an expression evaluation context");
7850 return ExprEvalContexts.back().isUnevaluated();
7858 unsigned PrevSFINAEErrors;
7859 bool PrevInNonInstantiationSFINAEContext;
7860 bool PrevAccessCheckingSFINAE;
7861 bool PrevLastDiagnosticIgnored;
7865 : SemaRef(SemaRef), PrevSFINAEErrors(SemaRef.NumSFINAEErrors),
7866 PrevInNonInstantiationSFINAEContext(
7867 SemaRef.InNonInstantiationSFINAEContext),
7868 PrevAccessCheckingSFINAE(SemaRef.AccessCheckingSFINAE),
7869 PrevLastDiagnosticIgnored(
7870 SemaRef.getDiagnostics().isLastDiagnosticIgnored())
7880 = PrevInNonInstantiationSFINAEContext;
7883 PrevLastDiagnosticIgnored);
7900 bool PrevDisableTypoCorrection;
7903 : SemaRef(SemaRef), Trap(SemaRef,
true),
7904 PrevDisableTypoCorrection(SemaRef.DisableTypoCorrection) {
7956 : S(S), Enabled(Enabled) {
7957 if (!Enabled)
return;
7965 S.DefineUsedVTables();
7966 S.PerformPendingInstantiations();
7971 if (!Enabled)
return;
7974 assert(S.VTableUses.empty() &&
7975 "VTableUses should be empty before it is discarded.");
7976 S.VTableUses.swap(SavedVTableUses);
7979 assert(S.PendingInstantiations.empty() &&
7980 "PendingInstantiations should be empty before it is discarded.");
7981 S.PendingInstantiations.swap(SavedPendingInstantiations);
7987 std::deque<PendingImplicitInstantiation> SavedPendingInstantiations;
8003 SavedPendingLocalImplicitInstantiations.swap(
8007 void perform() { S.PerformPendingInstantiations(
true); }
8010 assert(S.PendingLocalImplicitInstantiations.empty() &&
8011 "there shouldn't be any pending local implicit instantiations");
8012 SavedPendingLocalImplicitInstantiations.swap(
8013 S.PendingLocalImplicitInstantiations);
8018 std::deque<PendingImplicitInstantiation>
8019 SavedPendingLocalImplicitInstantiations;
8025 bool HasInteresting =
false;
8030 void set(
unsigned index, FunctionProtoType::ExtParameterInfo info) {
8031 assert(Infos.size() <= index);
8032 Infos.resize(index);
8033 Infos.push_back(info);
8035 if (!HasInteresting)
8036 HasInteresting = (info != FunctionProtoType::ExtParameterInfo());
8041 const FunctionProtoType::ExtParameterInfo *
8043 if (!HasInteresting)
return nullptr;
8044 Infos.resize(numParams);
8045 return Infos.data();
8049 void PerformPendingInstantiations(
bool LocalOnly =
false);
8054 bool AllowDeducedTST =
false);
8078 int indexAdjustment,
8080 bool ExpectParameterPack);
8082 const FunctionProtoType::ExtParameterInfo *ExtParamInfos,
8119 bool CXXDirectInit);
8131 bool Complain =
true);
8138 bool InstantiateInClassInitializer(
8149 : TmplAttr(A), Scope(S), NewDecl(D)
8155 const Decl *Pattern, Decl *Inst,
8156 LateInstantiatedAttrVec *LateAttrs =
nullptr,
8161 const Decl *Pattern, Decl *Inst,
8162 LateInstantiatedAttrVec *LateAttrs =
nullptr,
8165 bool usesPartialOrExplicitSpecialization(
8169 InstantiateClassTemplateSpecialization(
SourceLocation PointOfInstantiation,
8172 bool Complain =
true);
8174 void InstantiateClassMembers(
SourceLocation PointOfInstantiation,
8179 void InstantiateClassTemplateSpecializationMembers(
8199 void InstantiateExceptionSpec(
SourceLocation PointOfInstantiation,
8200 FunctionDecl *Function);
8204 void InstantiateFunctionDefinition(
SourceLocation PointOfInstantiation,
8205 FunctionDecl *Function,
8206 bool Recursive =
false,
8207 bool DefinitionRequired =
false,
8208 bool AtEndOfTU =
false);
8215 LateInstantiatedAttrVec *LateAttrs =
nullptr,
8221 BuildVariableInstantiation(VarDecl *NewVar, VarDecl *OldVar,
8223 LateInstantiatedAttrVec *LateAttrs,
8226 bool InstantiatingVarTemplate =
false,
8228 void InstantiateVariableInitializer(
8229 VarDecl *Var, VarDecl *OldVar,
8231 void InstantiateVariableDefinition(
SourceLocation PointOfInstantiation,
8232 VarDecl *Var,
bool Recursive =
false,
8233 bool DefinitionRequired =
false,
8234 bool AtEndOfTU =
false);
8236 void InstantiateMemInitializers(CXXConstructorDecl *New,
8237 const CXXConstructorDecl *Tmpl,
8242 bool FindingInstantiatedContext =
false);
8254 OCK_CategoryImplementation
8272 Decl *ActOnStartClassInterface(
8277 Decl *
const *ProtoRefs,
unsigned NumProtoRefs,
8281 void ActOnSuperClassOfClassInterface(Scope *S,
8296 Decl *ActOnCompatibilityAlias(
8301 bool CheckForwardProtocolDeclarationForCircularDependency(
8306 Decl *ActOnStartProtocolInterface(
8312 Decl *ActOnStartCategoryInterface(
8316 Decl *
const *ProtoRefs,
unsigned NumProtoRefs,
8320 Decl *ActOnStartClassImplementation(
SourceLocation AtClassImplLoc,
8327 Decl *ActOnStartCategoryImplementation(
SourceLocation AtCatImplLoc,
8334 DeclGroupPtrTy ActOnFinishObjCImplementation(Decl *ObjCImpDecl,
8348 void FindProtocolDeclaration(
bool WarnOnDeclarations,
bool ForObjCContainer,
8356 bool SelectProtocolFirst =
false);
8361 void actOnObjCTypeArgsOrProtocolQualifiers(
8374 bool warnOnIncompleteProtocols);
8385 TypeResult actOnObjCTypeArgsAndProtocolQualifiers(
8403 bool FailOnError =
false);
8415 bool FailOnError =
false);
8420 void CheckObjCPropertyAttributes(Decl *PropertyPtrTy,
8422 unsigned &Attributes,
8423 bool propertyInPrimaryClass);
8434 bool OverridingProtocolProperty);
8450 Decl *ActOnPropertyImplDecl(Scope *S,
8465 OSMK_NonRetainingInit
8480 Decl *ActOnMethodDeclaration(
8491 bool isVariadic,
bool MethodDefinition);
8500 bool inferObjCARCLifetime(
ValueDecl *decl);
8535 bool HasTrailingDot,
8554 bool isImplicit =
false);
8557 bool isSuperReceiver,
8571 ExprResult BuildInstanceMessage(Expr *Receiver,
8580 bool isImplicit =
false);
8582 ExprResult BuildInstanceMessageImplicit(Expr *Receiver,
8623 TypedefNameDecl *&TDNDecl,
8624 bool CfToNs,
bool Diagnose =
true);
8628 Expr *&SrcExpr,
bool Diagnose =
true);
8630 bool ConversionToObjCStringLiteralCheck(
QualType DstType, Expr *&SrcExpr,
8631 bool Diagnose =
true);
8671 StringRef SlotLabel, Expr *Alignment);
8674 NonDefaultStateAtInclude,
8680 void DiagnoseUnterminatedPragmaPack();
8693 void ActOnPragmaMSPointersToMembers(
8700 MSVtorDispAttr::Mode Value);
8709 bool UnifySection(StringRef SectionName,
8711 DeclaratorDecl *TheDecl);
8712 bool UnifySection(StringRef SectionName,
8719 llvm::StringRef StackSlotLabel,
8721 llvm::StringRef PragmaName);
8735 void ActOnPragmaDetectMismatch(
SourceLocation Loc, StringRef Name,
8739 void ActOnPragmaUnused(
const Token &Identifier,
8782 void AddAlignmentAttributesForRecord(
RecordDecl *RD);
8785 void AddMsStructLayoutForRecord(
RecordDecl *RD);
8788 void FreePackedContext();
8792 void PushNamespaceVisibilityAttr(
const VisibilityAttr *Attr,
8797 void AddPushedVisibilityAttribute(Decl *RD);
8801 void PopPragmaVisibility(
bool IsNamespaceEnd,
SourceLocation EndLoc);
8804 void FreeVisContext();
8809 void AddCFAuditedAttribute(Decl *D);
8811 void ActOnPragmaAttributeAttribute(
ParsedAttr &Attribute,
8823 void AddPragmaAttributes(Scope *S, Decl *D);
8825 void DiagnoseUnterminatedPragmaAttribute();
8833 return OptimizeOffPragmaLocation;
8839 void AddRangeBasedOptnone(FunctionDecl *FD);
8844 void AddOptnoneAttributeIfNoConflicts(FunctionDecl *FD,
SourceLocation Loc);
8847 void AddAlignedAttr(
SourceRange AttrRange, Decl *D, Expr *E,
8848 unsigned SpellingListIndex,
bool IsPackExpansion);
8850 unsigned SpellingListIndex,
bool IsPackExpansion);
8854 void AddAssumeAlignedAttr(
SourceRange AttrRange, Decl *D, Expr *E, Expr *OE,
8855 unsigned SpellingListIndex);
8859 void AddAllocAlignAttr(
SourceRange AttrRange, Decl *D, Expr *ParamExpr,
8860 unsigned SpellingListIndex);
8864 void AddAlignValueAttr(
SourceRange AttrRange, Decl *D, Expr *E,
8865 unsigned SpellingListIndex);
8869 void AddLaunchBoundsAttr(
SourceRange AttrRange, Decl *D, Expr *MaxThreads,
8870 Expr *MinBlocks,
unsigned SpellingListIndex);
8874 unsigned SpellingListIndex,
bool InInstantiation =
false);
8876 void AddParameterABIAttr(
SourceRange AttrRange, Decl *D,
8880 void AddXConsumedAttr(Decl *D,
SourceRange SR,
unsigned SpellingIndex,
8885 void addAMDGPUFlatWorkGroupSizeAttr(
SourceRange AttrRange, Decl *D, Expr *Min,
8886 Expr *Max,
unsigned SpellingListIndex);
8890 void addAMDGPUWavesPerEUAttr(
SourceRange AttrRange, Decl *D, Expr *Min,
8891 Expr *Max,
unsigned SpellingListIndex);
8905 bool IsImplicit =
false);
8910 bool IsImplicit =
false);
8914 void CheckCompletedCoroutineBody(FunctionDecl *FD, Stmt *&Body);
8922 std::string CurrOpenCLExtension;
8924 llvm::DenseMap<const Type*, std::set<std::string>> OpenCLTypeExtMap;
8926 llvm::DenseMap<const Decl*, std::set<std::string>> OpenCLDeclExtMap;
8929 return CurrOpenCLExtension;
8935 std::string getOpenCLExtensionsFromDeclExtMap(FunctionDecl *FD);
8940 std::string getOpenCLExtensionsFromTypeExtMap(
FunctionType *FT);
8943 template<
typename T,
typename MapT>
8944 std::string getOpenCLExtensionsFromExtMap(T* FT, MapT &Map);
8947 CurrOpenCLExtension = Ext;
8953 void setOpenCLExtensionForType(
QualType T, llvm::StringRef Exts);
8959 void setOpenCLExtensionForDecl(Decl *FD, llvm::StringRef Exts);
8964 void setCurrentOpenCLExtensionForType(
QualType T);
8969 void setCurrentOpenCLExtensionForDecl(Decl *FD);
8971 bool isOpenCLDisabledDecl(Decl *FD);
8983 bool checkOpenCLDisabledDecl(
const NamedDecl &D,
const Expr &E);
8989 void *VarDataSharingAttributesStack;
8991 unsigned DeclareTargetNestingLevel = 0;
8993 void InitDataSharingAttributesStack();
8994 void DestroyDataSharingAttributesStack();
8997 bool StrictlyPositive =
true);
8999 unsigned getOpenMPNestingLevel()
const;
9002 void adjustOpenMPTargetScopeIndex(
unsigned &FunctionScopesIndex,
9003 unsigned Level)
const;
9006 void pushOpenMPFunctionRegion();
9012 void checkOpenMPDeviceFunction(
SourceLocation Loc, FunctionDecl *Callee);
9016 void checkOpenMPDeviceExpr(
const Expr *E);
9028 template <
typename T,
typename DiagLocT,
typename DiagInfoT,
typename MapT>
9029 bool checkOpenCLDisabledTypeOrDecl(T D, DiagLocT DiagLoc, DiagInfoT DiagInfo,
9042 bool isOpenMPCapturedByRef(
const ValueDecl *D,
unsigned Level)
const;
9047 VarDecl *isOpenMPCapturedDecl(
ValueDecl *D,
bool CheckScopeInfo =
false,
9048 unsigned StopAt = 0);
9054 void startOpenMPLoop();
9059 bool isOpenMPPrivateDecl(
const ValueDecl *D,
unsigned Level)
const;
9069 bool isOpenMPTargetCapturedDecl(
const ValueDecl *D,
unsigned Level)
const;
9080 void EndOpenMPClause();
9082 void EndOpenMPDSABlock(Stmt *CurDirective);
9088 void ActOnOpenMPLoopInitialization(
SourceLocation ForLoc, Stmt *Init);
9097 DeclGroupPtrTy ActOnOpenMPThreadprivateDirective(
9119 DeclGroupPtrTy ActOnOpenMPDeclareReductionDirectiveStart(
9121 ArrayRef<std::pair<QualType, SourceLocation>> ReductionTypes,
9124 void ActOnOpenMPDeclareReductionCombinerStart(Scope *S, Decl *D);
9126 void ActOnOpenMPDeclareReductionCombinerEnd(Decl *D, Expr *Combiner);
9129 VarDecl *ActOnOpenMPDeclareReductionInitializerStart(Scope *S, Decl *D);
9131 void ActOnOpenMPDeclareReductionInitializerEnd(Decl *D, Expr *Initializer,
9132 VarDecl *OmpPrivParm);
9134 DeclGroupPtrTy ActOnOpenMPDeclareReductionDirectiveEnd(
9135 Scope *S, DeclGroupPtrTy DeclReductions,
bool IsValid);
9147 Decl *PrevDeclInScope =
nullptr);
9161 void ActOnFinishOpenMPDeclareTargetDirective();
9163 void ActOnOpenMPDeclareTargetName(Scope *CurScope,
CXXScopeSpec &ScopeSpec,
9165 OMPDeclareTargetDeclAttr::MapTypeTy MT,
9166 NamedDeclSetType &SameDirectiveDecls);
9169 checkDeclIsAllowedInOpenMPTarget(Expr *E, Decl *D,
9173 return DeclareTargetNestingLevel > 0;
9176 bool isInOpenMPTargetExecutionDirective()
const;
9201 llvm::SmallDenseMap<const ValueDecl *, const Expr *, 4>;
9251 StmtResult ActOnOpenMPParallelForSimdDirective(
9322 StmtResult ActOnOpenMPTargetParallelForDirective(
9364 StmtResult ActOnOpenMPDistributeParallelForDirective(
9369 StmtResult ActOnOpenMPDistributeParallelForSimdDirective(
9374 StmtResult ActOnOpenMPDistributeSimdDirective(
9379 StmtResult ActOnOpenMPTargetParallelForSimdDirective(
9390 StmtResult ActOnOpenMPTeamsDistributeDirective(
9395 StmtResult ActOnOpenMPTeamsDistributeSimdDirective(
9400 StmtResult ActOnOpenMPTeamsDistributeParallelForSimdDirective(
9405 StmtResult ActOnOpenMPTeamsDistributeParallelForDirective(
9416 StmtResult ActOnOpenMPTargetTeamsDistributeDirective(
9421 StmtResult ActOnOpenMPTargetTeamsDistributeParallelForDirective(
9426 StmtResult ActOnOpenMPTargetTeamsDistributeParallelForSimdDirective(
9431 StmtResult ActOnOpenMPTargetTeamsDistributeSimdDirective(
9445 DeclGroupPtrTy ActOnOpenMPDeclareSimdDirective(
9446 DeclGroupPtrTy DG, OMPDeclareSimdDeclAttr::BranchStateTy BS,
9457 OMPClause *ActOnOpenMPAllocatorClause(Expr *Allocator,
9473 OMPClause *ActOnOpenMPNumThreadsClause(Expr *NumThreads,
9478 OMPClause *ActOnOpenMPSafelenClause(Expr *Length,
9487 OMPClause *ActOnOpenMPCollapseClause(Expr *NumForLoops,
9495 Expr *NumForLoops =
nullptr);
9528 OMPClause *ActOnOpenMPSingleExprWithArgClause(
9592 OMPClause *ActOnOpenMPAtomicDefaultMemOrderClause(
9638 OMPClause *ActOnOpenMPTaskReductionClause(
9645 OMPClause *ActOnOpenMPInReductionClause(
9704 OMPClause *ActOnOpenMPThreadLimitClause(Expr *ThreadLimit,
9713 OMPClause *ActOnOpenMPDistScheduleClause(
9751 CCK_ForBuiltinOverloadedOp
9755 return CCK == CCK_CStyleCast || CCK == CCK_FunctionalCast ||
9756 CCK == CCK_OtherCast;
9764 const CXXCastPath *BasePath =
nullptr,
9766 = CCK_ImplicitConversion);
9783 ExprResult CallExprUnaryConversions(Expr *E);
9787 ExprResult DefaultFunctionArrayConversion(Expr *E,
bool Diagnose =
true);
9792 ExprResult DefaultFunctionArrayLvalueConversion(Expr *E,
9793 bool Diagnose =
true);
9804 ExprResult DefaultArgumentPromotion(Expr *E);
9809 ExprResult TemporaryMaterializationConversion(Expr *E);
9817 VariadicDoesNotApply
9842 bool hasCStrMethod(
const Expr *E);
9846 bool GatherArgumentsForCall(
SourceLocation CallLoc, FunctionDecl *FDecl,
9851 bool AllowExplicit =
false,
9852 bool IsListInitialization =
false);
9857 FunctionDecl *FDecl);
9865 bool IsCompAssign =
false);
9952 bool *Complained =
nullptr);
9957 bool IsValueInFlagEnum(
const EnumDecl *ED,
const llvm::APInt &Val,
9958 bool AllowMask)
const;
9978 bool ConvertRHS =
true);
9996 bool DiagnoseCFAudited =
false,
bool ConvertRHS =
true);
10003 bool IsStringLiteralToNonConstPointerConversion(Expr *From,
QualType ToType);
10005 bool CheckExceptionSpecCompatibility(Expr *From,
QualType ToType);
10009 bool AllowExplicit =
false);
10012 bool AllowExplicit,
10018 = CCK_ImplicitConversion);
10036 QualType CheckPointerToMemberOperands(
10039 QualType CheckMultiplyDivideOperands(
10044 bool IsCompAssign =
false);
10048 QualType CheckSubtractionOperands(
10073 Expr *LHS, Expr *RHS);
10074 ExprResult checkPseudoObjectRValue(Expr *E);
10077 QualType CheckConditionalOperands(
10080 QualType CXXCheckConditionalOperands(
10084 bool ConvertArgs =
true);
10087 bool ConvertArgs =
true) {
10088 Expr *E1Tmp = E1.
get(), *E2Tmp = E2.
get();
10090 FindCompositePointerType(Loc, E1Tmp, E2Tmp, ConvertArgs);
10099 bool DiagnoseConditionalForNull(Expr *LHSExpr, Expr *RHSExpr,
10102 void DiagnoseAlwaysNonNullPointer(Expr *E,
10109 bool AllowBothBool,
bool AllowBoolConversion);
10121 bool CheckForConstantInitializer(Expr *e,
QualType t);
10131 Ref_Incompatible = 0,
10142 bool &DerivedToBase,
10143 bool &ObjCConversion,
10144 bool &ObjCLifetimeConversion);
10190 bool Diagnose =
true,
10191 bool DiagnoseCFAudited =
false,
10195 Expr *stripARCUnbridgedCast(Expr *e);
10196 void diagnoseARCUnbridgedCast(Expr *e);
10198 bool CheckObjCARCUnavailableWeakConversion(
QualType castType,
10204 void checkRetainCycles(Expr *receiver, Expr *argument);
10205 void checkRetainCycles(VarDecl *Var, Expr *Init);
10213 void checkUnsafeExprAssigns(
SourceLocation Loc, Expr *LHS, Expr *RHS);
10219 bool CheckMessageArgumentTypes(
const Expr *Receiver,
QualType ReceiverType,
10230 QualType getMessageSendResultType(
const Expr *Receiver,
QualType ReceiverType,
10232 bool isSuperMessage);
10236 void EmitRelatedResultTypeNote(
const Expr *E);
10241 void EmitRelatedResultTypeNoteForReturn(
QualType destType);
10244 Decl *ConditionVar;
10247 bool HasKnownValue;
10253 : ConditionVar(ConditionVar), Condition(Condition), Invalid(
false),
10254 HasKnownValue(IsConstexpr && Condition.get() &&
10255 !Condition.get()->isValueDependent()),
10256 KnownValue(HasKnownValue &&
10257 !!Condition.get()->EvaluateKnownConstInt(S.Context)) {}
10259 : ConditionVar(nullptr), Condition(nullptr), Invalid(Invalid),
10265 std::pair<VarDecl *, Expr *>
get()
const {
10266 return std::make_pair(cast_or_null<VarDecl>(ConditionVar),
10270 if (!HasKnownValue)
10292 ExprResult CheckConditionVariable(VarDecl *ConditionVar,
10306 bool IsConstexpr =
false);
10318 void DiagnoseAssignmentAsCondition(Expr *E);
10322 void DiagnoseEqualityWithExtraParens(
ParenExpr *ParenE);
10325 ExprResult CheckCXXBooleanCondition(Expr *CondExpr,
bool IsConstexpr =
false);
10330 void ConvertIntegerToTypeWarnOnOverflow(llvm::APSInt &OldVal,
10331 unsigned NewWidth,
bool NewSign,
10337 bool CheckObjCDeclScope(Decl *D);
10355 ExprResult VerifyIntegerConstantExpression(Expr *E, llvm::APSInt *Result,
10357 bool AllowFold =
true);
10358 ExprResult VerifyIntegerConstantExpression(Expr *E, llvm::APSInt *Result,
10360 bool AllowFold =
true);
10361 ExprResult VerifyIntegerConstantExpression(Expr *E,
10362 llvm::APSInt *Result =
nullptr);
10369 QualType FieldTy,
bool IsMsStruct,
10370 Expr *BitWidth,
bool *ZeroWidth =
nullptr);
10373 unsigned ForceCUDAHostDeviceDepth = 0;
10379 void PushForceCUDAHostDevice();
10384 bool PopForceCUDAHostDevice();
10389 llvm::DenseMap<CanonicalDeclPtr<FunctionDecl>,
10390 std::vector<PartialDiagnosticAt>>
10421 llvm::DenseMap< CanonicalDeclPtr<FunctionDecl>,
10422 llvm::MapVector<CanonicalDeclPtr<FunctionDecl>,
10459 FunctionDecl *Fn,
Sema &S);
10474 operator bool()
const {
return ImmediateDiag.hasValue(); }
10476 template <
typename T>
10479 if (Diag.ImmediateDiag.hasValue())
10480 *Diag.ImmediateDiag << Value;
10481 else if (Diag.PartialDiagId.hasValue())
10492 bool ShowCallStack;
10503 void markKnownEmitted(
10504 Sema &S, FunctionDecl *OrigCaller, FunctionDecl *OrigCallee,
10565 bool IgnoreImplicitHDAttr =
false);
10570 return IdentifyCUDATarget(dyn_cast<FunctionDecl>(CurContext));
10594 const FunctionDecl *Callee);
10602 const FunctionDecl *Callee) {
10603 return IdentifyCUDAPreference(Caller, Callee) != CFP_Never;
10608 void maybeAddCUDAHostDeviceAttrs(FunctionDecl *FD,
10639 void EraseUnwantedCUDAMatches(
10640 const FunctionDecl *Caller,
10641 SmallVectorImpl<std::pair<DeclAccessPair, FunctionDecl *>> &Matches);
10654 bool inferCUDATargetForImplicitSpecialMember(
CXXRecordDecl *ClassDecl,
10662 bool isEmptyCudaConstructor(
SourceLocation Loc, CXXConstructorDecl *CD);
10673 void checkAllowedCUDAInitializer(VarDecl *VD);
10677 void checkCUDATargetOverload(FunctionDecl *NewFD,
10685 std::string getCudaConfigureFuncName()
const;
10732 PCC_LocalDeclarationSpecifiers
10735 void CodeCompleteModuleImport(
SourceLocation ImportLoc, ModuleIdPath Path);
10736 void CodeCompleteOrdinaryName(Scope *S,
10738 void CodeCompleteDeclSpec(Scope *S,
DeclSpec &DS,
10739 bool AllowNonIdentifiers,
10740 bool AllowNestedNameSpecifiers);
10743 void CodeCompleteExpression(Scope *S,
10745 void CodeCompleteExpression(Scope *S,
QualType PreferredType,
10746 bool IsParenthesized =
false);
10747 void CodeCompleteMemberReferenceExpr(Scope *S, Expr *
Base, Expr *OtherOpBase,
10749 bool IsBaseExprStatement,
10751 void CodeCompletePostfixExpression(Scope *S,
ExprResult LHS,
10753 void CodeCompleteTag(Scope *S,
unsigned TagSpec);
10754 void CodeCompleteTypeQualifiers(
DeclSpec &DS);
10757 void CodeCompleteBracketDeclarator(Scope *S);
10758 void CodeCompleteCase(Scope *S);
10767 QualType ProduceCtorInitMemberSignatureHelp(Scope *S, Decl *ConstructorDecl,
10769 ParsedType TemplateTypeTy,
10773 void CodeCompleteInitializer(Scope *S, Decl *D);
10774 void CodeCompleteAfterIf(Scope *S);
10776 void CodeCompleteQualifiedId(Scope *S,
CXXScopeSpec &SS,
bool EnteringContext,
10778 void CodeCompleteUsing(Scope *S);
10779 void CodeCompleteUsingDirective(Scope *S);
10780 void CodeCompleteNamespaceDecl(Scope *S);
10781 void CodeCompleteNamespaceAliasDecl(Scope *S);
10782 void CodeCompleteOperatorName(Scope *S);
10783 void CodeCompleteConstructorInitializer(
10788 bool AfterAmpersand);
10790 void CodeCompleteObjCAtDirective(Scope *S);
10791 void CodeCompleteObjCAtVisibility(Scope *S);
10792 void CodeCompleteObjCAtStatement(Scope *S);
10793 void CodeCompleteObjCAtExpression(Scope *S);
10794 void CodeCompleteObjCPropertyFlags(Scope *S,
ObjCDeclSpec &ODS);
10795 void CodeCompleteObjCPropertyGetter(Scope *S);
10796 void CodeCompleteObjCPropertySetter(Scope *S);
10797 void CodeCompleteObjCPassingType(Scope *S,
ObjCDeclSpec &DS,
10799 void CodeCompleteObjCMessageReceiver(Scope *S);
10800 void CodeCompleteObjCSuperMessage(Scope *S,
SourceLocation SuperLoc,
10802 bool AtArgumentExpression);
10803 void CodeCompleteObjCClassMessage(Scope *S, ParsedType Receiver,
10805 bool AtArgumentExpression,
10806 bool IsSuper =
false);
10807 void CodeCompleteObjCInstanceMessage(Scope *S, Expr *Receiver,
10809 bool AtArgumentExpression,
10811 void CodeCompleteObjCForCollection(Scope *S,
10812 DeclGroupPtrTy IterationVar);
10813 void CodeCompleteObjCSelector(Scope *S,
10815 void CodeCompleteObjCProtocolReferences(
10817 void CodeCompleteObjCProtocolDecl(Scope *S);
10818 void CodeCompleteObjCInterfaceDecl(Scope *S);
10819 void CodeCompleteObjCSuperclass(Scope *S,
10822 void CodeCompleteObjCImplementationDecl(Scope *S);
10823 void CodeCompleteObjCInterfaceCategory(Scope *S,
10826 void CodeCompleteObjCImplementationCategory(Scope *S,
10829 void CodeCompleteObjCPropertyDefinition(Scope *S);
10830 void CodeCompleteObjCPropertySynthesizeIvar(Scope *S,
10832 void CodeCompleteObjCMethodDecl(Scope *S,
Optional<bool> IsInstanceMethod,
10833 ParsedType ReturnType);
10834 void CodeCompleteObjCMethodDeclSelector(Scope *S,
10835 bool IsInstanceMethod,
10836 bool AtParameterName,
10837 ParsedType ReturnType,
10839 void CodeCompleteObjCClassPropertyRefExpr(Scope *S,
IdentifierInfo &ClassName,
10841 bool IsBaseExprStatement);
10842 void CodeCompletePreprocessorDirective(
bool InConditional);
10843 void CodeCompleteInPreprocessorConditionalExclusion(Scope *S);
10844 void CodeCompletePreprocessorMacroName(
bool IsDefinition);
10845 void CodeCompletePreprocessorExpression();
10846 void CodeCompletePreprocessorMacroArgument(Scope *S,
10849 unsigned Argument);
10850 void CodeCompleteIncludedFile(llvm::StringRef Dir,
bool IsAngled);
10851 void CodeCompleteNaturalLanguage();
10852 void CodeCompleteAvailabilityPlatformName();
10863 unsigned ByteNo)
const;
10866 void CheckArrayAccess(
const Expr *BaseExpr,
const Expr *IndexExpr,
10868 bool AllowOnePastEnd=
true,
bool IndexNegated=
false);
10869 void CheckArrayAccess(
const Expr *E);
10872 struct FormatStringInfo {
10873 unsigned FormatIdx;
10874 unsigned FirstDataArg;
10878 static bool getFormatStringInfo(
const FormatAttr *Format,
bool IsCXXMember,
10879 FormatStringInfo *FSI);
10880 bool CheckFunctionCall(FunctionDecl *FDecl,
CallExpr *TheCall,
10887 void CheckConstructorCall(FunctionDecl *FDecl,
10897 bool CheckObjCString(Expr *Arg);
10898 ExprResult CheckOSLogFormatStringArg(Expr *Arg);
10900 ExprResult CheckBuiltinFunctionCall(FunctionDecl *FDecl,
10901 unsigned BuiltinID,
CallExpr *TheCall);
10902 void checkFortifiedBuiltinMemoryFunction(FunctionDecl *FD,
CallExpr *TheCall);
10904 bool CheckARMBuiltinExclusiveCall(
unsigned BuiltinID,
CallExpr *TheCall,
10905 unsigned MaxWidth);
10906 bool CheckNeonBuiltinFunctionCall(
unsigned BuiltinID,
CallExpr *TheCall);
10907 bool CheckARMBuiltinFunctionCall(
unsigned BuiltinID,
CallExpr *TheCall);
10909 bool CheckAArch64BuiltinFunctionCall(
unsigned BuiltinID,
CallExpr *TheCall);
10910 bool CheckHexagonBuiltinFunctionCall(
unsigned BuiltinID,
CallExpr *TheCall);
10911 bool CheckHexagonBuiltinCpu(
unsigned BuiltinID,
CallExpr *TheCall);
10912 bool CheckHexagonBuiltinArgument(
unsigned BuiltinID,
CallExpr *TheCall);
10913 bool CheckMipsBuiltinFunctionCall(
unsigned BuiltinID,
CallExpr *TheCall);
10914 bool CheckSystemZBuiltinFunctionCall(
unsigned BuiltinID,
CallExpr *TheCall);
10915 bool CheckX86BuiltinRoundingOrSAE(
unsigned BuiltinID,
CallExpr *TheCall);
10916 bool CheckX86BuiltinGatherScatterScale(
unsigned BuiltinID,
CallExpr *TheCall);
10917 bool CheckX86BuiltinFunctionCall(
unsigned BuiltinID,
CallExpr *TheCall);
10918 bool CheckPPCBuiltinFunctionCall(
unsigned BuiltinID,
CallExpr *TheCall);
10920 bool SemaBuiltinVAStart(
unsigned BuiltinID,
CallExpr *TheCall);
10921 bool SemaBuiltinVAStartARMMicrosoft(
CallExpr *Call);
10922 bool SemaBuiltinUnorderedCompare(
CallExpr *TheCall);
10923 bool SemaBuiltinFPClassification(
CallExpr *TheCall,
unsigned NumArgs);
10924 bool SemaBuiltinVSX(
CallExpr *TheCall);
10925 bool SemaBuiltinOSLogFormat(
CallExpr *TheCall);
10935 bool SemaBuiltinPrefetch(
CallExpr *TheCall);
10936 bool SemaBuiltinAllocaWithAlign(
CallExpr *TheCall);
10937 bool SemaBuiltinAssume(
CallExpr *TheCall);
10938 bool SemaBuiltinAssumeAligned(
CallExpr *TheCall);
10939 bool SemaBuiltinLongjmp(
CallExpr *TheCall);
10940 bool SemaBuiltinSetjmp(
CallExpr *TheCall);
10947 bool SemaBuiltinConstantArg(
CallExpr *TheCall,
int ArgNum,
10948 llvm::APSInt &Result);
10949 bool SemaBuiltinConstantArgRange(
CallExpr *TheCall,
int ArgNum,
int Low,
10950 int High,
bool RangeIsError =
true);
10951 bool SemaBuiltinConstantArgMultiple(
CallExpr *TheCall,
int ArgNum,
10952 unsigned Multiple);
10953 bool SemaBuiltinARMSpecialReg(
unsigned BuiltinID,
CallExpr *TheCall,
10954 int ArgNum,
unsigned ExpectedFieldNum,
10956 bool SemaBuiltinARMMemoryTaggingCall(
unsigned BuiltinID,
CallExpr *TheCall);
10974 static bool GetFormatNSStringIdx(
const FormatAttr *Format,
unsigned &Idx);
10977 bool CheckFormatArguments(
const FormatAttr *Format,
10982 llvm::SmallBitVector &CheckedVarArgs);
10984 bool HasVAListArg,
unsigned format_idx,
10988 llvm::SmallBitVector &CheckedVarArgs);
10990 void CheckAbsoluteValueFunction(
const CallExpr *Call,
10991 const FunctionDecl *FDecl);
10993 void CheckMaxUnsignedZero(
const CallExpr *Call,
const FunctionDecl *FDecl);
10995 void CheckMemaccessArguments(
const CallExpr *Call,
10999 void CheckStrlcpycatArguments(
const CallExpr *Call,
11002 void CheckStrncatArguments(
const CallExpr *Call,
11005 void CheckReturnValExpr(Expr *RetValExp,
QualType lhsType,
11007 bool isObjCMethod =
false,
11008 const AttrVec *Attrs =
nullptr,
11009 const FunctionDecl *FD =
nullptr);
11012 void CheckFloatComparison(
SourceLocation Loc, Expr *LHS, Expr *RHS);
11017 void CheckForIntOverflow(Expr *E);
11018 void CheckUnsequencedOperations(Expr *E);
11023 bool IsConstexpr =
false);
11032 bool DeclIsField =
true);
11036 void CheckBreakContinueBinding(Expr *E);
11044 bool DeleteWasArrayForm);
11047 void RegisterTypeTagForDatatype(
const IdentifierInfo *ArgumentKind,
11048 uint64_t MagicValue,
QualType Type,
11049 bool LayoutCompatible,
bool MustBeNull);
11055 Type(Type), LayoutCompatible(LayoutCompatible),
11056 MustBeNull(MustBeNull)
11073 std::unique_ptr<llvm::DenseMap<TypeTagMagicValue, TypeTagData>>
11074 TypeTagForDatatypeMagicValues;
11078 void CheckArgumentWithTypeTag(
const ArgumentWithTypeTagAttr *Attr,
11084 void CheckAddressOfPackedMember(Expr *rhs);
11141 Decl *getObjCDeclContext()
const;
11144 return OriginalLexicalContext ? OriginalLexicalContext : CurContext;
11151 DC = CatD->getClassInterface();
11158 bool PartialOverloading =
false) {
11160 if (NumArgs > 0 && PartialOverloading)
11161 return NumArgs + 1 > NumParams;
11162 return NumArgs > NumParams;
11171 class SavePendingParsedClassStateRAII {
11173 SavePendingParsedClassStateRAII(
Sema &S) : S(S) { swapSavedState(); }
11175 ~SavePendingParsedClassStateRAII() {
11177 "there shouldn't be any pending delayed exception spec checks");
11179 "there shouldn't be any pending delayed exception spec checks");
11181 "there shouldn't be any pending delayed DLL export classes");
11187 decltype(DelayedOverridingExceptionSpecChecks)
11188 SavedOverridingExceptionSpecChecks;
11189 decltype(DelayedEquivalentExceptionSpecChecks)
11190 SavedEquivalentExceptionSpecChecks;
11191 decltype(DelayedDllExportClasses) SavedDllExportClasses;
11193 void swapSavedState() {
11194 SavedOverridingExceptionSpecChecks.swap(
11196 SavedEquivalentExceptionSpecChecks.swap(
11204 struct MisalignedMember {
11210 MisalignedMember() : E(), RD(), MD(), Alignment() {}
11213 : E(E), RD(RD), MD(MD), Alignment(Alignment) {}
11214 explicit MisalignedMember(Expr *E)
11215 : MisalignedMember(E,
nullptr,
nullptr,
CharUnits()) {}
11217 bool operator==(
const MisalignedMember &m) {
return this->E == m.E; }
11231 void DiagnoseMisalignedMembers();
11238 void DiscardMisalignedMemberAddress(
const Type *T, Expr *E);
11243 void RefersToMemberWithReducedAlignment(
11253 ConstructorDestructor,
11261 bool Entered =
true;
11266 Decl *LambdaContextDecl =
nullptr,
11268 Sema::ExpressionEvaluationContextRecord::EK_Other,
11269 bool ShouldEnter =
true)
11270 : Actions(Actions), Entered(ShouldEnter) {
11279 Sema::ExpressionEvaluationContextRecord::EK_Other)
11280 : Actions(Actions) {
11282 NewContext, Sema::ReuseLambdaContextDecl, ExprContext);
11287 bool ShouldEnter =
true)
11288 : Actions(Actions), Entered(
false) {
11296 Sema::ExpressionEvaluationContext::UnevaluatedList);
11342 return LHS.
FD == RHS.
FD && LHS.
Loc == RHS.
Loc;
FileNullabilityMap NullabilityMap
A mapping that describes the nullability we've seen in each header file.
Abstract class used to diagnose incomplete types.
ObjCInterfaceDecl * NSStringDecl
The declaration of the Objective-C NSString class.
PragmaStack< StringLiteral * > CodeSegStack
UnusedFileScopedDeclsType UnusedFileScopedDecls
The set of file scoped decls seen so far that have not been used and must warn if not used...
We are defining a synthesized function (such as a defaulted special member).
static void collectUnexpandedParameterPacks(Sema &S, TemplateParameterList *Params, SmallVectorImpl< UnexpandedParameterPack > &Unexpanded)
The lookup results will be used for redeclaration of a name, if an entity by that name already exists...
Represents a function declaration or definition.
bool RequireCompleteExprType(Expr *E, unsigned DiagID, const Ts &...Args)
llvm::SmallSetVector< const TypedefNameDecl *, 4 > UnusedLocalTypedefNameCandidates
Set containing all typedefs that are likely unused.
A set of visible modules.
UnexpandedParameterPackContext
The context in which an unexpanded parameter pack is being diagnosed.
std::pair< llvm::PointerUnion< const TemplateTypeParmType *, NamedDecl * >, SourceLocation > UnexpandedParameterPack
SourceLocation getOptimizeOffPragmaLocation() const
Get the location for the currently active "\#pragma clang optimize off". If this location is invalid...
static DiagnosticBuilder Diag(DiagnosticsEngine *Diags, const LangOptions &Features, FullSourceLoc TokLoc, const char *TokBegin, const char *TokRangeBegin, const char *TokRangeEnd, unsigned DiagID)
Produce a diagnostic highlighting some portion of a literal.
ExtVectorDeclsType ExtVectorDecls
ExtVectorDecls - This is a list all the extended vector types.
NestedNameSpecInfo(IdentifierInfo *II, SourceLocation IdLoc, SourceLocation ColonColonLoc, ParsedType ObjectType=ParsedType())
Creates info object for the most typical case.
ExternalSemaSource * getExternalSource() const
IncompatibleNestedPointerAddressSpaceMismatch - The assignment changes address spaces in nested point...
SuppressedDiagnosticsMap SuppressedDiagnostics
CXXMethodDecl * getMethod() const
no exception specification
~GlobalEagerInstantiationScope()
Smart pointer class that efficiently represents Objective-C method names.
Module * getOwningModule() const
Get the module that owns this declaration (for visibility purposes).
void PushExpressionEvaluationContext(ExpressionEvaluationContext NewContext, Decl *LambdaContextDecl=nullptr, ExpressionEvaluationContextRecord::ExpressionKind Type=ExpressionEvaluationContextRecord::EK_Other)
if(T->getSizeExpr()) TRY_TO(TraverseStmt(T -> getSizeExpr()))
unsigned getRawEncoding() const
When a SourceLocation itself cannot be used, this returns an (opaque) 32-bit integer encoding for it...
PointerToInt - The assignment converts a pointer to an int, which we accept as an extension...
Stores the type being destroyed by a pseudo-destructor expression.
A (possibly-)qualified type.
Keeps information about an identifier in a nested-name-spec.
GlobalEagerInstantiationScope(Sema &S, bool Enabled)
Simple class containing the result of Sema::CorrectTypo.
TemplateDeductionResult
Describes the result of template argument deduction.
LateTemplateParserCB * LateTemplateParser
SmallVectorImpl< Decl * > & WeakTopLevelDecls()
WeakTopLevelDeclDecls - access to #pragma weak-generated Decls.
Instantiation or recovery rebuild of a for-range statement.
NameClassification(const IdentifierInfo *Keyword)
llvm::PointerUnion3< TemplateTypeParmDecl *, NonTypeTemplateParmDecl *, TemplateTemplateParmDecl * > TemplateParameter
Stores a template parameter of any kind.
void SentinelAction(PragmaMsStackAction Action, StringRef Label)
ASTConsumer - This is an abstract interface that should be implemented by clients that read ASTs...
~EnterExpressionEvaluationContext()
Defines enumerations for the type traits support.
A cast other than a C-style cast.
LateParsedTemplateMapT LateParsedTemplateMap
SmallVector< PackIncludeState, 8 > PackIncludeStack
A stack-allocated class that identifies which local variable declaration instantiations are present i...
llvm::MutableArrayRef< ImplicitConversionSequence > ConversionSequenceList
A list of implicit conversion sequences for the arguments of an OverloadCandidate.
static bool getPrintable(bool B)
bool operator==(CanQual< T > x, CanQual< U > y)
static void LookupVisibleDecls(DeclContext *Ctx, LookupResult &Result, bool QualifiedNameLookup, bool InBaseClass, VisibleDeclConsumer &Consumer, VisibleDeclsRecord &Visited, bool IncludeDependentBases, bool LoadExternal)
Code completion occurs within a class, struct, or union.
RecordDecl * MSVCGuidDecl
The MSVC "_GUID" struct, which is defined in MSVC header files.
std::vector< std::unique_ptr< TemplateInstantiationCallback > > TemplateInstCallbacks
The template instantiation callbacks to trace or track instantiations (objects can be chained)...
OpenCL supported extensions and optional core features.
PragmaStack< StringLiteral * > DataSegStack
Represents a lazily-loaded vector of data.
Emit the diagnostic immediately, and, if it's a warning or error, also emit a call stack showing how ...
ObjCBridgeCastKind
The kind of bridging performed by the Objective-C bridge cast.
std::unique_ptr< RecordDeclSetTy > PureVirtualClassDiagSet
PureVirtualClassDiagSet - a set of class declarations which we have emitted a list of pure virtual fu...
A class which encapsulates the logic for delaying diagnostics during parsing and other processing...
OpenMPDefaultmapClauseKind
OpenMP attributes for 'defaultmap' clause.
Specialize PointerLikeTypeTraits to allow LazyGenerationalUpdatePtr to be placed into a PointerUnion...
A structure used to record information about a failed template argument deduction, for diagnosis.
static ConditionResult ConditionError()
Checking non-dependent argument conversions failed.
TypePropertyCache< Private > Cache
ObjCMessageKind
Describes the kind of message expression indicated by a message send that starts with an identifier...
Look up the name of an Objective-C protocol.
Decl * Entity
The entity that is being synthesized.
QualType CXXThisTypeOverride
When non-NULL, the C++ 'this' expression is allowed despite the current context not being a non-stati...
OpenCLOptions OpenCLFeatures
Stmt - This represents one statement.
NullabilityKind
Describes the nullability of a particular type.
We are matching the template parameter lists of two templates that might be redeclarations.
FunctionType - C99 6.7.5.3 - Function Declarators.
ParsedType actOnLambdaInitCaptureInitialization(SourceLocation Loc, bool ByRef, SourceLocation EllipsisLoc, IdentifierInfo *Id, LambdaCaptureInitKind InitKind, Expr *&Init)
Perform initialization analysis of the init-capture and perform any implicit conversions such as an l...
FullExprArg MakeFullExpr(Expr *Arg)
Provides information about an attempted template argument deduction, whose success or failure was des...
Merge availability attributes for an override, which requires an exact match or a weakening of constr...
Microsoft __if_not_exists.
An instance of this object exists for each enum constant that is defined.
LazyVector< CXXConstructorDecl *, ExternalSemaSource, &ExternalSemaSource::ReadDelegatingConstructors, 2, 2 > DelegatingCtorDeclsType
The name refers to a function template or a set of overloaded functions that includes at least one fu...
Represents the declaration of a typedef-name via the 'typedef' type specifier.
SmallVector< std::pair< const CXXMethodDecl *, const CXXMethodDecl * >, 2 > DelayedOverridingExceptionSpecChecks
All the overriding functions seen during a class definition that had their exception spec checks dela...
llvm::StringRef StackSlotLabel
SmallVector< Scope *, 2 > CurrentSEHFinally
Stack of active SEH __finally scopes. Can be empty.
void setCurrentOpenCLExtension(llvm::StringRef Ext)
Defines the clang::Module class, which describes a module in the source code.
OriginalCallArg(QualType OriginalParamType, bool DecomposedParam, unsigned ArgIdx, QualType OriginalArgType)
SemaDiagnosticBuilder Diag(SourceLocation Loc, unsigned DiagID)
Emit a diagnostic.
Decl - This represents one declaration (or definition), e.g.
A normal translation unit fragment.
Captures information about "declaration specifiers" specific to Objective-C.
LambdaCaptureDefault
The default, if any, capture method for a lambda expression.
std::deque< PendingImplicitInstantiation > PendingInstantiations
The queue of implicit template instantiations that are required but have not yet been performed...
AssignConvertType
AssignConvertType - All of the 'assignment' semantic checks return this enum to indicate whether the ...
A reference to a name which we were able to look up during parsing but could not resolve to a specifi...
Defines the C++ template declaration subclasses.
Scope * TUScope
Translation Unit Scope - useful to Objective-C actions that need to lookup file scope declarations in...
Represents a C++11 auto or C++14 decltype(auto) type.
DeclContext * OriginalLexicalContext
Generally null except when we temporarily switch decl contexts, like in.
ParenExpr - This represents a parethesized expression, e.g.
SmallVector< CodeSynthesisContext, 16 > CodeSynthesisContexts
List of active code synthesis contexts.
SmallVector< Module *, 16 > CodeSynthesisContextLookupModules
Extra modules inspected when performing a lookup during a template instantiation. ...
The base class of the type hierarchy.
std::deque< PendingImplicitInstantiation > PendingLocalImplicitInstantiations
The queue of implicit template instantiations that are required and must be performed within the curr...
void AddFactoryMethodToGlobalPool(ObjCMethodDecl *Method, bool impl=false)
AddFactoryMethodToGlobalPool - Same as above, but for factory methods.
SmallVector< PragmaAttributeEntry, 2 > Entries
llvm::MapVector< const FunctionDecl *, std::unique_ptr< LateParsedTemplate > > LateParsedTemplateMapT
~SynthesizedFunctionScope()
MissingImportKind
Kinds of missing import.
DiagnosticBuilder Report(SourceLocation Loc, unsigned DiagID)
Issue the message to the client.
Declaration of a variable template.
TemplateParamListContext
The context in which we are checking a template parameter list.
Represent a C++ namespace.
Template argument deduction produced inconsistent deduced values for the given template parameter...
RedeclarationKind
Specifies whether (or how) name lookup is being performed for a redeclaration (vs.
static FunctionDeclAndLoc getEmptyKey()
AccessSpecifier
A C++ access specifier (public, private, protected), plus the special value "none" which means differ...
LazyVector< const DeclaratorDecl *, ExternalSemaSource, &ExternalSemaSource::ReadUnusedFileScopedDecls, 2, 2 > UnusedFileScopedDeclsType
A container of type source information.
static const IdentifierInfo * getPrintable(const IdentifierInfo *II)
Store information needed for an explicit specifier.
Wrapper for void* pointer.
Parser - This implements a parser for the C family of languages.
Look up of a name that precedes the '::' scope resolution operator in C++.
std::pair< ValueDecl *, SourceLocation > PendingImplicitInstantiation
An entity for which implicit template instantiation is required.
bool hasVisibleDeclaration(const NamedDecl *D, llvm::SmallVectorImpl< Module *> *Modules=nullptr)
Determine whether any declaration of an entity is visible.
Floating point control options.
We are instantiating a default argument for a template parameter.
DelayedDiagnosticsState pushUndelayed()
Enter a new scope where access and deprecation diagnostics are not delayed.
Abstract base class used for diagnosing integer constant expression violations.
FileNullability Nullability
Represents a path from a specific derived class (which is not represented as part of the path) to a p...
LiteralOperatorLookupResult
The possible outcomes of name lookup for a literal operator.
Represents a C++ constructor within a class.
Represents a prvalue temporary that is written into memory so that a reference can bind to it...
OpenMPDefaultmapClauseModifier
OpenMP modifiers for 'defaultmap' clause.
SpecialMemberOverloadResultEntry(const llvm::FoldingSetNodeID &ID)
unsigned NonInstantiationEntries
The number of CodeSynthesisContexts that are not template instantiations and, therefore, should not be counted as part of the instantiation depth.
NameClassificationKind getKind() const
static void MarkUsedTemplateParameters(ASTContext &Ctx, const TemplateArgument &TemplateArg, bool OnlyDeduced, unsigned Depth, llvm::SmallBitVector &Used)
Mark the template parameters that are used by this template argument.
VerifyICEDiagnoser(bool Suppress=false)
EnterExpressionEvaluationContext(Sema &Actions, Sema::ExpressionEvaluationContext NewContext, Sema::ReuseLambdaContextDecl_t, Sema::ExpressionEvaluationContextRecord::ExpressionKind ExprContext=Sema::ExpressionEvaluationContextRecord::EK_Other)
RAII object to handle the state changes required to synthesize a function body.
Look up a namespace name within a C++ using directive or namespace alias definition, ignoring non-namespace names (C++ [basic.lookup.udir]p1).
Consumes visible declarations found when searching for all visible names within a given scope or cont...
bool DisableTypoCorrection
Tracks whether we are in a context where typo correction is disabled.
Retains information about a function, method, or block that is currently being parsed.
FriendDecl - Represents the declaration of a friend entity, which can be a function, a type, or a templated function or type.
RAII object that enters a new expression evaluation context.
Represents a variable declaration or definition.
IfExistsResult
Describes the result of an "if-exists" condition check.
ExpressionKind
Describes whether we are in an expression constext which we have to handle differently.
CleanupInfo Cleanup
Used to control the generation of ExprWithCleanups.
Information about one declarator, including the parsed type information and the identifier.
DiagnosticsEngine & Diags
llvm::SmallSetVector< DeclContext *, 16 > AssociatedNamespaceSet
const internal::VariadicDynCastAllOfMatcher< Stmt, Expr > expr
Matches expressions.
PrintingPolicy getPrintingPolicy() const
Retrieve a suitable printing policy for diagnostics.
llvm::SmallPtrSet< const NamedDecl *, 4 > TypoCorrectedFunctionDefinitions
The function definitions which were renamed as part of typo-correction to match their respective decl...
Records and restores the FP_CONTRACT state on entry/exit of compound statements.
Extra information about a function prototype.
ExpressionEvaluationContextRecord(ExpressionEvaluationContext Context, unsigned NumCleanupObjects, CleanupInfo ParentCleanup, Decl *ManglingContextDecl, ExpressionKind ExprContext)
TypeSpecifierType
Specifies the kind of type.
LangAS
Defines the address space values used by the address space qualifier of QualType. ...
Represents a variable template specialization, which refers to a variable template with a given set o...
ObjCMethodDecl - Represents an instance or class method declaration.
SmallVector< CXXRecordDecl *, 4 > DelayedDllExportClasses
void diagnose(Sema &S, SourceLocation Loc, QualType T) override
ExprResult ActOnFinishFullExpr(Expr *Expr, bool DiscardedValue)
RAII object used to temporarily allow the C++ 'this' expression to be used, with the given qualifiers...
llvm::MapVector< NamedDecl *, SourceLocation > UndefinedButUsed
UndefinedInternals - all the used, undefined objects which require a definition in this translation u...
The lookup found a single 'cooked' literal operator, which expects a normal literal to be built and p...
PragmaClangSection PragmaClangBSSSection
BoundTypeDiagnoser(unsigned DiagID, const Ts &...Args)
Stores a list of template parameters for a TemplateDecl and its derived classes.
Describes how types, statements, expressions, and declarations should be printed. ...
A context in which code is being synthesized (where a source location alone is not sufficient to iden...
Code completion occurs within an Objective-C implementation or category implementation.
ObjCMethodDecl * ValueWithBytesObjCTypeMethod
The declaration of the valueWithBytes:objCType: method.
llvm::MapVector< Selector, SourceLocation > ReferencedSelectors
Method selectors used in a @selector expression.
bool IsDecltype
Whether we are in a decltype expression.
NestedNameSpecInfo(IdentifierInfo *II, SourceLocation IdLoc, SourceLocation ColonColonLoc, QualType ObjectType)
static NameClassification NestedNameSpecifier()
SourceLocation PragmaLocation
Look up an ordinary name that is going to be redeclared as a name with linkage.
FunctionProtoType::ExceptionSpecInfo getExceptionSpec() const
Overwrite an EPI's exception specification with this computed exception specification.
Represents a parameter to a function.
OpenCLOptions & getOpenCLOptions()
Defines the clang::Expr interface and subclasses for C++ expressions.
ObjCInterfaceDecl * NSDictionaryDecl
The declaration of the Objective-C NSDictionary class.
FPOptions & getFPOptions()
const TemplateArgument * TemplateArgs
The list of template arguments we are substituting, if they are not part of the entity.
The collection of all-type qualifiers we support.
Information about a template-id annotation token.
static SourceRange getPrintable(TypeLoc TL)
void setMethod(CXXMethodDecl *MD)
void threadSafetyCleanup(BeforeSet *Cache)
Base wrapper for a particular "section" of type source info.
Represents a struct/union/class.
enum clang::Sema::CodeSynthesisContext::SynthesisKind Kind
friend const SemaDiagnosticBuilder & operator<<(const SemaDiagnosticBuilder &Diag, const T &Value)
Teach operator<< to produce an object of the correct type.
ContextualImplicitConverter(bool Suppress=false, bool SuppressConversion=false)
Represents a class template specialization, which refers to a class template with a given set of temp...
One of these records is kept for each identifier that is lexed.
std::unique_ptr< NSAPI > NSAPIObj
Caches identifiers/selectors for NSFoundation APIs.
LocalInstantiationScope * CurrentInstantiationScope
The current instantiation scope used to store local variables.
The lookup found a single 'raw' literal operator, which expects a string literal containing the spell...
IntToPointer - The assignment converts an int to a pointer, which we accept as an extension...
CompoundScopeRAII(Sema &S, bool IsStmtExpr=false)
SmallVector< std::pair< FunctionDecl *, FunctionDecl * >, 2 > DelayedEquivalentExceptionSpecChecks
All the function redeclarations seen during a class definition that had their exception spec checks d...
IncompatibleObjCWeakRef - Assigning a weak-unavailable object to an object with __weak qualifier...
Enumerator value with fixed underlying type.
Value of a non-type template parameter.
Represents a class type in Objective C.
CallingConventionIgnoredReason
Describes the reason a calling convention specification was ignored, used for diagnostics.
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
A C++ nested-name-specifier augmented with source location information.
Lookup for the name failed, but we're assuming it was a template name anyway.
bool inTemplateInstantiation() const
Determine whether we are currently performing template instantiation.
The results of name lookup within a DeclContext.
Base class for callback objects used by Sema::CorrectTypo to check the validity of a potential typo c...
ImplicitExceptionSpecification(Sema &Self)
FunctionScopeRAII(Sema &S)
FileNullability & operator[](FileID file)
OpenMPLinearClauseKind
OpenMP attributes for 'linear' clause.
Represents a member of a struct/union/class.
IdentifierSourceLocations TypoCorrectionFailures
A cache containing identifiers for which typo correction failed and their locations, so that repeated attempts to correct an identifier in a given location are ignored if typo correction already failed for it.
std::unique_ptr< sema::FunctionScopeInfo > CachedFunctionScope
threadSafety::BeforeSet * ThreadSafetyDeclCache
ObjCInterfaceDecl * NSValueDecl
The declaration of the Objective-C NSValue class.
UnaryExprOrTypeTrait
Names for the "expression or type" traits.
NamedDecl * Template
The template (or partial specialization) in which we are performing the instantiation, for substitutions of prior template arguments.
Code completion occurs following one or more template headers within a class.
This is not an overload because the signature exactly matches an existing declaration.
The iterator over UnresolvedSets.
Token - This structure provides full information about a lexed token.
__SIZE_TYPE__ size_t
The unsigned integer type of the result of the sizeof operator.
CompatiblePointerDiscardsQualifiers - The assignment discards c/v/r qualifiers, which we accept as an...
ParsingDeclState PushParsingDeclaration(sema::DelayedDiagnosticPool &pool)
The fixed underlying type of an enumeration.
bool isExternallyDeclarable() const
Determine whether this declaration can be redeclared in a different translation unit.
Represents a C++ member access expression for which lookup produced a set of overloaded functions...
TemplateName getTemplateName() const
LazyVector< VarDecl *, ExternalSemaSource, &ExternalSemaSource::ReadTentativeDefinitions, 2, 2 > TentativeDefinitionsType
Defines some OpenMP-specific enums and functions.
OpaquePtr< QualType > ParsedType
An opaque type for threading parsed type information through the parser.
Represents an access specifier followed by colon ':'.
The type of a non-type template parameter.
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
ArrayRef< std::pair< IdentifierInfo *, SourceLocation > > ModuleIdPath
A sequence of identifier/location pairs used to describe a particular module or submodule, e.g., std.vector.
i32 captured_struct **param SharedsTy A type which contains references the shared variables *param Shareds Context with the list of shared variables from the p *TaskFunction *param Data Additional data for task generation like final * state
void PopExpressionEvaluationContext()
OverloadKind
C++ Overloading.
Code completion occurs where only a type is permitted.
Describes a module or submodule.
llvm::BumpPtrAllocator BumpAlloc
ObjCMethodDecl * LookupFactoryMethodInGlobalPool(Selector Sel, SourceRange R, bool receiverIdOrClass=false)
LookupFactoryMethodInGlobalPool - Returns the method and warns if there are multiple signatures...
bool isConstantEvaluated()
This little struct is used to capture information about structure field declarators, which is basically just a bitfield size.
SpecialMemberOverloadResult - The overloading result for a special member function.
bool AccessCheckingSFINAE
When true, access checking violations are treated as SFINAE failures rather than hard errors...
An r-value expression (a pr-value in the C++11 taxonomy) produces a temporary value.
The type of an exception.
Code completion occurs at top-level or namespace context.
A pair of a canonical FunctionDecl and a SourceLocation.
We are instantiating the exception specification for a function template which was deferred until it ...
SemaDiagnosticBuilder(DiagnosticBuilder &DB, Sema &SemaRef, unsigned DiagID)
OpenMPDistScheduleClauseKind
OpenMP attributes for 'dist_schedule' clause.
An allocator used specifically for the purpose of code completion.
unsigned TyposCorrected
The number of typos corrected by CorrectTypo.
Represents a C++ using-declaration.
Code completion occurs within the body of a function on a recovery path, where we do not have a speci...
llvm::SmallVector< QualType, 4 > CurrentParameterCopyTypes
Stack of types that correspond to the parameter entities that are currently being copy-initialized...
Represents a C++ unqualified-id that has been parsed.
bool isCompleteType(SourceLocation Loc, QualType T)
ParsedAttributesView ArgAttrs
ArgAttrs - Attribute list for this argument.
static ExprResult CheckConvertedConstantExpression(Sema &S, Expr *From, QualType T, APValue &Value, Sema::CCEKind CCE, bool RequireInt)
CheckConvertedConstantExpression - Check that the expression From is a converted constant expression ...
Look up implicit 'self' parameter of an objective-c method.
Represents the results of name lookup.
static const std::string & getPrintable(const std::string &S)
RAII class used to indicate that we are performing provisional semantic analysis to determine the val...
ObjCContainerDecl - Represents a container for method declarations.
static NameClassification UndeclaredTemplate(TemplateName Name)
CharUnits - This is an opaque type for sizes expressed in character units.
TemplateSpecCandidateSet - A set of generalized overload candidates, used in template specializations...
A convenient class for passing around template argument information.
bool AllowAbstractFieldReference
A flag to indicate that we're in a context that permits abstract references to fields.
Module * getOwningModule(Decl *Entity)
Get the module owning an entity.
bool isObjCMethodDecl(Decl *D)
ICEConvertDiagnoser(bool AllowScopedEnumerations, bool Suppress, bool SuppressConversion)
Code completion occurs following one or more template headers.
The base type of a class type.
Keeps track of the mangled names of lambda expressions and block literals within a particular context...
Look up all declarations in a scope with the given name, including resolved using declarations...
Code completion occurs within an expression.
PragmaStack(const ValueType &Default)
std::pair< SourceLocation, bool > DeleteExprLoc
Delete-expressions to be analyzed at the end of translation unit.
unsigned LayoutCompatible
If true, Type should be compared with other expression's types for layout-compatibility.
ExprResult getExpression() const
Concrete class used by the front-end to report problems and issues.
void incrementMSManglingNumber() const
llvm::DenseSet< Module * > LookupModulesCache
Cache of additional modules that should be used for name lookup within the current template instantia...
GlobalMethodPool MethodPool
Method Pool - allows efficient lookup when typechecking messages to "id".
Represents a declaration of a type.
Substitution of the deduced template argument values resulted in an error.
A set of unresolved declarations.
SourceLocation PointOfInstantiation
The point of instantiation or synthesis within the source code.
Look up the name of an OpenMP user-defined reduction operation.
Template argument deduction exceeded the maximum template instantiation depth (which has already been...
void MarkDeducedTemplateParameters(const FunctionTemplateDecl *FunctionTemplate, llvm::SmallBitVector &Deduced)
CheckedConversionKind
The kind of conversion being performed.
EnterExpressionEvaluationContext(Sema &Actions, InitListTag, bool ShouldEnter=true)
std::pair< StringRef, QualType > CapturedParamNameType
std::function< ExprResult(Sema &, TypoExpr *, TypoCorrection)> TypoRecoveryCallback
virtual ~VerifyICEDiagnoser()
LazyDeclPtr StdBadAlloc
The C++ "std::bad_alloc" class, which is defined by the C++ standard library.
Scope - A scope is a transient data structure that is used while parsing the program.
The type of a data member.
PreferredTypeBuilder(QualType Type)
CaseStmt - Represent a case statement.
NonTagKind
Common ways to introduce type names without a tag for use in diagnostics.
TypoExpr - Internal placeholder for expressions where typo correction still needs to be performed and...
void popUndelayed(DelayedDiagnosticsState state)
Undo a previous pushUndelayed().
SourceLocation Loc
The location of the push attribute.
Represents a C++ nested-name-specifier or a global scope specifier.
CastExpr - Base class for type casts, including both implicit casts (ImplicitCastExpr) and explicit c...
Represents an Objective-C protocol declaration.
llvm::DenseMap< Decl *, SmallVector< PartialDiagnosticAt, 1 > > SuppressedDiagnosticsMap
For each declaration that involved template argument deduction, the set of diagnostics that were supp...
ArrayTypeTrait
Names for the array type traits.
const internal::VariadicDynCastAllOfMatcher< Stmt, CastExpr > castExpr
Matches any cast nodes of Clang's AST.
static bool checkAddressOfFunctionIsAvailable(Sema &S, const FunctionDecl *FD, bool Complain, bool InOverloadResolution, SourceLocation Loc)
Returns true if we can take the address of the function.
void incrementMSManglingNumber()
ObjCInterfaceDecl * NSNumberDecl
The declaration of the Objective-C NSNumber class.
const LangOptions & getLangOpts() const
QualType OriginalParamType
sema::AnalysisBasedWarnings AnalysisWarnings
Worker object for performing CFG-based warnings.
SmallVector< BoundNodes, 1 > match(MatcherT Matcher, const NodeT &Node, ASTContext &Context)
Returns the results of matching Matcher on Node.
MaybeODRUseExprSet MaybeODRUseExprs
Represents the body of a CapturedStmt, and serves as its DeclContext.
bool isUnevaluatedContext() const
Determines whether we are currently in a context that is not evaluated as per C++ [expr] p5...
Represents an ObjC class declaration.
SmallVector< LambdaExpr *, 2 > Lambdas
The lambdas that are present within this context, if it is indeed an unevaluated context.
Member name lookup, which finds the names of class/struct/union members.
IncompatiblePointerSign - The assignment is between two pointers types which point to integers which ...
NamespaceDecl * StdExperimentalNamespaceCache
The C++ "std::experimental" namespace, where the experimental parts of the standard library resides...
llvm::DenseMap< IdentifierInfo *, AsmLabelAttr * > ExtnameUndeclaredIdentifiers
ExtnameUndeclaredIdentifiers - Identifiers contained in #pragma redefine_extname before declared...
bool mightBeIntendedToBeTemplateName(ExprResult E, bool &Dependent)
Determine whether it's plausible that E was intended to be a template-name.
FullExprArg(Sema &actions)
ObjCMethodDecl * StringWithUTF8StringMethod
The declaration of the stringWithUTF8String: method.
const LangOptions & LangOpts
static NameClassification TypeTemplate(TemplateName Name)
RAII object used to change the argument pack substitution index within a Sema object.
uint8_t PointerKind
Which kind of pointer declarator we saw.
Contains information about the compound statement currently being parsed.
TemplateNameKindForDiagnostics
Describes the detailed kind of a template name. Used in diagnostics.
Represents the this expression in C++.
ParsingClassState PushParsingClass()
unsigned NumCleanupObjects
The number of active cleanup objects when we entered this expression evaluation context.
llvm::SmallVector< DeleteExprLoc, 4 > DeleteLocs
A helper class for building up ExtParameterInfos.
void AddInstanceMethodToGlobalPool(ObjCMethodDecl *Method, bool impl=false)
AddInstanceMethodToGlobalPool - All instance methods in a translation unit are added to a global pool...
TypeTrait
Names for traits that operate specifically on types.
We are matching the template parameter lists of two template template parameters as part of matching ...
DiagnosticsEngine & getDiagnostics() const
RAII class used to determine whether SFINAE has trapped any errors that occur during template argumen...
Defines the clang::TemplateNameKind enum.
ArgumentPackSubstitutionIndexRAII(Sema &Self, int NewSubstitutionIndex)
CXXSpecialMember
Kinds of C++ special members.
static Sema::TemplateDeductionResult DeduceTemplateArguments(Sema &S, TemplateParameterList *TemplateParams, const TemplateArgument &Param, TemplateArgument Arg, TemplateDeductionInfo &Info, SmallVectorImpl< DeducedTemplateArgument > &Deduced)
llvm::Optional< bool > getKnownValue() const
We are substituting explicit template arguments provided for a function template. ...
IdentifierInfo * IdentInfo
Sema - This implements semantic analysis and AST building for C.
Merge availability attributes for an implementation of a protocol requirement.
A little helper class used to produce diagnostics.
Represents a prototype with parameter type info, e.g.
SmallVector< CallExpr *, 8 > DelayedDecltypeCalls
If we are processing a decltype type, a set of call expressions for which we have deferred checking t...
TentativeDefinitionsType TentativeDefinitions
All the tentative definitions encountered in the TU.
ResultTypeCompatibilityKind
Describes the compatibility of a result type with its method.
llvm::DenseMap< Selector, GlobalMethods > GlobalMethodPool
static bool isEqual(const FunctionDeclAndLoc &LHS, const FunctionDeclAndLoc &RHS)
Retains information about a captured region.
llvm::SmallPtrSet< Selector, 8 > SelectorSet
A RAII object to enter scope of a compound statement.
Represents a ValueDecl that came out of a declarator.
CastKind
CastKind - The kind of operation required for a conversion.
The return type of classify().
friend const DeviceDiagBuilder & operator<<(const DeviceDiagBuilder &Diag, const T &Value)
Template argument deduction did not deduce a value for every template parameter.
static FunctionDeclAndLoc getTombstoneKey()
FunctionVoidPointer - The assignment is between a function pointer and void*, which the standard does...
llvm::FoldingSet< SpecialMemberOverloadResultEntry > SpecialMemberCache
A cache of special member function overload resolution results for C++ records.
ArraySizeModifier
Capture whether this is a normal array (e.g.
llvm::SmallPtrSet< Expr *, 2 > MaybeODRUseExprSet
Store a set of either DeclRefExprs or MemberExprs that contain a reference to a variable (constant) t...
const Decl * PragmaAttributeCurrentTargetDecl
The declaration that is currently receiving an attribute from the #pragma attribute stack...
TemplateParameterListEqualKind
Enumeration describing how template parameter lists are compared for equality.
DelayedDiagnosticsState ParsingDeclState
We are instantiating a template declaration.
Captures information about a #pragma weak directive.
std::function< void(const TypoCorrection &)> TypoDiagnosticGenerator
This represents '#pragma omp requires...' directive.
Scope * getCurScope() const
Retrieve the parser's current scope.
llvm::PointerIntPair< CXXRecordDecl *, 3, CXXSpecialMember > SpecialMemberDecl
SourceLocation IdentifierLoc
The location of the identifier.
Allows QualTypes to be sorted and hence used in maps and sets.
NameClassification(ParsedType Type)
SmallVector< PendingImplicitInstantiation, 1 > LateParsedInstantiations
Queue of implicit template instantiations that cannot be performed eagerly.
Retains information about a block that is currently being parsed.
void popWithoutEmitting(DelayedDiagnosticsState state)
Leave a delayed-diagnostic state that was previously pushed.
const char * getTypeName(ID Id)
getTypeName - Return the name of the type for Id.
llvm::DenseSet< FunctionDeclAndLoc > LocsWithCUDACallDiags
FunctionDecls and SourceLocations for which CheckCUDACall has emitted a (maybe deferred) "bad call" d...
Represents a shadow constructor declaration introduced into a class by a C++11 using-declaration that...
Represents a block literal declaration, which is like an unnamed FunctionDecl.
Represent the declaration of a variable (in which case it is an lvalue) a function (in which case it ...
This represents one expression.
LookupNameKind
Describes the kind of name lookup to perform.
SmallVector< Decl *, 2 > WeakTopLevelDecl
WeakTopLevelDecl - Translation-unit scoped declarations generated by #pragma weak during processing o...
DelayedDiagnosticsState push(sema::DelayedDiagnosticPool &pool)
Enter a new scope.
ExprValueKind
The categorization of expression values, currently following the C++11 scheme.
Slot(llvm::StringRef StackSlotLabel, ValueType Value, SourceLocation PragmaLocation, SourceLocation PragmaPushLocation)
Helper class that collects exception specifications for implicitly-declared special member functions...
When performing template argument deduction for a function template, there were too many call argumen...
llvm::SmallPtrSet< const Decl *, 4 > ParsingInitForAutoVars
ParsingInitForAutoVars - a set of declarations with auto types for which we are currently parsing the...
Look up the name of an OpenMP user-defined mapper.
Declaration of a template type parameter.
The message is an instance message.
This file defines the classes used to store parsed information about declaration-specifiers and decla...
bool isInvalid() const
Determines whether we have exceeded the maximum recursive template instantiations.
We are substituting template argument determined as part of template argument deduction for either a ...
ElaboratedTypeKeyword
The elaboration keyword that precedes a qualified type name or introduces an elaborated-type-specifie...
Represents a C++ destructor within a class.
LazyDeclPtr StdNamespace
The C++ "std" namespace, where the standard library resides.
const internal::VariadicAllOfMatcher< Decl > decl
Matches declarations.
SpecialMemberOverloadResult()
Code completion occurs within an Objective-C interface, protocol, or category.
bool InNonInstantiationSFINAEContext
Whether we are in a SFINAE context that is not associated with template instantiation.
IncompatibleVectors - The assignment is between two vector types that have the same size...
llvm::MapVector< IdentifierInfo *, WeakInfo > WeakUndeclaredIdentifiers
WeakUndeclaredIdentifiers - Identifiers contained in #pragma weak before declared.
OpenMPClauseKind
OpenMP clauses.
MaybeODRUseExprSet SavedMaybeODRUseExprs
QualType FindCompositePointerType(SourceLocation Loc, ExprResult &E1, ExprResult &E2, bool ConvertArgs=true)
PragmaStack< StringLiteral * > BSSSegStack
Initial building of a for-range statement.
When performing template argument deduction for a function template, there were too few call argument...
IdentifierResolver - Keeps track of shadowed decls on enclosing scopes.
An abstract interface that should be implemented by listeners that want to be notified when an AST en...
CXXTryStmt - A C++ try block, including all handlers.
IncompatiblePointerDiscardsQualifiers - The assignment discards qualifiers that we don't permit to be...
NonTypeTemplateParmDecl - Declares a non-type template parameter, e.g., "Size" in.
Ref_Related - The two types are reference-related, which means that their unqualified forms (T1 and T...
Represents a C++ template name within the type system.
QualType NSNumberPointer
Pointer to NSNumber type (NSNumber *).
ReferenceCompareResult
ReferenceCompareResult - Expresses the result of comparing two types (cv1 T1 and cv2 T2) to determine...
Defines the clang::TypeLoc interface and its subclasses.
Keeps track of expected type during expression parsing.
bool isVisible(const NamedDecl *D)
Determine whether a declaration is visible to name lookup.
Code completion occurs within a statement, which may also be an expression or a declaration.
std::unique_ptr< MangleNumberingContext > MangleNumbering
The context information used to mangle lambda expressions and block literals within this context...
TemplateNameKind
Specifies the kind of template name that an identifier refers to.
SmallVector< LateInstantiatedAttribute, 16 > LateInstantiatedAttrVec
SmallVector< VTableUse, 16 > VTableUses
The list of vtables that are required but have not yet been materialized.
An RAII helper that pops function a function scope on exit.
StorageClass
Storage classes.
CleanupInfo ParentCleanup
Whether the enclosing context needed a cleanup.
static bool TooManyArguments(size_t NumParams, size_t NumArgs, bool PartialOverloading=false)
To be used for checking whether the arguments being passed to function exceeds the number of paramete...
SmallVector< sema::FunctionScopeInfo *, 4 > FunctionScopes
Stack containing information about each of the nested function, block, and method scopes that are cur...
InClassInitStyle
In-class initialization styles for non-static data members.
NameClassification(ExprResult Expr)
An expression that sends a message to the given Objective-C object or class.
A mapping from file IDs to a record of whether we've seen nullability information in that file...
Data structure that captures multiple levels of template argument lists for use in template instantia...
llvm::SmallPtrSet< const Expr *, 8 > PossibleDerefs
Preprocessor & getPreprocessor() const
IdentifierInfo * Identifier
The identifier preceding the '::'.
bool RequireCompleteType(SourceLocation Loc, QualType T, unsigned DiagID, const Ts &...Args)
TemplateTemplateParmDecl - Declares a template template parameter, e.g., "T" in.
ObjCMethodDecl * ArrayWithObjectsMethod
The declaration of the arrayWithObjects:count: method.
const FunctionProtoType::ExtParameterInfo * getPointerOrNull(unsigned numParams)
Return a pointer (suitable for setting in an ExtProtoInfo) to the ExtParameterInfo array we've built ...
void addContextNote(SourceLocation UseLoc)
SmallVector< attr::SubjectMatchRule, 4 > MatchRules
After substituting deduced template arguments, a dependent parameter type did not match the correspon...
Represents a C++ conversion function within a class.
Code completion occurs within the list of instance variables in an Objective-C interface, protocol, category, or implementation.
OpenMPProcBindClauseKind
OpenMP attributes for 'proc_bind' clause.
ObjCTypeParamVariance
Describes the variance of a given generic parameter.
PragmaClangSectionKind
pragma clang section kind
ObjCKeywordKind
Provides a namespace for Objective-C keywords which start with an '@'.
SmallVector< CXXMethodDecl *, 4 > DelayedDllExportMemberFunctions
CallingConv
CallingConv - Specifies the calling convention that a function uses.
SourceLocation PointerLoc
The first pointer declarator (of any pointer kind) in the file that does not have a corresponding nul...
unsigned NumSFINAEErrors
The number of SFINAE diagnostics that have been trapped.
This is a legitimate overload: the existing declarations are functions or function templates with dif...
An abstract interface that should be implemented by external AST sources that also provide informatio...
~LocalEagerInstantiationScope()
ExprResult CorrectDelayedTyposInExpr(ExprResult ER, llvm::function_ref< ExprResult(Expr *)> Filter)
CanonicalDeclPtr< FunctionDecl > FD
static StringRef getPrintable(StringRef S)
DelegatingCtorDeclsType DelegatingCtorDecls
All the delegating constructors seen so far in the file, used for cycle detection at the end of the T...
AvailabilityPriority
Describes the kind of priority given to an availability attribute.
std::pair< const IdentifierInfo *, uint64_t > TypeTagMagicValue
A pair of ArgumentKind identifier and magic value.
noexcept(expression), evals to 'false'
LazyVector< TypedefNameDecl *, ExternalSemaSource, &ExternalSemaSource::ReadExtVectorDecls, 2, 2 > ExtVectorDeclsType
bool hasVisibleDefinition(const NamedDecl *D)
StringLiteral * CurInitSeg
Last section used with #pragma init_seg.
CanThrowResult
Possible results from evaluation of a noexcept expression.
bool isComputedNoexcept(ExceptionSpecificationType ESpecType)
static unsigned getPrintable(unsigned I)
static bool DiagnoseUnexpandedParameterPacks(Sema &S, TemplateTemplateParmDecl *TTP)
Check for unexpanded parameter packs within the template parameters of a template template parameter...
Represents a C++ Modules TS module export declaration.
NameClassificationKind
Describes the result of the name lookup and resolution performed by ClassifyName().
void pushCodeSynthesisContext(CodeSynthesisContext Ctx)
We are declaring an implicit special member function.
CXXSpecialMember SpecialMember
The special member being declared or defined.
Tag name lookup, which finds the names of enums, classes, structs, and unions.
RecordDecl * CXXTypeInfoDecl
The C++ "type_info" declaration, which is defined in <typeinfo>.
A reference to an overloaded function set, either an UnresolvedLookupExpr or an UnresolvedMemberExpr...
ImplicitConversionSequence - Represents an implicit conversion sequence, which may be a standard conv...
ActionResult - This structure is used while parsing/acting on expressions, stmts, etc...
ExceptionSpecificationType Type
The kind of exception specification this is.
PseudoObjectExpr - An expression which accesses a pseudo-object l-value.
SmallVector< CXXBaseSpecifier *, 4 > CXXCastPath
A simple array of base specifiers.
Represents the parsed form of a C++ template argument.
A stack object to be created when performing template instantiation.
TypeTagData(QualType Type, bool LayoutCompatible, bool MustBeNull)
ASTContext & getASTContext() const
LazyDeclPtr StdAlignValT
The C++ "std::align_val_t" enum class, which is defined by the C++ standard library.
llvm::SmallDenseMap< const ValueDecl *, const Expr *, 4 > VarsWithInheritedDSAType
DeduceAutoResult
Result type of DeduceAutoType.
Encodes a location in the source.
We are computing the exception specification for a defaulted special member function.
OpenMPDependClauseKind
OpenMP attributes for 'depend' clause.
Defines enumerations for expression traits intrinsics.
SourceLocation CurrentPragmaLocation
Diagnostic builder for CUDA/OpenMP devices errors which may or may not be deferred.
static unsigned getHashValue(const FunctionDeclAndLoc &FDL)
static const char * getPrintable(const char *S)
sema::TemplateDeductionInfo * DeductionInfo
The template deduction info object associated with the substitution or checking of explicit or deduce...
static SourceRange getPrintable(const Expr *E)
Template argument deduction failed due to inconsistent cv-qualifiers on a template parameter type tha...
Represents the declaration of a struct/union/class/enum.
OpenMPDirectiveKind
OpenMP directives.
Represents the declaration of a label.
IncompatiblePointer - The assignment is between two pointers types that are not compatible, but we accept them as an extension.
ParsedAttr - Represents a syntactic attribute.
Template argument deduction did not deduce a value for every expansion of an expanded template parame...
SynthesisKind
The kind of template instantiation we are performing.
DelayedDiagnosticsState ProcessingContextState
Decl * ManglingContextDecl
The declaration that provides context for lambda expressions and block literals if the normal declara...
ExprObjectKind
A further classification of the kind of object referenced by an l-value or x-value.
ClassTemplateDecl * StdInitializerList
The C++ "std::initializer_list" template, which is defined in <initializer_list>. ...
Represents a static or instance method of a struct/union/class.
ParsedType getType() const
SourceLocation CCLoc
The location of the '::'.
bool shouldDelayDiagnostics()
Determines whether diagnostics should be delayed.
Represents a C++ nested name specifier, such as "\::std::vector<int>::".
Only look for allocation functions in the scope of the allocated class.
TemplateNameKind getTemplateNameKind() const
llvm::SmallPtrSet< const CXXRecordDecl *, 8 > RecordDeclSetTy
SFINAETrap(Sema &SemaRef, bool AccessCheckingSFINAE=false)
We are checking the validity of a default template argument that has been used when naming a template...
The declaration was invalid; do nothing.
static DeclarationName getPrintable(DeclarationName N)
ObjCCategoryDecl - Represents a category declaration.
This is a basic class for representing single OpenMP clause.
The message is sent to 'super'.
static bool hasVisibleDefaultArgument(Sema &S, const ParmDecl *D, llvm::SmallVectorImpl< Module *> *Modules)
static bool isCast(CheckedConversionKind CCK)
bool CollectStats
Flag indicating whether or not to collect detailed statistics.
static void CheckBoolLikeConversion(Sema &S, Expr *E, SourceLocation CC)
Check conversion of given expression to boolean.
TokenKind
Provides a simple uniform namespace for tokens from all C languages.
SourceLocation PragmaLocation
bool RequireNonAbstractType(SourceLocation Loc, QualType T, unsigned DiagID, const Ts &...Args)
Describes the kind of initialization being performed, along with location information for tokens rela...
PragmaStack< MSVtorDispAttr::Mode > VtorDispStack
Whether to insert vtordisps prior to virtual bases in the Microsoft C++ ABI.
void EmitCurrentDiagnostic(unsigned DiagID)
Cause the active diagnostic on the DiagosticsEngine to be emitted.
SourceLocation OptimizeOffPragmaLocation
This represents the last location of a "#pragma clang optimize off" directive if such a directive has...
Represents a C++11 virt-specifier-seq.
CodeCompleteConsumer * CodeCompleter
Code-completion consumer.
unsigned NumTypos
The number of typos encountered during this expression evaluation context (i.e.
Represents one property declaration in an Objective-C interface.
void SetLateTemplateParser(LateTemplateParserCB *LTP, LateTemplateParserCleanupCB *LTPCleanup, void *P)
OpaquePtr< TemplateName > TemplateTy
llvm::DenseSet< std::pair< Decl *, unsigned > > InstantiatingSpecializations
Specializations whose definitions are currently being instantiated.
llvm::SmallSetVector< CXXRecordDecl *, 16 > AssociatedClassSet
const IdentifierInfo * Namespace
The namespace of this push group.
std::unique_ptr< CXXFieldCollector > FieldCollector
FieldCollector - Collects CXXFieldDecls during parsing of C++ classes.
static NameClassification FunctionTemplate(TemplateName Name)
PragmaMSPointersToMembersKind
The name is a dependent name, so the results will differ from one instantiation to the next...
bool IsBuildingRecoveryCallExpr
Flag indicating if Sema is building a recovery call expression.
DeductionFailureInfo MakeDeductionFailureInfo(ASTContext &Context, Sema::TemplateDeductionResult TDK, sema::TemplateDeductionInfo &Info)
Convert from Sema's representation of template deduction information to the form used in overload-can...
OverloadCandidateSet - A set of overload candidates, used in C++ overload resolution (C++ 13...
Constant expression in a noptr-new-declarator.
LocalEagerInstantiationScope(Sema &S)
ParameterABI
Kinds of parameter ABI.
llvm::DenseMap< ParmVarDecl *, llvm::TinyPtrVector< ParmVarDecl * > > UnparsedDefaultArgInstantiationsMap
TentativeAnalysisScope(Sema &SemaRef)
ASTConsumer & getASTConsumer() const
CUDAFunctionTarget CurrentCUDATarget()
Gets the CUDA target for the current context.
SourceLocation getExprLoc() const LLVM_READONLY
getExprLoc - Return the preferred location for the arrow when diagnosing a problem with a generic exp...
SynthesizedFunctionScope(Sema &S, DeclContext *DC)
void setLastDiagnosticIgnored(bool Ignored=true)
Pretend that the last diagnostic issued was ignored, so any subsequent notes will be suppressed...
QualType NSValuePointer
Pointer to NSValue type (NSValue *).
Defines various enumerations that describe declaration and type specifiers.
A POD class for pairing a NamedDecl* with an access specifier.
The expression in a static assertion.
Expression in a case label.
A class for storing results from argument-dependent lookup.
OpaquePtr< QualType > TypeTy
static std::enable_if< IsPartialSpecialization< T >::value, Sema::TemplateDeductionResult >::type FinishTemplateArgumentDeduction(Sema &S, T *Partial, bool IsPartialOrdering, const TemplateArgumentList &TemplateArgs, SmallVectorImpl< DeducedTemplateArgument > &Deduced, TemplateDeductionInfo &Info)
Complete template argument deduction for a partial specialization.
Base class for declarations which introduce a typedef-name.
Abstract interface for a consumer of code-completion information.
An opaque identifier used by SourceManager which refers to a source file (MemoryBuffer) along with it...
Represents a reference to a function parameter pack or init-capture pack that has been substituted bu...
Represents a template argument.
ParserCompletionContext
Describes the context in which code completion occurs.
TagTypeKind
The kind of a tag type.
OpenMPScheduleClauseModifier
OpenMP modifiers for 'schedule' clause.
Abstract base class used to perform a contextual implicit conversion from an expression to any type p...
Dataflow Directional Tag Classes.
llvm::DenseMap< IdentifierInfo *, SrcLocSet > IdentifierSourceLocations
LateTemplateParserCleanupCB * LateTemplateParserCleanup
SmallVector< CXXBindTemporaryExpr *, 8 > DelayedDecltypeBinds
If we are processing a decltype type, a set of temporary binding expressions for which we have deferr...
ConstexprSpecKind
Define the kind of constexpr specifier.
SourceLocation ImplicitMSInheritanceAttrLoc
Source location for newly created implicit MSInheritanceAttrs.
int ArgumentPackSubstitutionIndex
The current index into pack expansion arguments that will be used for substitution of parameter packs...
Don't merge availability attributes at all.
unsigned NumTemplateArgs
The number of template arguments in TemplateArgs.
DeclContext - This is used only as base class of specific decl types that can act as declaration cont...
const DeclContext * getCurObjCLexicalContext() const
Represents a delete expression for memory deallocation and destructor calls, e.g. ...
static ImplicitConversionSequence TryImplicitConversion(Sema &S, Expr *From, QualType ToType, bool SuppressUserConversions, bool AllowExplicit, bool InOverloadResolution, bool CStyle, bool AllowObjCWritebackConversion, bool AllowObjCConversionOnExplicit)
TryImplicitConversion - Attempt to perform an implicit conversion from the given expression (Expr) to...
The base class of all kinds of template declarations (e.g., class, function, etc.).
OverloadedOperatorKind
Enumeration specifying the different kinds of C++ overloaded operators.
llvm::SmallVector< std::pair< SourceLocation, const BlockDecl * >, 1 > ImplicitlyRetainedSelfLocs
List of SourceLocations where 'self' is implicitly retained inside a block.
We are instantiating a default argument for a function.
OpenMPAtomicDefaultMemOrderClauseKind
OpenMP attributes for 'atomic_default_mem_order' clause.
bool RequireLiteralType(SourceLocation Loc, QualType T, unsigned DiagID, const Ts &...Args)
Reads an AST files chain containing the contents of a translation unit.
Represents a field injected from an anonymous union/struct into the parent scope. ...
bool IsAllowedCUDACall(const FunctionDecl *Caller, const FunctionDecl *Callee)
Determines whether Caller may invoke Callee, based on their CUDA host/device attributes.
static NameClassification VarTemplate(TemplateName Name)
SourceLocation PointerEndLoc
The end location for the first pointer declarator in the file.
Custom deleter to allow FunctionScopeInfos to be kept alive for a short time after they've been poppe...
LateInstantiatedAttribute(const Attr *A, LocalInstantiationScope *S, Decl *D)
A decomposition declaration.
ClassTemplateDecl * StdCoroutineTraitsCache
The C++ "std::coroutine_traits" template, which is defined in <coroutine_traits>
llvm::SmallSet< SourceLocation, 2 > SrcLocSet
A non-depnedent component of the parameter did not match the corresponding component of the argument...
bool GlobalNewDeleteDeclared
A flag to remember whether the implicit forms of operator new and delete have been declared...
The name of a declaration.
Represents the declaration of an Objective-C type parameter.
unsigned size() const
The number of exceptions in the exception specification.
SourceRange InstantiationRange
The source range that covers the construct that cause the instantiation, e.g., the template-id that c...
llvm::SmallPtrSet< SpecialMemberDecl, 4 > SpecialMembersBeingDeclared
The C++ special members which we are currently in the process of declaring.
PragmaClangSection PragmaClangRodataSection
std::pair< CXXRecordDecl *, SourceLocation > VTableUse
The list of classes whose vtables have been used within this translation unit, and the source locatio...
ExpressionEvaluationContext Context
The expression evaluation context.
bool isConstantEvaluated() const
AllocationFunctionScope
The scope in which to find allocation functions.
IncompatibleBlockPointer - The assignment is between two block pointers types that are not compatible...
The lookup found an overload set of literal operator templates, which expect the characters of the sp...
Emit the diagnostic immediately (i.e., behave like Sema::Diag()).
TemplateSpecializationKind
Describes the kind of template specialization that a particular template specialization declaration r...
IdentifierResolver IdResolver
Optional< sema::TemplateDeductionInfo * > isSFINAEContext() const
Determines whether we are currently in a context where template argument substitution failures are no...
DeclarationNameInfo - A collector data type for bundling together a DeclarationName and the correspnd...
SpecialMemberOverloadResult(CXXMethodDecl *MD)
Abstract interface for a module loader.
The name refers to a template whose specialization produces a type.
bool isHidden() const
Determine whether this declaration might be hidden from name lookup.
llvm::MapVector< FieldDecl *, DeleteLocs > DeleteExprs
A dependently-generated diagnostic.
Represents a pointer to an Objective C object.
AvailabilityMergeKind
Describes the kind of merge to perform for availability attributes (including "deprecated", "unavailable", and "availability").
PragmaClangSection PragmaClangDataSection
void LateTemplateParserCB(void *P, LateParsedTemplate &LPT)
Callback to the parser to parse templated functions when needed.
SourceRange getSourceRange() const LLVM_READONLY
Get the full source range.
Encapsulates the data about a macro definition (e.g.
ObjCMethodDecl * LookupInstanceMethodInGlobalPool(Selector Sel, SourceRange R, bool receiverIdOrClass=false)
LookupInstanceMethodInGlobalPool - Returns the method and warns if there are multiple signatures...
llvm::DenseSet< QualType > InstantiatedNonDependentTypes
Non-dependent types used in templates that have already been instantiated by some template instantiat...
ObjCImplementationDecl - Represents a class definition - this is where method definitions are specifi...
A helper class that allows the use of isa/cast/dyncast to detect TagType objects of structs/unions/cl...
DeclarationName VAListTagName
VAListTagName - The declaration name corresponding to __va_list_tag.
EnterExpressionEvaluationContext(Sema &Actions, Sema::ExpressionEvaluationContext NewContext, Decl *LambdaContextDecl=nullptr, Sema::ExpressionEvaluationContextRecord::ExpressionKind ExprContext=Sema::ExpressionEvaluationContextRecord::EK_Other, bool ShouldEnter=true)
Location wrapper for a TemplateArgument.
SmallVector< PragmaAttributeGroup, 2 > PragmaAttributeStack
The template argument was specified in the code or was instantiated with some deduced template argume...
ArraySubscriptExpr - [C99 6.5.2.1] Array Subscripting.
CheckTemplateArgumentKind
Specifies the context in which a particular template argument is being checked.
LocalInstantiationScope * Scope
IntToBlockPointer - The assignment converts an int to a block pointer.
Represents a C++ base or member initializer.
ExprResult ActOnCXXBoolLiteral(SourceLocation OpLoc, tok::TokenKind Kind)
ActOnCXXBoolLiteral - Parse {true,false} literals.
const QualType * data() const
The set of exceptions in the exception specification.
DeclContext * getCurLexicalContext() const
UnparsedDefaultArgInstantiationsMap UnparsedDefaultArgInstantiations
A mapping from parameters with unparsed default arguments to the set of instantiations of each parame...
OpenMPScheduleClauseKind
OpenMP attributes for 'schedule' clause.
SmallVector< ExpressionEvaluationContextRecord, 8 > ExprEvalContexts
A stack of expression evaluation contexts.
llvm::StringRef getCurrentOpenCLExtension() const
bool isInOpenMPDeclareTargetContext() const
Return true inside OpenMP declare target region.
static NameClassification Error()
llvm::SmallSetVector< NamedDecl *, 16 > NamedDeclSetType
ExceptionSpecificationType
The various types of exception specifications that exist in C++11.
Holds information about the various types of exception specification.
OpenMPDefaultClauseKind
OpenMP attributes for 'default' clause.
ArrayRef< TemplateArgument > template_arguments() const
Deduction failed; that's all we know.
static NameClassification Unknown()
bool isUnevaluated() const
ObjCInterfaceDecl * NSArrayDecl
The declaration of the Objective-C NSArray class.
~ArgumentPackSubstitutionIndexRAII()
FPContractStateRAII(Sema &S)
SmallVector< BlockDecl *, 8 > ExprCleanupObjects
ExprCleanupObjects - This is the stack of objects requiring cleanup that are created by the current f...
APValue - This class implements a discriminated union of [uninitialized] [APSInt] [APFloat]...
static SourceRange getPrintable(SourceLocation L)
Represents a base class of a C++ class.
static bool IsKnownEmitted(Sema &S, FunctionDecl *FD)
bool SavedInNonInstantiationSFINAEContext
Was the enclosing context a non-instantiation SFINAE context?
void ActOnStartOfCompoundStmt(bool IsStmtExpr)
PragmaStack< StringLiteral * > ConstSegStack
Condition in a constexpr if statement.
ArrayRef< QualType > Exceptions
Explicitly-specified list of exception types.
ProcessingContextState ParsingClassState
PragmaClangSection PragmaClangTextSection
ParsedType ObjectType
The type of the object, if we're parsing nested-name-specifier in a member access expression...
void * SkippedDefinitionContext
Describes whether we've seen any nullability information for the given file.
QualType QIDNSCopying
id<NSCopying> type.
RedeclarationKind forRedeclarationInCurContext()
bool isAlreadyInstantiating() const
Determine whether we are already instantiating this specialization in some surrounding active instant...
A template argument list.
Merge availability attributes for a redeclaration, which requires an exact match. ...
SemaDiagnosticBuilder diagnoseNoMatch(Sema &S, SourceLocation Loc, QualType T) override
Emits a diagnostic complaining that the expression does not have integral or enumeration type...
bool isConstantEvaluatedOverride
Used to change context to isConstantEvaluated without pushing a heavy ExpressionEvaluationContextReco...
Expr * NoexceptExpr
Noexcept expression, if this is a computed noexcept specification.
llvm::DenseMap< CanonicalDeclPtr< FunctionDecl >, std::vector< PartialDiagnosticAt > > DeviceDeferredDiags
Diagnostics that are emitted only if we discover that the given function must be codegen'ed.
llvm::DenseMap< NamedDecl *, NamedDecl * > VisibleNamespaceCache
Map from the most recent declaration of a namespace to the most recent visible declaration of that na...
An attributed type is a type to which a type attribute has been applied.
CCEKind
Contexts in which a converted constant expression is required.
static void BuildBasePathArray(const CXXBasePath &Path, CXXCastPath &BasePathArray)
OpaquePtr< DeclGroupRef > DeclGroupPtrTy
MemberExpr - [C99 6.5.2.3] Structure and Union Members.
ExprResult CorrectDelayedTyposInExpr(Expr *E, llvm::function_ref< ExprResult(Expr *)> Filter)
Data structure used to record current or nested expression evaluation contexts.
void * VisContext
VisContext - Manages the stack for #pragma GCC visibility.
Describes the sequence of initializations required to initialize a given object or reference with a s...
The lookup found no match but no diagnostic was issued.
Captures information about "declaration specifiers".
Code completion occurs at the beginning of the initialization statement (or expression) in a for loop...
void LateTemplateParserCleanupCB(void *P)
ActionResult< Expr * > ExprResult
Only look for allocation functions in the global scope.
SourceLocation PragmaPushLocation
sema::DelayedDiagnosticPool * getCurrentPool() const
Returns the current delayed-diagnostics pool.
Represents a C++ struct/union/class.
Compatible - the types are compatible according to the standard.
Decl * D
The template function declaration to be late parsed.
sema::FunctionScopeInfo * getCurFunction() const
Look up a friend of a local class.
void PopParsingClass(ParsingClassState state)
A diagnostic message which has been conditionally emitted pending the complete parsing of the current...
OpenMPMapClauseKind
OpenMP mapping kind for 'map' clause.
ObjCIvarDecl - Represents an ObjC instance variable.
void popCodeSynthesisContext()
PoppedFunctionScopePtr PopFunctionScopeInfo(const sema::AnalysisBasedWarnings::Policy *WP=nullptr, const Decl *D=nullptr, QualType BlockType=QualType())
Pop a function (or block or lambda or captured region) scope from the stack.
LangOptions::PragmaMSPointersToMembersKind MSPointerToMemberRepresentationMethod
Controls member pointer representation format under the MS ABI.
std::unique_ptr< sema::FunctionScopeInfo, PoppedFunctionScopeDeleter > PoppedFunctionScopePtr
llvm::DenseMap< int, SourceRange > ParsedSubjectMatchRuleSet
Selector RespondsToSelectorSel
will hold 'respondsToSelector:'
TPOC
The context in which partial ordering of function templates occurs.
DeclContext * CurContext
CurContext - This is the current declaration context of parsing.
TranslationUnitKind
Describes the kind of translation unit being processed.
Declaration of a class template.
Stores a list of Objective-C type parameters for a parameterized class or a category/extension thereo...
Writes an AST file containing the contents of a translation unit.
SourceManager & getSourceManager() const
After substituting deduced template arguments, an element of a dependent parameter type did not match...
This represents '#pragma omp declare mapper ...' directive.
SourceRange getSourceRange() const LLVM_READONLY
SourceLocation tokens are not useful in isolation - they are low level value objects created/interpre...
TranslationUnitKind TUKind
The kind of translation unit we are processing.
ExpressionEvaluationContext
Describes how the expressions currently being parsed are evaluated at run-time, if at all...
StringLiteral - This represents a string literal expression, e.g.
CallExpr - Represents a function call (C99 6.5.2.2, C++ [expr.call]).
Represents a complete lambda introducer.
We are substituting prior template arguments into a new template parameter.
a linked list of methods with the same selector name but different signatures.
std::pair< ObjCMethodList, ObjCMethodList > GlobalMethods
The translation unit is a complete translation unit.
ExprResult CorrectDelayedTyposInExpr(ExprResult ER, VarDecl *InitDecl=nullptr, llvm::function_ref< ExprResult(Expr *)> Filter=[](Expr *E) -> ExprResult { return E;})
ExceptionSpecificationType getExceptionSpecType() const
Get the computed exception specification type.
NonOdrUseReason
The reason why a DeclRefExpr does not constitute an odr-use.
Designation - Represent a full designation, which is a sequence of designators.
FullExprArg MakeFullExpr(Expr *Arg, SourceLocation CC)
The name refers to a variable template whose specialization produces a variable.
static CXXRecordDecl * getCurrentInstantiationOf(QualType T, DeclContext *CurContext)
Find the current instantiation that associated with the given type.
A reference to a declared variable, function, enum, etc.
static SourceRange getPrintable(SourceRange R)
Code completion occurs within the condition of an if, while, switch, or for statement.
virtual ~ContextualImplicitConverter()
llvm::DenseMap< CXXRecordDecl *, bool > VTablesUsed
The set of classes whose vtables have been used within this translation unit, and a bit that will be ...
SourceManager & SourceMgr
CapturedRegionKind
The different kinds of captured statement.
BasePaths - Represents the set of paths from a derived class to one of its (direct or indirect) bases...
Contains a late templated function.
llvm::DenseMap< CanonicalDeclPtr< FunctionDecl >, FunctionDeclAndLoc > DeviceKnownEmittedFns
An inverse call graph, mapping known-emitted functions to one of their known-emitted callers (plus th...
ParamInfo - An array of paraminfo objects is allocated whenever a function declarator is parsed...
A push'd group of PragmaAttributeEntries.
static int getPrintable(int I)
class clang::Sema::DelayedDiagnostics DelayedDiagnostics
This structure contains most locations needed for by an OMPVarListClause.
PragmaStack< unsigned > PackStack
A collection of diagnostics which were delayed.
PoppedFunctionScopeDeleter(Sema *Self)
An instance of this class represents the declaration of a property member.
A wrapper class around a pointer that always points to its canonical declaration. ...
A trivial tuple used to represent a source range.
IncompatibleObjCQualifiedId - The assignment is between a qualified id type and something else (that ...
This represents a decl that may have a name.
QualType NSStringPointer
Pointer to NSString type (NSString *).
FullExprArg MakeFullDiscardedValueExpr(Expr *Arg)
Represents C++ using-directive.
The template argument was deduced via template argument deduction.
SourceLocation CurrentPragmaLocation
Look up of an operator name (e.g., operator+) for use with operator overloading.
Describes an entity that is being initialized.
static QualType getPrintable(QualType T)
ComparisonCategoryType
An enumeration representing the different comparison categories types.
The global module fragment, between 'module;' and a module-declaration.
The type of an arbitrary declaration.
ParsedAttributes - A collection of parsed attributes.
SourceLocation ColonLoc
Location of ':'.
SmallVector< Slot, 2 > Stack
brief A function argument from which we performed template argument
This represents '#pragma omp threadprivate ...' directive.
ObjCCategoryImplDecl - An object of this class encapsulates a category @implementation declaration...
The explicitly-specified template arguments were not valid template arguments for the given template...
The lookup resulted in an error.
This class handles loading and caching of source files into memory.
IncompatibleNestedPointerQualifiers - The assignment is between two nested pointer types...
The symbol does not exist.
Declaration of a template function.
llvm::DenseMap< const EnumDecl *, llvm::APInt > FlagBitsCache
A cache of the flags available in enumerations with the flag_bits attribute.
Code completion occurs in a parenthesized expression, which might also be a type cast.
void PushFunctionScope()
Enter a new function scope.
NullPointerConstantKind
Enumeration used to describe the kind of Null pointer constant returned from isNullPointerConstant()...
NamedDeclSetType UnusedPrivateFields
Set containing all declared private fields that are not used.
Attr - This represents one attribute.
llvm::DenseMap< CanonicalDeclPtr< FunctionDecl >, llvm::MapVector< CanonicalDeclPtr< FunctionDecl >, SourceLocation > > DeviceCallGraph
A partial call graph maintained during CUDA/OpenMP device code compilation to support deferred diagno...
This an attribute introduced by #pragma clang attribute.
Represents a shadow declaration introduced into a scope by a (resolved) using declaration.
ObjCMethodDecl * DictionaryWithObjectsMethod
The declaration of the dictionaryWithObjects:forKeys:count: method.
Helper class that creates diagnostics with optional template instantiation stacks.
Engages in a tight little dance with the lexer to efficiently preprocess tokens.
~TentativeAnalysisScope()
The triviality of a method unaffected by "trivial_abi".
bool hasErrorOccurred() const
Determine whether any SFINAE errors have been trapped.
llvm::DenseMap< ParmVarDecl *, SourceLocation > UnparsedDefaultArgLocs
StandardConversionSequence - represents a standard conversion sequence (C++ 13.3.3.1.1).
SourceLocation CurInitSegLoc