15 #ifndef LLVM_CLANG_SEMA_SEMA_H
16 #define LLVM_CLANG_SEMA_SEMA_H
45 #include "llvm/ADT/ArrayRef.h"
46 #include "llvm/ADT/Optional.h"
47 #include "llvm/ADT/SetVector.h"
48 #include "llvm/ADT/SmallPtrSet.h"
49 #include "llvm/ADT/SmallVector.h"
50 #include "llvm/ADT/TinyPtrVector.h"
58 template <
typename ValueT>
struct DenseMapInfo;
59 template <
typename ValueT,
typename ValueInfoT>
class DenseSet;
61 class InlineAsmIdentifierInfo;
68 class ASTMutationListener;
77 class CXXBindTemporaryExpr;
79 class CXXConstructorDecl;
80 class CXXConversionDecl;
82 class CXXDestructorDecl;
83 class CXXFieldCollector;
84 class CXXMemberCallExpr;
90 class ClassTemplateDecl;
91 class ClassTemplatePartialSpecializationDecl;
92 class ClassTemplateSpecializationDecl;
93 class VarTemplatePartialSpecializationDecl;
94 class CodeCompleteConsumer;
95 class CodeCompletionAllocator;
96 class CodeCompletionTUInfo;
97 class CodeCompletionResult;
102 class DeclaratorDecl;
103 class DeducedTemplateArgument;
104 class DependentDiagnostic;
105 class DesignatedInitExpr;
108 class EnumConstantDecl;
111 class ExternalSemaSource;
115 class FunctionProtoType;
116 class FunctionTemplateDecl;
117 class ImplicitConversionSequence;
119 class InitializationKind;
120 class InitializationSequence;
121 class InitializedEntity;
122 class IntegerLiteral;
126 class LocalInstantiationScope;
131 class MultiLevelTemplateArgumentList;
133 class ObjCCategoryDecl;
134 class ObjCCategoryImplDecl;
135 class ObjCCompatibleAliasDecl;
136 class ObjCContainerDecl;
138 class ObjCImplementationDecl;
139 class ObjCInterfaceDecl;
141 template <
class T>
class ObjCList;
142 class ObjCMessageExpr;
143 class ObjCMethodDecl;
144 class ObjCPropertyDecl;
145 class ObjCProtocolDecl;
146 class OMPThreadPrivateDecl;
148 class OverloadCandidateSet;
153 class PseudoDestructorTypeStorage;
154 class PseudoObjectExpr;
156 class StandardConversionSequence;
160 class TemplateArgument;
161 class TemplateArgumentList;
162 class TemplateArgumentLoc;
164 class TemplateParameterList;
165 class TemplatePartialOrderingContext;
166 class TemplateTemplateParmDecl;
170 class TypedefNameDecl;
172 class TypoCorrectionConsumer;
174 class UnresolvedLookupExpr;
175 class UnresolvedMemberExpr;
176 class UnresolvedSetImpl;
177 class UnresolvedSetIterator;
179 class UsingShadowDecl;
182 class VarTemplateSpecializationDecl;
183 class VisibilityAttr;
184 class VisibleDeclConsumer;
185 class IndirectFieldDecl;
186 struct DeductionFailureInfo;
187 class TemplateSpecCandidateSet;
190 class AccessedEntity;
191 class BlockScopeInfo;
192 class CapturedRegionScopeInfo;
193 class CapturingScopeInfo;
194 class CompoundScopeInfo;
195 class DelayedDiagnostic;
196 class DelayedDiagnosticPool;
197 class FunctionScopeInfo;
198 class LambdaScopeInfo;
199 class PossiblyUnreachableDiag;
200 class TemplateDeductionInfo;
203 namespace threadSafety {
210 typedef std::pair<llvm::PointerUnion<const TemplateTypeParmType*, NamedDecl*>,
231 llvm::DenseMap<FileID, FileNullability> Map;
242 if (file ==
Cache.File)
243 return Cache.Nullability;
246 if (!
Cache.File.isInvalid()) {
252 Cache.Nullability = Map[file];
253 return Cache.Nullability;
260 void operator=(
const Sema &) =
delete;
266 bool isMultiplexExternalSource;
268 static bool mightHaveNonExternalLinkage(
const DeclaratorDecl *FD);
272 bool shouldLinkPossiblyHiddenDecl(
const NamedDecl *Old,
361 template<
typename ValueType>
370 : StackSlotLabel(StackSlotLabel), Value(Value),
371 PragmaLocation(PragmaLocation) {}
375 llvm::StringRef StackSlotLabel,
519 typedef llvm::MapVector<const FunctionDecl *, LateParsedTemplate *>
572 state.SavedPool = CurPool;
581 CurPool = state.SavedPool;
588 state.SavedPool = CurPool;
595 assert(CurPool ==
nullptr);
596 CurPool = state.SavedPool;
614 assert(ContextToPush &&
"pushing null context");
621 if (!SavedContext)
return;
625 SavedContext =
nullptr;
641 : S(S), SavedContext(S, DC)
845 : Context(Context), ParentNeedsCleanups(ParentNeedsCleanups),
846 IsDecltype(IsDecltype), NumCleanupObjects(NumCleanupObjects),
871 Decl *&ManglingContextDecl);
888 llvm::PointerIntPair<CXXMethodDecl*, 2> Pair;
892 : FastFoldingSetNode(ID)
920 typedef llvm::DenseMap<ParmVarDecl *, llvm::TinyPtrVector<ParmVarDecl *>>
946 const llvm::MapVector<FieldDecl *, DeleteLocs> &
998 : S(S), OldFPContractState(S.
FPFeatures.fp_contract) {}
1004 bool OldFPContractState : 1;
1078 template<
typename T>
1134 const Decl *D =
nullptr,
1153 template <
typename ExprT>
1196 Expr *ArraySize,
unsigned Quals,
1279 bool *MissingExceptionSpecification =
nullptr,
1280 bool *MissingEmptyExceptionSpecification =
nullptr,
1281 bool AllowNoexceptAllMatchWithNoSpec =
false,
1282 bool IsOperatorNew =
false);
1325 std::tuple<
const Ts &...> Args;
1329 llvm::index_sequence<Is...>)
const {
1331 bool Dummy[] = {(DB << getPrintable(std::get<Is>(Args)))...};
1337 :
TypeDiagnoser(DiagID == 0), DiagID(DiagID), Args(Args...) {}
1343 emit(DB, llvm::index_sequence_for<Ts...>());
1355 Module *CachedFakeTopLevelModule;
1369 return !D->
isHidden() || isVisibleSlow(D);
1376 bool OnlyNeedComplete =
false);
1392 template <
typename... Ts>
1394 const Ts &...Args) {
1402 template <
typename... Ts>
1412 template <
typename... Ts>
1414 const Ts &...Args) {
1426 bool AsUnevaluated =
true);
1449 bool isClassName =
false,
1450 bool HasTrailingDot =
false,
1452 bool IsCtorOrDtorName =
false,
1453 bool WantNontrivialTypeSourceInfo =
false,
1462 bool AllowClassTemplates =
false);
1516 Result.Template = Name;
1522 Result.Template = Name;
1528 Result.Template = Name;
1559 llvm_unreachable(
"unsupported name classification.");
1591 bool IsAddressOfOperand,
1592 std::unique_ptr<CorrectionCandidateCallback> CCC =
nullptr);
1654 bool IsExplicitSpecialization);
1676 bool TypeMayContainAuto);
1691 bool TypeMayContainAuto =
true);
1707 return D && isa<ObjCMethodDecl>(D);
1801 bool NeedDefinition,
bool Recover =
true);
1824 bool IsExplicitInstantiation =
false);
1858 bool &OwnedDecl,
bool &IsDependent,
1860 bool ScopedEnumUsesClassTag,
TypeResult UnderlyingType,
1861 bool IsTypeSpecifier,
SkipBodyInfo *SkipBody =
nullptr);
1898 bool Mutable,
Expr *BitfieldWidth,
1907 bool Diagnose =
false);
1938 bool IsFinalSpelledSealed,
2035 bool AllowInlineNamespace =
false);
2055 unsigned AttrSpellingListIndex);
2057 TypeVisibilityAttr::VisibilityType Vis,
2058 unsigned AttrSpellingListIndex);
2060 VisibilityAttr::VisibilityType Vis,
2061 unsigned AttrSpellingListIndex);
2063 unsigned AttrSpellingListIndex);
2065 unsigned AttrSpellingListIndex);
2068 unsigned AttrSpellingListIndex,
2069 MSInheritanceAttr::Spelling SemanticSpelling);
2072 int FirstArg,
unsigned AttrSpellingListIndex);
2074 unsigned AttrSpellingListIndex);
2077 unsigned AttrSpellingListIndex);
2079 unsigned AttrSpellingListIndex);
2081 unsigned AttrSpellingListIndex);
2100 bool MergeTypeWithOld);
2102 Scope *S,
bool MergeTypeWithOld);
2140 bool IsForUsingDecl);
2152 bool SuppressUserConversions,
2154 bool InOverloadResolution,
2156 bool AllowObjCWritebackConversion);
2162 bool InOverloadResolution,
2163 QualType& ConvertedType,
bool &IncompatibleObjC);
2165 QualType& ConvertedType,
bool &IncompatibleObjC);
2172 unsigned *ArgPos =
nullptr);
2181 bool IgnoreBaseAccess);
2183 bool InOverloadResolution,
2188 bool IgnoreBaseAccess);
2190 bool CStyle,
bool &ObjCLifetimeConversion);
2200 bool AllowNRVO =
true);
2207 bool TopLevelOfInitList =
false,
2208 bool AllowExplicit =
false);
2237 bool SuppressConversion =
false)
2238 : Suppress(Suppress), SuppressConversion(SuppressConversion) {}
2280 bool AllowScopedEnumerations;
2284 bool Suppress,
bool SuppressConversion)
2286 AllowScopedEnumerations(AllowScopedEnumerations) {}
2293 return diagnoseNotInt(S, Loc, T);
2341 bool SuppressUserConversions =
false,
2342 bool PartialOverloading =
false,
2343 bool AllowExplicit =
false);
2348 bool SuppressUserConversions =
false,
2349 bool PartialOverloading =
false);
2355 bool SuppressUserConversion =
false);
2362 bool SuppressUserConversions =
false,
2363 bool PartialOverloading =
false);
2372 bool SuppressUserConversions =
false,
2373 bool PartialOverloading =
false);
2379 bool SuppressUserConversions =
false,
2380 bool PartialOverloading =
false);
2386 bool AllowObjCConversionOnExplicit);
2392 bool AllowObjCConversionOnExplicit);
2406 bool IsAssignmentOperator =
false,
2407 unsigned NumContextualBoolArguments = 0);
2416 bool PartialOverloading =
false);
2428 bool MissingImplicitThis =
false);
2443 bool *pHadMultipleCandidates =
nullptr);
2447 bool Complain =
false,
2452 bool DoFunctionPointerConverion =
false,
2453 bool Complain =
false,
2456 unsigned DiagIDForComplaining = 0);
2469 bool PartialOverloading =
false);
2501 bool AllowTypoCorrection=
true);
2534 bool *NoArrowOperatorFound =
nullptr);
2545 bool CheckParameterNames);
2663 typedef std::function<ExprResult(Sema &, TypoExpr *, TypoCorrection)>
2669 struct TypoExprState {
2670 std::unique_ptr<TypoCorrectionConsumer>
Consumer;
2674 TypoExprState(TypoExprState&& other) LLVM_NOEXCEPT;
2675 TypoExprState& operator=(TypoExprState&& other) LLVM_NOEXCEPT;
2679 llvm::MapVector<
TypoExpr *, TypoExprState> DelayedTypos;
2694 bool LoadedExternalKnownNamespaces;
2706 bool ErrorRecovery);
2725 bool AllowBuiltinCreation =
false);
2727 bool InUnqualifiedLookup = false);
2731 bool AllowBuiltinCreation = false,
2732 bool EnteringContext = false);
2735 = NotForRedeclaration);
2753 bool RValueThis,
unsigned ThisQuals);
2757 bool RValueThis,
unsigned ThisQuals);
2765 bool AllowStringTemplate);
2773 bool IncludeGlobalScope =
true);
2776 bool IncludeGlobalScope = true);
2786 std::unique_ptr<CorrectionCandidateCallback> CCC,
2789 bool EnteringContext =
false,
2791 bool RecordFailure =
true);
2796 std::unique_ptr<CorrectionCandidateCallback> CCC,
2800 bool EnteringContext =
false,
2843 bool ErrorRecovery =
true);
2848 bool ErrorRecovery =
true);
2856 bool ConsiderLinkage,
bool AllowInlineNamespace);
2877 bool IncludeCXX11Attributes =
true);
2894 unsigned ArgNum, StringRef &Str,
2900 MSInheritanceAttr::Spelling SemanticSpelling);
2936 bool isContextSensitive);
2944 bool IsProtocolMethodDecl);
2948 bool IsProtocolMethodDecl);
2954 bool IsProtocolMethodDecl);
2969 bool IncompleteImpl =
false);
2975 bool SynthesizeProperties);
3011 const bool isAssign,
3012 const bool isReadWrite,
3013 const unsigned Attributes,
3014 const unsigned AttributesAsWritten,
3015 bool *isOverridingProperty,
3029 const bool isAssign,
3030 const bool isReadWrite,
3031 const unsigned Attributes,
3032 const unsigned AttributesAsWritten,
3071 bool &IncompleteImpl,
3072 bool ImmediateClass,
3073 bool WarnCategoryMethodImpl=
false);
3086 void AddMethodToGlobalPool(
ObjCMethodDecl *Method,
bool impl,
bool instance);
3091 bool receiverIdOrClass,
3104 bool receiverIdOrClass);
3108 bool receiverIdOrClass);
3119 bool RecordFailure =
true) {
3131 AddMethodToGlobalPool(Method, impl,
true);
3136 AddMethodToGlobalPool(Method, impl,
false);
3146 bool receiverIdOrClass=
false) {
3147 return LookupMethodInGlobalPool(Sel, R, receiverIdOrClass,
3154 bool receiverIdOrClass=
false) {
3155 return LookupMethodInGlobalPool(Sel, R, receiverIdOrClass,
3214 bool HasLeadingEmptyMacro =
false);
3229 S.ActOnFinishOfCompoundStmt();
3243 S.PopFunctionScopeInfo();
3269 FullExprArg CondVal,
Decl *CondVar,
3287 Stmt *First, FullExprArg Second,
3316 Stmt *RangeDecl,
Stmt *BeginEndDecl,
3342 unsigned NumParams);
3344 bool AllowFunctionParameters);
3346 bool AllowFunctionParameters);
3354 bool IsVolatile,
unsigned NumOutputs,
3363 llvm::InlineAsmIdentifierInfo &Info,
3364 bool IsUnevaluatedContext);
3369 StringRef AsmString,
3370 unsigned NumOutputs,
unsigned NumInputs,
3382 bool Invalid =
false);
3455 const Stmt *PossibleBody);
3483 bool ObjCPropertyAccess);
3494 bool ObjCPropertyAccess=
false);
3504 Decl *LambdaContextDecl =
nullptr,
3505 bool IsDecltype =
false);
3509 bool IsDecltype =
false);
3527 bool OdrUse =
true);
3576 const unsigned *
const FunctionScopeIndexToStopAt);
3592 bool SkipLocalVariables =
false);
3598 bool ForceComplain =
false,
3599 bool (*IsPlausibleResult)(
QualType) =
nullptr);
3620 UnqualifiedId &Id,
bool HasTrailingLParen,
bool IsAddressOfOperand,
3621 std::unique_ptr<CorrectionCandidateCallback> CCC =
nullptr,
3622 bool IsInlineAsmIdentifier =
false,
Token *KeywordReplacement =
nullptr);
3631 std::unique_ptr<CorrectionCandidateCallback> CCC,
3637 bool AllowBuiltinCreation=
false);
3642 bool isAddressOfOperand,
3661 Expr *baseObjectExpr =
nullptr,
3672 bool IsDefiniteInstance);
3675 bool HasTrailingLParen);
3679 bool IsAddressOfOperand,
TypeSourceInfo **RecoveryTSI =
nullptr);
3689 bool AcceptInvalidDecl =
false);
3694 bool AcceptInvalidDecl =
false);
3711 Scope *UDLScope =
nullptr);
3720 Scope *UDLScope =
nullptr);
3725 Expr *ControllingExpr,
3731 Expr *ControllingExpr,
3754 bool IsType,
void *TyOrEx,
3801 bool SuppressQualifierCheck =
false,
3832 bool ExecConfig =
false);
3835 const Expr *ArgExpr);
3842 Expr *ExecConfig =
nullptr,
3843 bool IsExecConfig =
false);
3848 Expr *Config =
nullptr,
3849 bool IsExecConfig =
false);
3929 OffsetOfComponent *CompPtr,
3930 unsigned NumComponents,
3936 OffsetOfComponent *CompPtr,
3937 unsigned NumComponents,
4082 bool HasTypenameKeyword,
4096 bool IsInstantiation,
4097 bool HasTypenameKeyword,
4104 bool HasUsingKeyword,
4109 bool HasTypenameKeyword,
4118 Decl *DeclFromDeclSpec);
4127 bool HadMultipleCandidates,
bool IsListInitialization,
4128 bool IsStdInitListInitialization,
4129 bool RequiresZeroInit,
unsigned ConstructKind,
4138 bool IsListInitialization,
4139 bool IsStdInitListInitialization,
bool RequiresZeroInit,
4166 llvm::SmallPtrSet<CanQualType, 4> ExceptionsSeen;
4169 void ClearExceptions() {
4170 ExceptionsSeen.clear();
4184 "noexcept(expr) should not be a possible result");
4189 unsigned size()
const {
return Exceptions.size(); }
4198 void CalledExpr(
Expr *E);
4204 ESI.
Type = getExceptionSpecType();
4213 tok::kw_false).get();
4221 ImplicitExceptionSpecification
4228 ImplicitExceptionSpecification
4234 ImplicitExceptionSpecification
4239 ImplicitExceptionSpecification
4244 ImplicitExceptionSpecification
4249 ImplicitExceptionSpecification
4254 ImplicitExceptionSpecification
4283 Expr *NoexceptExpr);
4288 bool Diagnose =
false);
4419 bool AllowExplicit =
false,
4420 bool IsListInitialization =
false);
4430 bool EnteringContext);
4523 bool Enabled =
true);
4544 bool BuildAndDiagnose =
true,
4545 const unsigned *
const FunctionScopeIndexToStopAt =
nullptr);
4565 bool IsThrownVarInScope);
4599 bool TypeMayContainAuto =
true);
4604 bool UseGlobal,
QualType AllocType,
bool IsArray,
4612 bool Diagnose =
true);
4617 bool addRestrictAttr =
false);
4621 bool Diagnose =
true);
4623 bool CanProvideSize,
4628 bool UseGlobal,
bool ArrayForm,
4634 bool ConvertToBoolean);
4680 bool &MayBePseudoDestructor);
4718 bool DiscardedValue =
false,
4719 bool IsConstexpr =
false,
4720 bool IsLambdaInitCaptureInitializer =
false);
4728 bool EnteringContext =
false);
4756 bool *CanCorrect =
nullptr);
4769 bool EnteringContext,
4772 bool ErrorRecoveryLookup,
4773 bool *IsCorrectedToColon =
nullptr);
4809 bool EnteringContext,
4811 bool ErrorRecoveryLookup =
false,
4812 bool *IsCorrectedToColon =
nullptr);
4825 bool EnteringContext);
4859 bool EnteringContext);
4916 bool KnownDependent,
4932 bool ExplicitParams,
4933 bool ExplicitResultType,
4973 bool IsInstantiation =
false);
5013 unsigned NumStrings);
5039 unsigned NumElements);
5046 bool HadMultipleCandidates);
5060 bool WarnMultipleSelectors);
5169 typedef std::pair<CXXRecordDecl*, SourceLocation>
VTableUse;
5187 bool DefinitionRequired =
false);
5242 Expr *AssertMessageExpr,
5306 bool IgnoreAccess =
false);
5308 unsigned InaccessibleBaseID,
5309 unsigned AmbigiousBaseConvID,
5368 bool Diagnose =
true);
5373 bool IsCopyBindingRefToTemp =
false);
5397 bool ForceCheck =
false,
5398 bool ForceUnprivileged =
false);
5429 template <
typename... Ts>
5431 const Ts &...Args) {
5453 bool AllowFunctionTemplates =
true);
5455 bool AllowFunctionTemplates =
true);
5458 QualType ObjectType,
bool EnteringContext,
5459 bool &MemberOfUnknownSpecialization);
5463 bool hasTemplateKeyword,
5466 bool EnteringContext,
5468 bool &MemberOfUnknownSpecialization);
5511 Decl **Params,
unsigned NumParams,
5533 bool IsFriend,
bool &IsExplicitSpecialization,
bool &Invalid);
5543 unsigned NumOuterTemplateParamLists,
5545 SkipBodyInfo *SkipBody =
nullptr);
5562 bool IsCtorOrDtorName =
false);
5609 bool EnteringContext,
5619 SkipBodyInfo *SkipBody =
nullptr);
5683 bool &HasDefaultArg);
5706 unsigned ArgumentPackIndex,
5734 bool PartialTemplateArgs,
5749 unsigned ArgumentPackIndex);
6154 bool &RetainExpansion,
6276 : OriginalParamType(OriginalParamType), ArgIdx(ArgIdx),
6277 OriginalArgType(OriginalArgType) { }
6287 unsigned NumExplicitlySpecified,
6291 bool PartialOverloading =
false);
6299 bool PartialOverloading =
false);
6307 bool InOverloadResolution =
false);
6320 bool InOverloadResolution =
false);
6341 bool Diagnose =
true);
6353 unsigned NumCallArguments1,
6354 unsigned NumCallArguments2);
6377 llvm::SmallBitVector &
Used);
6380 llvm::SmallBitVector &Deduced) {
6385 llvm::SmallBitVector &Deduced);
6394 bool RelativeToPrimary =
false,
6439 ExceptionSpecInstantiation
6470 : Kind(TemplateInstantiation), Template(nullptr), Entity(nullptr),
6471 TemplateArgs(nullptr), NumTemplateArgs(0), DeductionInfo(nullptr) {}
6475 bool isInstantiationRecord()
const;
6486 case TemplateInstantiation:
6487 case ExceptionSpecInstantiation:
6490 case PriorTemplateArgumentSubstitution:
6491 case DefaultTemplateArgumentChecking:
6494 case DefaultTemplateArgumentInstantiation:
6495 case ExplicitTemplateArgumentSubstitution:
6496 case DeducedTemplateArgumentSubstitution:
6497 case DefaultFunctionArgumentInstantiation:
6502 llvm_unreachable(
"Invalid InstantiationKind!");
6569 int OldSubstitutionIndex;
6578 Self.ArgumentPackSubstitutionIndex = OldSubstitutionIndex;
6595 typedef llvm::DenseMap<Decl *, SmallVector<PartialDiagnosticAt, 1> >
6700 bool SavedInNonInstantiationSFINAEContext;
6701 bool CheckInstantiationDepth(
SourceLocation PointOfInstantiation,
6733 "Must be in an expression evaluation context");
6742 unsigned PrevSFINAEErrors;
6743 bool PrevInNonInstantiationSFINAEContext;
6744 bool PrevAccessCheckingSFINAE;
6749 PrevInNonInstantiationSFINAEContext(
6761 = PrevInNonInstantiationSFINAEContext;
6779 bool PrevDisableTypoCorrection;
6782 : SemaRef(SemaRef), Trap(SemaRef,
true),
6831 : S(S), Enabled(Enabled) {
6832 if (!Enabled)
return;
6839 if (!Enabled)
return;
6842 assert(S.VTableUses.empty() &&
6843 "VTableUses should be empty before it is discarded.");
6844 S.VTableUses.swap(SavedVTableUses);
6847 assert(S.PendingInstantiations.empty() &&
6848 "PendingInstantiations should be empty before it is discarded.");
6849 S.PendingInstantiations.swap(SavedPendingInstantiations);
6855 std::deque<PendingImplicitInstantiation> SavedPendingInstantiations;
6871 SavedPendingLocalImplicitInstantiations.swap(
6876 assert(S.PendingLocalImplicitInstantiations.empty() &&
6877 "there shouldn't be any pending local implicit instantiations");
6878 SavedPendingLocalImplicitInstantiations.swap(
6879 S.PendingLocalImplicitInstantiations);
6884 std::deque<PendingImplicitInstantiation>
6885 SavedPendingLocalImplicitInstantiations;
6907 unsigned ThisTypeQuals);
6912 int indexAdjustment,
6914 bool ExpectParameterPack);
6950 bool CXXDirectInit);
6962 bool Complain =
true);
6980 : TmplAttr(A),
Scope(S), NewDecl(D)
6994 bool Complain =
true);
7025 bool Recursive =
false,
7026 bool DefinitionRequired =
false);
7044 bool InstantiatingVarTemplate =
false);
7049 VarDecl *Var,
bool Recursive =
false,
7050 bool DefinitionRequired =
false);
7054 bool Recursive =
false,
7055 bool DefinitionRequired =
false);
7101 Decl *
const *ProtoRefs,
7102 unsigned NumProtoRefs,
7134 Decl *
const *ProtoRefNames,
unsigned NumProtoRefs,
7145 Decl *
const *ProtoRefs,
7146 unsigned NumProtoRefs,
7178 unsigned NumProtocols,
7197 bool warnOnIncompleteProtocols);
7230 bool FailOnError =
false);
7241 unsigned &Attributes,
7242 bool propertyInPrimaryClass);
7260 bool OverridingProtocolProperty);
7273 bool *OverridingProperty,
7318 bool isVariadic,
bool MethodDefinition);
7362 bool HasTrailingDot,
7381 bool isImplicit =
false);
7384 bool isSuperReceiver,
7407 bool isImplicit =
false);
7535 MSVtorDispAttr::Mode
Value);
7554 llvm::StringRef StackSlotLabel,
7556 llvm::StringRef PragmaName);
7658 unsigned SpellingListIndex,
bool IsPackExpansion);
7660 unsigned SpellingListIndex,
bool IsPackExpansion);
7665 unsigned SpellingListIndex);
7670 unsigned SpellingListIndex);
7675 Expr *MinBlocks,
unsigned SpellingListIndex);
7679 void *VarDataSharingAttributesStack;
7681 void InitDataSharingAttributesStack();
7682 void DestroyDataSharingAttributesStack();
7754 llvm::DenseMap<VarDecl *, Expr *> &VarsWithImplicitDSA);
7760 llvm::DenseMap<VarDecl *, Expr *> &VarsWithImplicitDSA);
7766 llvm::DenseMap<VarDecl *, Expr *> &VarsWithImplicitDSA);
7795 llvm::DenseMap<VarDecl *, Expr *> &VarsWithImplicitDSA);
7801 llvm::DenseMap<VarDecl *, Expr *> &VarsWithImplicitDSA);
8119 bool AllowExplicit =
false,
8120 bool IsListInitialization =
false);
8133 bool IsCompAssign =
false);
8214 bool *Complained =
nullptr);
8220 bool AllowMask)
const;
8245 bool Diagnose =
true,
8246 bool DiagnoseCFAudited =
false);
8259 bool AllowExplicit =
false);
8288 bool IsCompAssign =
false);
8297 bool IsCompAssign =
false);
8303 bool IsCompAssign =
false);
8327 bool *NonStandardCompositeType =
nullptr);
8330 bool *NonStandardCompositeType =
nullptr) {
8333 NonStandardCompositeType);
8352 bool AllowBothBool,
bool AllowBoolConversion);
8389 bool &DerivedToBase,
8390 bool &ObjCConversion,
8391 bool &ObjCLifetimeConversion);
8433 bool DiagnoseCFAudited =
false,
8465 bool isSuperMessage,
8475 bool isClassMessage,
bool isSuperMessage);
8514 unsigned NewWidth,
bool NewSign,
8539 VerifyICEDiagnoser &Diagnoser,
8540 bool AllowFold =
true);
8543 bool AllowFold =
true);
8545 llvm::APSInt *
Result =
nullptr);
8553 Expr *BitWidth,
bool *ZeroWidth =
nullptr);
8636 bool AllowNonIdentifiers,
8637 bool AllowNestedNameSpecifiers);
8639 struct CodeCompleteExpressionData;
8641 const CodeCompleteExpressionData &Data);
8658 bool EnteringContext);
8669 bool AfterAmpersand);
8683 bool AtArgumentExpression);
8686 bool AtArgumentExpression,
8687 bool IsSuper =
false);
8690 bool AtArgumentExpression,
8697 unsigned NumProtocols);
8714 bool IsInstanceMethod,
8717 bool IsInstanceMethod,
8718 bool AtParameterName,
8740 unsigned ByteNo)
const;
8743 void CheckArrayAccess(
const Expr *BaseExpr,
const Expr *IndexExpr,
8745 bool AllowOnePastEnd=
true,
bool IndexNegated=
false);
8746 void CheckArrayAccess(
const Expr *E);
8749 struct FormatStringInfo {
8751 unsigned FirstDataArg;
8755 bool getFormatStringInfo(
const FormatAttr *Format,
bool IsCXXMember,
8756 FormatStringInfo *FSI);
8757 bool CheckFunctionCall(FunctionDecl *FDecl, CallExpr *TheCall,
8758 const FunctionProtoType *Proto);
8759 bool CheckObjCMethodCall(ObjCMethodDecl *Method, SourceLocation loc,
8760 ArrayRef<const Expr *> Args);
8761 bool CheckPointerCall(NamedDecl *NDecl, CallExpr *TheCall,
8762 const FunctionProtoType *Proto);
8763 bool CheckOtherCall(CallExpr *TheCall,
const FunctionProtoType *Proto);
8764 void CheckConstructorCall(FunctionDecl *FDecl,
8765 ArrayRef<const Expr *> Args,
8766 const FunctionProtoType *Proto,
8767 SourceLocation Loc);
8769 void checkCall(NamedDecl *FDecl,
const FunctionProtoType *Proto,
8770 ArrayRef<const Expr *> Args,
bool IsMemberFunction,
8771 SourceLocation Loc, SourceRange Range,
8774 bool CheckObjCString(Expr *Arg);
8776 ExprResult CheckBuiltinFunctionCall(FunctionDecl *FDecl,
8777 unsigned BuiltinID, CallExpr *TheCall);
8779 bool CheckARMBuiltinExclusiveCall(
unsigned BuiltinID, CallExpr *TheCall,
8781 bool CheckNeonBuiltinFunctionCall(
unsigned BuiltinID, CallExpr *TheCall);
8782 bool CheckARMBuiltinFunctionCall(
unsigned BuiltinID, CallExpr *TheCall);
8784 bool CheckAArch64BuiltinFunctionCall(
unsigned BuiltinID, CallExpr *TheCall);
8785 bool CheckMipsBuiltinFunctionCall(
unsigned BuiltinID, CallExpr *TheCall);
8786 bool CheckSystemZBuiltinFunctionCall(
unsigned BuiltinID, CallExpr *TheCall);
8787 bool CheckX86BuiltinFunctionCall(
unsigned BuiltinID, CallExpr *TheCall);
8788 bool CheckPPCBuiltinFunctionCall(
unsigned BuiltinID, CallExpr *TheCall);
8790 bool SemaBuiltinVAStart(CallExpr *TheCall);
8791 bool SemaBuiltinVAStartARM(CallExpr *Call);
8792 bool SemaBuiltinUnorderedCompare(CallExpr *TheCall);
8793 bool SemaBuiltinFPClassification(CallExpr *TheCall,
unsigned NumArgs);
8799 SourceLocation BuiltinLoc,
8800 SourceLocation RParenLoc);
8803 bool SemaBuiltinPrefetch(CallExpr *TheCall);
8804 bool SemaBuiltinAssume(CallExpr *TheCall);
8805 bool SemaBuiltinAssumeAligned(CallExpr *TheCall);
8806 bool SemaBuiltinLongjmp(CallExpr *TheCall);
8807 bool SemaBuiltinSetjmp(CallExpr *TheCall);
8811 bool SemaBuiltinConstantArg(CallExpr *TheCall,
int ArgNum,
8813 bool SemaBuiltinConstantArgRange(CallExpr *TheCall,
int ArgNum,
8815 bool SemaBuiltinARMSpecialReg(
unsigned BuiltinID, CallExpr *TheCall,
8816 int ArgNum,
unsigned ExpectedFieldNum,
8818 bool SemaBuiltinCpuSupports(CallExpr *TheCall);
8835 unsigned format_idx,
unsigned firstDataArg,
8838 llvm::SmallBitVector &CheckedVarArgs);
8845 bool CheckFormatArguments(
const FormatAttr *Format,
8850 llvm::SmallBitVector &CheckedVarArgs);
8852 bool HasVAListArg,
unsigned format_idx,
8856 llvm::SmallBitVector &CheckedVarArgs);
8858 void CheckAbsoluteValueFunction(
const CallExpr *Call,
8862 void CheckMemaccessArguments(
const CallExpr *Call,
8866 void CheckStrlcpycatArguments(
const CallExpr *Call,
8869 void CheckStrncatArguments(
const CallExpr *Call,
8872 void CheckReturnValExpr(
Expr *RetValExp,
QualType lhsType,
8874 bool isObjCMethod =
false,
8875 const AttrVec *Attrs =
nullptr,
8881 void CheckForIntOverflow(
Expr *E);
8882 void CheckUnsequencedOperations(
Expr *E);
8887 bool IsConstexpr =
false);
8894 void CheckBreakContinueBinding(
Expr *E);
8902 bool DeleteWasArrayForm);
8907 bool LayoutCompatible,
bool MustBeNull);
8913 Type(Type), LayoutCompatible(LayoutCompatible),
8914 MustBeNull(MustBeNull)
8921 unsigned LayoutCompatible : 1;
8922 unsigned MustBeNull : 1;
8931 std::unique_ptr<llvm::DenseMap<TypeTagMagicValue, TypeTagData>>
8932 TypeTagForDatatypeMagicValues;
8936 void CheckArgumentWithTypeTag(
const ArgumentWithTypeTagAttr *
Attr,
8937 const Expr *
const *ExprArgs);
8982 return CurScope->incrementMSManglingNumber();
9000 DC = CatD->getClassInterface();
9007 bool PartialOverloading =
false) {
9009 if (NumArgs > 0 && PartialOverloading)
9010 return NumArgs + 1 > NumParams;
9011 return NumArgs > NumParams;
9022 Decl *LambdaContextDecl =
nullptr,
9023 bool IsDecltype =
false)
9024 : Actions(Actions) {
9031 bool IsDecltype =
false)
9032 : Actions(Actions) {
9039 Actions.PopExpressionEvaluationContext();
9043 DeductionFailureInfo
9045 sema::TemplateDeductionInfo &Info);
FileNullabilityMap NullabilityMap
A mapping that describes the nullability we've seen in each header file.
QualType BuildStdInitializerList(QualType Element, SourceLocation Loc)
Looks for the std::initializer_list template and instantiates it with Element, or emits an error if i...
Abstract class used to diagnose incomplete types.
void FreePackedContext()
FreePackedContext - Deallocate and null out PackContext.
bool CheckNoReturnAttr(const AttributeList &attr)
ObjCMethodDecl * LookupMethodInQualifiedType(Selector Sel, const ObjCObjectPointerType *OPT, bool IsInstance)
static FormatStringType GetFormatStringType(const FormatAttr *Format)
SourceLocation getOptimizeOffPragmaLocation() const
Get the location for the currently active "\#pragma clang optimize off". If this location is invalid...
llvm::DenseMap< Selector, ObjCMethodDecl * > ProtocolsMethodsMap
NamedDecl * FindFirstQualifierInScope(Scope *S, NestedNameSpecifier *NNS)
If the given nested-name-specifier begins with a bare identifier (e.g., Base::), perform name lookup ...
ExprResult BuildExpressionFromIntegralTemplateArgument(const TemplateArgument &Arg, SourceLocation Loc)
Construct a new expression that refers to the given integral template argument with the given source-...
Module * getOwningModule(Decl *Entity)
Get the module owning an entity.
void ActOnFinishDelayedMemberInitializers(Decl *Record)
void MarkDeclarationsReferencedInExpr(Expr *E, bool SkipLocalVariables=false)
Mark any declarations that appear within this expression or any potentially-evaluated subexpressions ...
ObjCInterfaceDecl * NSStringDecl
The declaration of the Objective-C NSString class.
const AttributedType * getCallingConvAttributedType(QualType T) const
void InstantiateClassMembers(SourceLocation PointOfInstantiation, CXXRecordDecl *Instantiation, const MultiLevelTemplateArgumentList &TemplateArgs, TemplateSpecializationKind TSK)
Instantiates the definitions of all of the member of the given class, which is an instantiation of a ...
CanThrowResult canThrow(const Expr *E)
QualType getCurrentThisType()
Try to retrieve the type of the 'this' pointer.
PragmaStack< StringLiteral * > CodeSegStack
StmtResult ActOnOpenMPMasterDirective(Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp master' after parsing of the associated statement.
UnusedFileScopedDeclsType UnusedFileScopedDecls
The set of file scoped decls seen so far that have not been used and must warn if not used...
void DiagnoseClassExtensionDupMethods(ObjCCategoryDecl *CAT, ObjCInterfaceDecl *ID)
ExprResult ActOnArrayTypeTrait(ArrayTypeTrait ATT, SourceLocation KWLoc, ParsedType LhsTy, Expr *DimExpr, SourceLocation RParen)
ExprResult ActOnOpenMPIdExpression(Scope *CurScope, CXXScopeSpec &ScopeSpec, const DeclarationNameInfo &Id)
Called on correct id-expression from the '#pragma omp threadprivate'.
bool RequireNonAbstractType(SourceLocation Loc, QualType T, TypeDiagnoser &Diagnoser)
bool RequireCompleteExprType(Expr *E, unsigned DiagID, const Ts &...Args)
ParsedType CreateParsedType(QualType T, TypeSourceInfo *TInfo)
Package the given type and TSI into a ParsedType.
llvm::SmallSetVector< const TypedefNameDecl *, 4 > UnusedLocalTypedefNameCandidates
Set containing all typedefs that are likely unused.
bool FindDeallocationFunction(SourceLocation StartLoc, CXXRecordDecl *RD, DeclarationName Name, FunctionDecl *&Operator, bool Diagnose=true)
void CodeCompleteObjCPropertySynthesizeIvar(Scope *S, IdentifierInfo *PropertyName)
SmallVector< Module *, 16 > ActiveTemplateInstantiationLookupModules
Extra modules inspected when performing a lookup during a template instantiation. Computed lazily...
const internal::VariadicDynCastAllOfMatcher< Stmt, Expr > expr
Matches expressions.
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
TypeResult ActOnDependentTag(Scope *S, unsigned TagSpec, TagUseKind TUK, const CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation TagLoc, SourceLocation NameLoc)
DeclResult ActOnClassTemplateSpecialization(Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc, SourceLocation ModulePrivateLoc, TemplateIdAnnotation &TemplateId, AttributeList *Attr, MultiTemplateParamsArg TemplateParameterLists, SkipBodyInfo *SkipBody=nullptr)
bool isSelfExpr(Expr *RExpr)
Private Helper predicate to check for 'self'.
ExtVectorDeclsType ExtVectorDecls
Scope * getCurScope() const
Retrieve the parser's current scope.
ExprResult ActOnCastExpr(Scope *S, SourceLocation LParenLoc, Declarator &D, ParsedType &Ty, SourceLocation RParenLoc, Expr *CastExpr)
StmtResult ActOnOpenMPSectionDirective(Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp section' after parsing of the associated statement.
AttributeList * ArgAttrs
ArgAttrs - Attribute list for this argument.
OMPClause * ActOnOpenMPLastprivateClause(ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'lastprivate' clause.
void CheckConstructor(CXXConstructorDecl *Constructor)
ExprResult PerformContextuallyConvertToBool(Expr *From)
bool CheckNontrivialField(FieldDecl *FD)
The current expression occurs within an unevaluated operand that unconditionally permits abstract ref...
SuppressedDiagnosticsMap SuppressedDiagnostics
VarDecl * createLambdaInitCaptureVarDecl(SourceLocation Loc, QualType InitCaptureType, IdentifierInfo *Id, Expr *Init)
Create a dummy variable within the declcontext of the lambda's call operator, for name lookup purpose...
no exception specification
IdentifierInfo * getSuperIdentifier() const
Smart pointer class that efficiently represents Objective-C method names.
QualType BuildFunctionType(QualType T, MutableArrayRef< QualType > ParamTypes, SourceLocation Loc, DeclarationName Entity, const FunctionProtoType::ExtProtoInfo &EPI)
Build a function type.
virtual void ReadUnusedFileScopedDecls(SmallVectorImpl< const DeclaratorDecl * > &Decls)
Read the set of unused file-scope declarations known to the external Sema source. ...
bool TemplateParameterListsAreEqual(TemplateParameterList *New, TemplateParameterList *Old, bool Complain, TemplateParameterListEqualKind Kind, SourceLocation TemplateArgLoc=SourceLocation())
Determine whether the given template parameter lists are equivalent.
QualType CheckAdditionOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, unsigned Opc, QualType *CompLHSTy=nullptr)
Stores the type being destroyed by a pseudo-destructor expression.
bool CheckLoopHintExpr(Expr *E, SourceLocation Loc)
Decl * ActOnIvar(Scope *S, SourceLocation DeclStart, Declarator &D, Expr *BitfieldWidth, tok::ObjCKeywordKind visibility)
bool ShouldWarnIfUnusedFileScopedDecl(const DeclaratorDecl *D) const
Simple class containing the result of Sema::CorrectTypo.
QualType CheckAssignmentOperands(Expr *LHSExpr, ExprResult &RHS, SourceLocation Loc, QualType CompoundType)
TemplateDeductionResult
Describes the result of template argument deduction.
LateTemplateParserCB * LateTemplateParser
void ActOnPragmaMSStruct(PragmaMSStructKind Kind)
ActOnPragmaMSStruct - Called on well formed #pragma ms_struct [on|off].
bool CheckTemplateParameterList(TemplateParameterList *NewParams, TemplateParameterList *OldParams, TemplateParamListContext TPC)
Checks the validity of a template parameter list, possibly considering the template parameter list fr...
bool isActive() const
Determine whether this diagnostic is still active.
bool CheckExceptionSpecCompatibility(Expr *From, QualType ToType)
Represents a version number in the form major[.minor[.subminor[.build]]].
bool checkLiteralOperatorId(const CXXScopeSpec &SS, const UnqualifiedId &Id)
void ActOnPragmaWeakAlias(IdentifierInfo *WeakName, IdentifierInfo *AliasName, SourceLocation PragmaLoc, SourceLocation WeakNameLoc, SourceLocation AliasNameLoc)
ActOnPragmaWeakAlias - Called on well formed #pragma weak ident = ident.
SmallVectorImpl< Decl * > & WeakTopLevelDecls()
WeakTopLevelDeclDecls - access to #pragma weak-generated Decls.
TypeResult actOnObjCTypeArgsAndProtocolQualifiers(Scope *S, SourceLocation Loc, ParsedType BaseType, SourceLocation TypeArgsLAngleLoc, ArrayRef< ParsedType > TypeArgs, SourceLocation TypeArgsRAngleLoc, SourceLocation ProtocolLAngleLoc, ArrayRef< Decl * > Protocols, ArrayRef< SourceLocation > ProtocolLocs, SourceLocation ProtocolRAngleLoc)
Build a specialized and/or protocol-qualified Objective-C type.
void Initialize()
Perform initialization that occurs after the parser has been initialized but before it parses anythin...
void UpdateExceptionSpec(FunctionDecl *FD, const FunctionProtoType::ExceptionSpecInfo &ESI)
unsigned MSAsmLabelNameCounter
counter for internal MS Asm label names.
DeclContext * getCurLexicalContext() const
bool IvarBacksCurrentMethodAccessor(ObjCInterfaceDecl *IFace, ObjCMethodDecl *Method, ObjCIvarDecl *IV)
void ActOnCapturedRegionStart(SourceLocation Loc, Scope *CurScope, CapturedRegionKind Kind, unsigned NumParams)
NameClassification(const IdentifierInfo *Keyword)
ExprResult ActOnSuperMessage(Scope *S, SourceLocation SuperLoc, Selector Sel, SourceLocation LBracLoc, ArrayRef< SourceLocation > SelectorLocs, SourceLocation RBracLoc, MultiExprArg Args)
void ConvertIntegerToTypeWarnOnOverflow(llvm::APSInt &OldVal, unsigned NewWidth, bool NewSign, SourceLocation Loc, unsigned DiagID)
StmtResult ActOnOpenMPFlushDirective(ArrayRef< OMPClause * > Clauses, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp flush'.
~EnterExpressionEvaluationContext()
Defines enumerations for the type traits support.
A cast other than a C-style cast.
LateParsedTemplateMapT LateParsedTemplateMap
void ActOnFinishNamespaceDef(Decl *Dcl, SourceLocation RBrace)
A stack-allocated class that identifies which local variable declaration instantiations are present i...
void CheckTypedefForVariablyModifiedType(Scope *S, TypedefNameDecl *D)
ExprResult ActOnConditionalOp(SourceLocation QuestionLoc, SourceLocation ColonLoc, Expr *CondExpr, Expr *LHSExpr, Expr *RHSExpr)
EnableIfAttr * CheckEnableIf(FunctionDecl *Function, ArrayRef< Expr * > Args, bool MissingImplicitThis=false)
static bool getPrintable(bool B)
StmtResult ActOnCXXCatchBlock(SourceLocation CatchLoc, Decl *ExDecl, Stmt *HandlerBlock)
DeclContext * getFunctionLevelDeclContext()
ExprResult ActOnIntegerConstant(SourceLocation Loc, uint64_t Val)
Code completion occurs within a class, struct, or union.
void InstantiateExceptionSpec(SourceLocation PointOfInstantiation, FunctionDecl *Function)
void EndOpenMPDSABlock(Stmt *CurDirective)
Called on end of data sharing attribute block.
QualType BuildUnaryTransformType(QualType BaseType, UnaryTransformType::UTTKind UKind, SourceLocation Loc)
Template argument deduction was successful.
RecordDecl * MSVCGuidDecl
The MSVC "_GUID" struct, which is defined in MSVC header files.
const FunctionProtoType * ResolveExceptionSpec(SourceLocation Loc, const FunctionProtoType *FPT)
PragmaStack< StringLiteral * > DataSegStack
Represents a lazily-loaded vector of data.
UnresolvedSetIterator getMostSpecialized(UnresolvedSetIterator SBegin, UnresolvedSetIterator SEnd, TemplateSpecCandidateSet &FailedCandidates, SourceLocation Loc, const PartialDiagnostic &NoneDiag, const PartialDiagnostic &AmbigDiag, const PartialDiagnostic &CandidateDiag, bool Complain=true, QualType TargetType=QualType())
Retrieve the most specialized of the given function template specializations.
void FindProtocolDeclaration(bool WarnOnDeclarations, bool ForObjCContainer, const IdentifierLocPair *ProtocolId, unsigned NumProtocols, SmallVectorImpl< Decl * > &Protocols)
ObjCBridgeCastKind
The kind of bridging performed by the Objective-C bridge cast.
std::unique_ptr< RecordDeclSetTy > PureVirtualClassDiagSet
IntrusiveRefCntPtr< MangleNumberingContext > MangleNumbering
The context information used to mangle lambda expressions and block literals within this context...
void ActOnPragmaMSSeg(SourceLocation PragmaLocation, PragmaMsStackAction Action, llvm::StringRef StackSlotLabel, StringLiteral *SegmentName, llvm::StringRef PragmaName)
Called on well formed #pragma bss_seg/data_seg/const_seg/code_seg.
ExprResult ActOnParenListExpr(SourceLocation L, SourceLocation R, MultiExprArg Val)
bool isObjCPointerConversion(QualType FromType, QualType ToType, QualType &ConvertedType, bool &IncompatibleObjC)
const LangOptions & getLangOpts() const
void getUndefinedButUsed(SmallVectorImpl< std::pair< NamedDecl *, SourceLocation > > &Undefined)
Obtain a sorted list of functions that are undefined but ODR-used.
bool LookupName(LookupResult &R, Scope *S, bool AllowBuiltinCreation=false)
Perform unqualified name lookup starting from a given scope.
unsigned deduceWeakPropertyFromType(QualType T)
OMPClause * ActOnOpenMPUntiedClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'untied' clause.
StmtResult ActOnOpenMPParallelSectionsDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp parallel sections' after parsing of the associated statement...
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.
QualType CXXThisTypeOverride
When non-NULL, the C++ 'this' expression is allowed despite the current context not being a non-stati...
OpenCLOptions OpenCLFeatures
NullabilityKind
Describes the nullability of a particular type.
We are matching the template parameter lists of two templates that might be redeclarations.
ExprResult SubstInitializer(Expr *E, const MultiLevelTemplateArgumentList &TemplateArgs, bool CXXDirectInit)
CXXMethodDecl * LookupMovingAssignment(CXXRecordDecl *Class, unsigned Quals, bool RValueThis, unsigned ThisQuals)
Look up the moving assignment operator for the given class.
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...
StmtResult ActOnGCCAsmStmt(SourceLocation AsmLoc, bool IsSimple, bool IsVolatile, unsigned NumOutputs, unsigned NumInputs, IdentifierInfo **Names, MultiExprArg Constraints, MultiExprArg Exprs, Expr *AsmString, MultiExprArg Clobbers, SourceLocation RParenLoc)
Microsoft __if_not_exists.
LazyVector< CXXConstructorDecl *, ExternalSemaSource,&ExternalSemaSource::ReadDelegatingConstructors, 2, 2 > DelegatingCtorDeclsType
SmallVector< MSVtorDispAttr::Mode, 2 > VtorDispModeStack
Whether to insert vtordisps prior to virtual bases in the Microsoft C++ ABI. Possible values are 0...
ObjCMethodDecl * LookupMethodInObjectType(Selector Sel, QualType Ty, bool IsInstance)
LookupMethodInType - Look up a method in an ObjCObjectType.
StmtResult ActOnExprStmt(ExprResult Arg)
ExprResult ActOnArraySubscriptExpr(Scope *S, Expr *Base, SourceLocation LLoc, Expr *Idx, SourceLocation RLoc)
void CodeCompleteAssignmentRHS(Scope *S, Expr *LHS)
void ActOnStartDelayedCXXMethodDeclaration(Scope *S, Decl *Method)
friend bool operator==(const ActiveTemplateInstantiation &X, const ActiveTemplateInstantiation &Y)
void ActOnDocumentableDecls(ArrayRef< Decl * > Group)
void ActOnDocumentableDecl(Decl *D)
StmtResult ActOnObjCForCollectionStmt(SourceLocation ForColLoc, Stmt *First, Expr *collection, SourceLocation RParenLoc)
ActionResult< Expr * > ExprResult
ExprResult BuildCXXDefaultArgExpr(SourceLocation CallLoc, FunctionDecl *FD, ParmVarDecl *Param)
void ActOnFinishCXXMemberDefaultArgs(Decl *D)
The current expression is potentially evaluated at run time, which means that code may be generated t...
void ForceDeclarationOfImplicitMembers(CXXRecordDecl *Class)
Force the declaration of any implicitly-declared members of this class.
VarTemplateSpecializationDecl * BuildVarTemplateInstantiation(VarTemplateDecl *VarTemplate, VarDecl *FromVar, const TemplateArgumentList &TemplateArgList, const TemplateArgumentListInfo &TemplateArgsInfo, SmallVectorImpl< TemplateArgument > &Converted, SourceLocation PointOfInstantiation, void *InsertPos, LateInstantiatedAttrVec *LateAttrs=nullptr, LocalInstantiationScope *StartingScope=nullptr)
ExprResult BuildPredefinedExpr(SourceLocation Loc, PredefinedExpr::IdentType IT)
llvm::StringRef StackSlotLabel
SmallVector< Scope *, 2 > CurrentSEHFinally
Stack of active SEH __finally scopes. Can be empty.
DeclResult ActOnCXXConditionDeclaration(Scope *S, Declarator &D)
bool CheckFunctionDeclaration(Scope *S, FunctionDecl *NewFD, LookupResult &Previous, bool IsExplicitSpecialization)
Perform semantic checking of a new function declaration.
std::string getTemplateArgumentBindingsText(const TemplateParameterList *Params, const TemplateArgumentList &Args)
Produces a formatted string that describes the binding of template parameters to template arguments...
TypeLoc getReturnTypeLoc(FunctionDecl *FD) const
void computeNRVO(Stmt *Body, sema::FunctionScopeInfo *Scope)
Given the set of return statements within a function body, compute the variables that are subject to ...
void MarkVirtualMemberExceptionSpecsNeeded(SourceLocation Loc, const CXXRecordDecl *RD)
Mark the exception specifications of all virtual member functions in the given class as needed...
StmtResult ActOnCompoundStmt(SourceLocation L, SourceLocation R, ArrayRef< Stmt * > Elts, bool isStmtExpr)
void CodeCompleteConstructorInitializer(Decl *Constructor, ArrayRef< CXXCtorInitializer * > Initializers)
StmtResult ActOnOpenMPTeamsDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp teams' after parsing of the associated statement.
Defines the clang::Module class, which describes a module in the source code.
SemaDiagnosticBuilder Diag(SourceLocation Loc, unsigned DiagID)
Emit a diagnostic.
QualType CheckRemainderOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign=false)
bool DiagnoseConditionalForNull(Expr *LHSExpr, Expr *RHSExpr, SourceLocation QuestionLoc)
Emit a specialized diagnostic when one expression is a null pointer constant and the other is not a p...
void ActOnBlockArguments(SourceLocation CaretLoc, Declarator &ParamInfo, Scope *CurScope)
void incrementMSManglingNumber() const
bool GatherArgumentsForCall(SourceLocation CallLoc, FunctionDecl *FDecl, const FunctionProtoType *Proto, unsigned FirstParam, ArrayRef< Expr * > Args, SmallVectorImpl< Expr * > &AllArgs, VariadicCallType CallType=VariadicDoesNotApply, bool AllowExplicit=false, bool IsListInitialization=false)
void DiagnoseMissingDesignatedInitOverrides(const ObjCImplementationDecl *ImplD, const ObjCInterfaceDecl *IFD)
void DiagnoseMultipleMethodInGlobalPool(SmallVectorImpl< ObjCMethodDecl * > &Methods, Selector Sel, SourceRange R, bool receiverIdOrClass)
ExprResult BuildCallToMemberFunction(Scope *S, Expr *MemExpr, SourceLocation LParenLoc, MultiExprArg Args, SourceLocation RParenLoc)
ExprResult ActOnNoexceptExpr(SourceLocation KeyLoc, SourceLocation LParen, Expr *Operand, SourceLocation RParen)
void CheckObjCPropertyAttributes(Decl *PropertyPtrTy, SourceLocation Loc, unsigned &Attributes, bool propertyInPrimaryClass)
ExprResult CheckBooleanCondition(Expr *E, SourceLocation Loc)
Captures information about "declaration specifiers" specific to Objective-C.
void CodeCompleteUsing(Scope *S)
AccessResult CheckConstructorAccess(SourceLocation Loc, CXXConstructorDecl *D, const InitializedEntity &Entity, AccessSpecifier Access, bool IsCopyBindingRefToTemp=false)
Checks access to a constructor.
LambdaCaptureDefault
The default, if any, capture method for a lambda expression.
void CodeCompleteExpression(Scope *S, const CodeCompleteExpressionData &Data)
Perform code-completion in an expression context when we know what type we're looking for...
std::deque< PendingImplicitInstantiation > PendingInstantiations
The queue of implicit template instantiations that are required but have not yet been performed...
A reference to a name which we were able to look up during parsing but could not resolve to a specifi...
ExprResult PerformContextualImplicitConversion(SourceLocation Loc, Expr *FromE, ContextualImplicitConverter &Converter)
Perform a contextual implicit conversion.
void DiagnoseFunctionSpecifiers(const DeclSpec &DS)
Diagnose function specifiers on a declaration of an identifier that does not identify a function...
bool LookupParsedName(LookupResult &R, Scope *S, CXXScopeSpec *SS, bool AllowBuiltinCreation=false, bool EnteringContext=false)
Performs name lookup for a name that was parsed in the source code, and may contain a C++ scope speci...
Represents a C++11 auto or C++1y decltype(auto) type.
OMPClause * ActOnOpenMPFirstprivateClause(ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'firstprivate' clause.
DeclContext * OriginalLexicalContext
Generally null except when we temporarily switch decl contexts, like in.
ExprResult BuildBlockForLambdaConversion(SourceLocation CurrentLocation, SourceLocation ConvLocation, CXXConversionDecl *Conv, Expr *Src)
bool RebuildNestedNameSpecifierInCurrentInstantiation(CXXScopeSpec &SS)
void MarkVirtualMembersReferenced(SourceLocation Loc, const CXXRecordDecl *RD)
ExprResult DefaultArgumentPromotion(Expr *E)
QualType BuildArrayType(QualType T, ArrayType::ArraySizeModifier ASM, Expr *ArraySize, unsigned Quals, SourceRange Brackets, DeclarationName Entity)
Build an array type.
void FindHiddenVirtualMethods(CXXMethodDecl *MD, SmallVectorImpl< CXXMethodDecl * > &OverloadedMethods)
Check if a method overloads virtual methods in a base class without overriding any.
bool isCopyElisionCandidate(QualType ReturnType, const VarDecl *VD, bool AllowFunctionParameters)
bool CheckVecStepExpr(Expr *E)
bool CanPerformCopyInitialization(const InitializedEntity &Entity, ExprResult Init)
ExprResult forceUnknownAnyToType(Expr *E, QualType ToType)
Force an expression with unknown-type to an expression of the given type.
bool CheckForwardProtocolDeclarationForCircularDependency(IdentifierInfo *PName, SourceLocation &PLoc, SourceLocation PrevLoc, const ObjCList< ObjCProtocolDecl > &PList)
void EvaluateImplicitExceptionSpec(SourceLocation Loc, CXXMethodDecl *MD)
Evaluate the implicit exception specification for a defaulted special member function.
void CodeCompleteNaturalLanguage()
ExprResult CreateBuiltinArraySubscriptExpr(Expr *Base, SourceLocation LLoc, Expr *Idx, SourceLocation RLoc)
ExprResult ActOnVAArg(SourceLocation BuiltinLoc, Expr *E, ParsedType Ty, SourceLocation RPLoc)
bool hasErrorOccurred() const
Determine whether any SFINAE errors have been trapped.
bool InstantiateClassTemplateSpecialization(SourceLocation PointOfInstantiation, ClassTemplateSpecializationDecl *ClassTemplateSpec, TemplateSpecializationKind TSK, bool Complain=true)
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.
ExprResult BuildObjCDictionaryLiteral(SourceRange SR, ObjCDictionaryElement *Elements, unsigned NumElements)
void ActOnFinishDelayedCXXMethodDeclaration(Scope *S, Decl *Method)
OMPClause * ActOnOpenMPScheduleClause(OpenMPScheduleClauseKind Kind, Expr *ChunkSize, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation KindLoc, SourceLocation CommaLoc, SourceLocation EndLoc)
Called on well-formed 'schedule' clause.
QualType CheckSubtractionOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, QualType *CompLHSTy=nullptr)
~SynthesizedFunctionScope()
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.
void MarkDeclRefReferenced(DeclRefExpr *E)
Perform reference-marking and odr-use handling for a DeclRefExpr.
NamespaceDecl - Represent a C++ namespace.
std::pair< IdentifierInfo *, SourceLocation > IdentifierLocPair
A simple pair of identifier info and location.
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. a reference).
SourceLocation getLocForEndOfToken(SourceLocation Loc, unsigned Offset=0)
Calls Lexer::getLocForEndOfToken()
ExprResult ActOnObjCBridgedCast(Scope *S, SourceLocation LParenLoc, ObjCBridgeCastKind Kind, SourceLocation BridgeKeywordLoc, ParsedType Type, SourceLocation RParenLoc, Expr *SubExpr)
StmtResult ActOnObjCAtCatchStmt(SourceLocation AtLoc, SourceLocation RParen, Decl *Parm, Stmt *Body)
void CodeCompleteQualifiedId(Scope *S, CXXScopeSpec &SS, bool EnteringContext)
AccessSpecifier
A C++ access specifier (public, private, protected), plus the special value "none" which means differ...
void ActOnExitFunctionContext()
LazyVector< const DeclaratorDecl *, ExternalSemaSource,&ExternalSemaSource::ReadUnusedFileScopedDecls, 2, 2 > UnusedFileScopedDeclsType
A container of type source information.
static const IdentifierInfo * getPrintable(const IdentifierInfo *II)
Wrapper for void* pointer.
std::pair< ValueDecl *, SourceLocation > PendingImplicitInstantiation
An entity for which implicit template instantiation is required.
bool isAcceptableNestedNameSpecifier(const NamedDecl *SD, bool *CanCorrect=nullptr)
Determines whether the given declaration is an valid acceptable result for name lookup of a nested-na...
OMPClause * ActOnOpenMPProcBindClause(OpenMPProcBindClauseKind Kind, SourceLocation KindLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'proc_bind' clause.
Floating point control options.
StmtResult ActOnContinueStmt(SourceLocation ContinueLoc, Scope *CurScope)
bool inferCUDATargetForImplicitSpecialMember(CXXRecordDecl *ClassDecl, CXXSpecialMember CSM, CXXMethodDecl *MemberDecl, bool ConstRHS, bool Diagnose)
IdentifierInfo * getFloat128Identifier() const
QualType CheckVectorLogicalOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc)
StmtResult ActOnOpenMPSimdDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, llvm::DenseMap< VarDecl *, Expr * > &VarsWithImplicitDSA)
Called on well-formed '#pragma omp simd' after parsing of the associated statement.
DelayedDiagnosticsState pushUndelayed()
ExprResult ActOnExpressionTrait(ExpressionTrait OET, SourceLocation KWLoc, Expr *Queried, SourceLocation RParen)
void ActOnPragmaFPContract(tok::OnOffSwitch OOS)
void CodeCompleteDeclSpec(Scope *S, DeclSpec &DS, bool AllowNonIdentifiers, bool AllowNestedNameSpecifiers)
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.
void LoadExternalWeakUndeclaredIdentifiers()
Load weak undeclared identifiers from the external source.
Represents a C++ constructor within a class.
TemplateName SubstTemplateName(NestedNameSpecifierLoc QualifierLoc, TemplateName Name, SourceLocation Loc, const MultiLevelTemplateArgumentList &TemplateArgs)
unsigned NonInstantiationEntries
The number of ActiveTemplateInstantiation entries in ActiveTemplateInstantiations that are not actual...
StmtResult ActOnOpenMPTargetDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp target' after parsing of the associated statement.
void CodeCompleteObjCMessageReceiver(Scope *S)
void CodeCompleteObjCPropertyGetter(Scope *S)
bool MergeCXXFunctionDecl(FunctionDecl *New, FunctionDecl *Old, Scope *S)
bool CheckVariableDeclaration(VarDecl *NewVD, LookupResult &Previous)
Perform semantic checking on a newly-created variable declaration.
enum clang::Sema::ActiveTemplateInstantiation::InstantiationKind Kind
ExprResult ActOnGNUNullExpr(SourceLocation TokenLoc)
void * SaveNestedNameSpecifierAnnotation(CXXScopeSpec &SS)
Given a C++ nested-name-specifier, produce an annotation value that the parser can use later to recon...
bool checkObjCKindOfType(QualType &type, SourceLocation loc)
void CheckCXXDefaultArguments(FunctionDecl *FD)
void CodeCompleteCall(Scope *S, Expr *Fn, ArrayRef< Expr * > Args)
const TemplateArgument * TemplateArgs
The list of template arguments we are substituting, if they are not part of the entity.
OptimizeNoneAttr * mergeOptimizeNoneAttr(Decl *D, SourceRange Range, unsigned AttrSpellingListIndex)
VerifyICEDiagnoser(bool Suppress=false)
RAII object to handle the state changes required to synthesize a function body.
bool isValidPointerAttrType(QualType T, bool RefOkay=false)
DeclGroupPtrTy BuildDeclaratorGroup(MutableArrayRef< Decl * > Group, bool TypeMayContainAuto=true)
void ArgumentDependentLookup(DeclarationName Name, SourceLocation Loc, ArrayRef< Expr * > Args, ADLResult &Functions)
StmtResult ActOnOpenMPParallelDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp parallel' after parsing of the associated statement.
CXXMethodDecl * DeclareImplicitMoveAssignment(CXXRecordDecl *ClassDecl)
Declare the implicit move assignment operator for the given class.
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.
void DiagnoseInvalidJumps(Stmt *Body)
Retains information about a function, method, or block that is currently being parsed.
StmtResult ActOnDoStmt(SourceLocation DoLoc, Stmt *Body, SourceLocation WhileLoc, SourceLocation CondLParen, Expr *Cond, SourceLocation CondRParen)
CXXConstructorDecl * LookupMovingConstructor(CXXRecordDecl *Class, unsigned Quals)
Look up the moving constructor for the given class.
bool DiagnoseClassNameShadow(DeclContext *DC, DeclarationNameInfo Info)
bool CheckVectorCast(SourceRange R, QualType VectorTy, QualType Ty, CastKind &Kind)
void ActOnDefaultCtorInitializers(Decl *CDtorDecl)
ModuleLoader & getModuleLoader() const
Retrieve the module loader associated with the preprocessor.
void ActOnObjCReenterContainerContext(DeclContext *DC)
bool UseArgumentDependentLookup(const CXXScopeSpec &SS, const LookupResult &R, bool HasTrailingLParen)
RAII object that enters a new expression evaluation context.
void ActOnStartDelayedMemberDeclarations(Scope *S, Decl *Record)
void HandleDependentAccessCheck(const DependentDiagnostic &DD, const MultiLevelTemplateArgumentList &TemplateArgs)
PartialDiagnostic PDiag(unsigned DiagID=0)
Build a partial diagnostic.
NamedDecl * LazilyCreateBuiltin(IdentifierInfo *II, unsigned ID, Scope *S, bool ForRedeclaration, SourceLocation Loc)
CXXMethodDecl * LookupCopyingAssignment(CXXRecordDecl *Class, unsigned Quals, bool RValueThis, unsigned ThisQuals)
Look up the copying assignment operator for the given class.
ExprResult PerformObjectArgumentInitialization(Expr *From, NestedNameSpecifier *Qualifier, NamedDecl *FoundDecl, CXXMethodDecl *Method)
IfExistsResult
Describes the result of an "if-exists" condition check.
std::pair< CXXRecordDecl *, CXXSpecialMember > SpecialMemberDecl
Information about one declarator, including the parsed type information and the identifier.
StmtResult ActOnObjCAtTryStmt(SourceLocation AtLoc, Stmt *Try, MultiStmtArg Catch, Stmt *Finally)
DiagnosticsEngine & Diags
OMPClause * ActOnOpenMPFinalClause(Expr *Condition, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'final' clause.
ObjCMethodDecl * tryCaptureObjCSelf(SourceLocation Loc)
Try to capture an implicit reference to 'self'.
void ActOnForEachDeclStmt(DeclGroupPtrTy Decl)
ExprResult CheckConditionVariable(VarDecl *ConditionVar, SourceLocation StmtLoc, bool ConvertToBoolean)
Check the use of the given variable as a C++ condition in an if, while, do-while, or switch statement...
OverloadKind CheckOverload(Scope *S, FunctionDecl *New, const LookupResult &OldDecls, NamedDecl *&OldDecl, bool IsForUsingDecl)
DeclContext * computeDeclContext(QualType T)
Compute the DeclContext that is associated with the given type.
ExtProtoInfo - Extra information about a function prototype.
TypeSourceInfo * SubstFunctionDeclType(TypeSourceInfo *T, const MultiLevelTemplateArgumentList &TemplateArgs, SourceLocation Loc, DeclarationName Entity, CXXRecordDecl *ThisContext, unsigned ThisTypeQuals)
AccessResult CheckDestructorAccess(SourceLocation Loc, CXXDestructorDecl *Dtor, const PartialDiagnostic &PDiag, QualType objectType=QualType())
std::string getDeletedOrUnavailableSuffix(const FunctionDecl *FD)
Retrieve the message suffix that should be added to a diagnostic complaining about the given function...
TypeSpecifierType
Specifies the kind of type.
virtual void ReadDelegatingConstructors(SmallVectorImpl< CXXConstructorDecl * > &Decls)
Read the set of delegating constructors known to the external Sema source.
void CheckLookupAccess(const LookupResult &R)
Checks access to all the declarations in the given result set.
Represents a variable template specialization, which refers to a variable template with a given set o...
void ActOnTagFinishSkippedDefinition(SkippedDefinitionContext Context)
void diagnose(Sema &S, SourceLocation Loc, QualType T) override
void ActOnObjCTemporaryExitContainerContext(DeclContext *DC)
Invoked when we must temporarily exit the objective-c container scope for parsing/looking-up C constr...
RAII object used to temporarily allow the C++ 'this' expression to be used, with the given qualifiers...
QualType ExtractUnqualifiedFunctionType(QualType PossiblyAFunctionType)
ExprResult ParseObjCStringLiteral(SourceLocation *AtLocs, Expr **Strings, unsigned NumStrings)
The lookup found a single 'cooked' literal operator, which expects a normal literal to be built and p...
BoundTypeDiagnoser(unsigned DiagID, const Ts &...Args)
ExprResult CreateOverloadedUnaryOp(SourceLocation OpLoc, unsigned Opc, const UnresolvedSetImpl &Fns, Expr *input)
Create a unary operation that may resolve to an overloaded operator.
void ActOnStartStmtExpr()
bool AddOverriddenMethods(CXXRecordDecl *DC, CXXMethodDecl *MD)
SpecialMemberOverloadResult * LookupSpecialMember(CXXRecordDecl *D, CXXSpecialMember SM, bool ConstArg, bool VolatileArg, bool RValueThis, bool ConstThis, bool VolatileThis)
void Clear() const
Clear out the current diagnostic.
Stores a list of template parameters for a TemplateDecl and its derived classes.
MangleNumberingContext & getMangleNumberingContext(ASTContext &Ctx)
Retrieve the mangling numbering context, used to consistently number constructs like lambdas for mang...
TemplateArgumentLoc SubstDefaultTemplateArgumentIfAvailable(TemplateDecl *Template, SourceLocation TemplateLoc, SourceLocation RAngleLoc, Decl *Param, SmallVectorImpl< TemplateArgument > &Converted, bool &HasDefaultArg)
If the given template parameter has a default template argument, substitute into that default templat...
Describes how types, statements, expressions, and declarations should be printed. ...
Code completion occurs within an Objective-C implementation or category implementation.
void ActOnCXXExitDeclaratorScope(Scope *S, const CXXScopeSpec &SS)
StmtResult ActOnOpenMPBarrierDirective(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp barrier'.
ObjCMethodDecl * ValueWithBytesObjCTypeMethod
The declaration of the valueWithBytes:objCType: method.
NamedDecl * ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamLists, bool &AddToScope)
llvm::MapVector< Selector, SourceLocation > ReferencedSelectors
Decl * ActOnParamDeclarator(Scope *S, Declarator &D)
bool IsDecltype
Whether we are in a decltype expression.
StmtResult FinishObjCForCollectionStmt(Stmt *ForCollection, Stmt *Body)
SmallVector< CallExpr *, 8 > CallsUndergoingInstantiation
The stack of calls expression undergoing template instantiation.
void DefineImplicitLambdaToFunctionPointerConversion(SourceLocation CurrentLoc, CXXConversionDecl *Conv)
Define the "body" of the conversion from a lambda object to a function pointer.
ExprResult BuildUnaryOp(Scope *S, SourceLocation OpLoc, UnaryOperatorKind Opc, Expr *Input)
bool IsIntegralPromotion(Expr *From, QualType FromType, QualType ToType)
static NameClassification NestedNameSpecifier()
SourceLocation PragmaLocation
TemplateParameterList * ActOnTemplateParameterList(unsigned Depth, SourceLocation ExportLoc, SourceLocation TemplateLoc, SourceLocation LAngleLoc, Decl **Params, unsigned NumParams, SourceLocation RAngleLoc)
bool canSkipFunctionBody(Decl *D)
Determine whether we can skip parsing the body of a function definition, assuming we don't care about...
bool tryCaptureVariable(VarDecl *Var, SourceLocation Loc, TryCaptureKind Kind, SourceLocation EllipsisLoc, bool BuildAndDiagnose, QualType &CaptureType, QualType &DeclRefType, const unsigned *const FunctionScopeIndexToStopAt)
Try to capture the given variable.
Decl * ActOnFriendTypeDecl(Scope *S, const DeclSpec &DS, MultiTemplateParamsArg TemplateParams)
bool SpecialMemberIsTrivial(CXXMethodDecl *MD, CXXSpecialMember CSM, bool Diagnose=false)
AssignConvertType CheckSingleAssignmentConstraints(QualType LHSType, ExprResult &RHS, bool Diagnose=true, bool DiagnoseCFAudited=false)
ParmVarDecl - Represents a parameter to a function.
CXXRecordDecl * createLambdaClosureType(SourceRange IntroducerRange, TypeSourceInfo *Info, bool KnownDependent, LambdaCaptureDefault CaptureDefault)
Create a new lambda closure type.
SourceLocation PointOfInstantiation
The point of instantiation within the source code.
OpenCLOptions & getOpenCLOptions()
ObjCInterfaceDecl * NSDictionaryDecl
The declaration of the Objective-C NSDictionary class.
FPOptions & getFPOptions()
void MarkAsLateParsedTemplate(FunctionDecl *FD, Decl *FnD, CachedTokens &Toks)
FormatAttr * mergeFormatAttr(Decl *D, SourceRange Range, IdentifierInfo *Format, int FormatIdx, int FirstArg, unsigned AttrSpellingListIndex)
void setTagNameForLinkagePurposes(TagDecl *TagFromDeclSpec, TypedefNameDecl *NewTD)
void MergeVarDeclExceptionSpecs(VarDecl *New, VarDecl *Old)
Merge the exception specifications of two variable declarations.
void ActOnUninitializedDecl(Decl *dcl, bool TypeMayContainAuto)
Information about a template-id annotation token.
static SourceRange getPrintable(TypeLoc TL)
void setMethod(CXXMethodDecl *MD)
ExprResult ActOnCallExpr(Scope *S, Expr *Fn, SourceLocation LParenLoc, MultiExprArg ArgExprs, SourceLocation RParenLoc, Expr *ExecConfig=nullptr, bool IsExecConfig=false)
void DefineImplicitMoveConstructor(SourceLocation CurrentLocation, CXXConstructorDecl *Constructor)
void threadSafetyCleanup(BeforeSet *Cache)
FieldDecl * HandleField(Scope *S, RecordDecl *TagD, SourceLocation DeclStart, Declarator &D, Expr *BitfieldWidth, InClassInitStyle InitStyle, AccessSpecifier AS)
void ProcessPropertyDecl(ObjCPropertyDecl *property, ObjCContainerDecl *CD, ObjCPropertyDecl *redeclaredProperty=nullptr, ObjCContainerDecl *lexicalDC=nullptr)
ExprResult PerformImplicitConversion(Expr *From, QualType ToType, AssignmentAction Action, bool AllowExplicit=false)
QualType CheckConstructorDeclarator(Declarator &D, QualType R, StorageClass &SC)
void CheckDelayedMemberExceptionSpecs()
void MarkDeclarationsReferencedInType(SourceLocation Loc, QualType T)
Decl * ActOnAtEnd(Scope *S, SourceRange AtEnd, ArrayRef< Decl * > allMethods=None, ArrayRef< DeclGroupPtrTy > allTUVars=None)
Base wrapper for a particular "section" of type source info.
void CodeCompleteOrdinaryName(Scope *S, ParserCompletionContext CompletionContext)
void MarkAnyDeclReferenced(SourceLocation Loc, Decl *D, bool OdrUse)
Perform marking for a reference to an arbitrary declaration. It marks the declaration referenced...
QualType BuildMemberPointerType(QualType T, QualType Class, SourceLocation Loc, DeclarationName Entity)
Build a member pointer type T Class::*.
void CodeCompleteConstructor(Scope *S, QualType Type, SourceLocation Loc, ArrayRef< Expr * > Args)
Expr * FixOverloadedFunctionReference(Expr *E, DeclAccessPair FoundDecl, FunctionDecl *Fn)
AccessResult CheckFriendAccess(NamedDecl *D)
Checks access to the target of a friend declaration.
ActiveTemplateInstantiation LastTemplateInstantiationErrorContext
The last template from which a template instantiation error or warning was produced.
Decl * ActOnAliasDeclaration(Scope *CurScope, AccessSpecifier AS, MultiTemplateParamsArg TemplateParams, SourceLocation UsingLoc, UnqualifiedId &Name, AttributeList *AttrList, TypeResult Type, Decl *DeclFromDeclSpec)
QualType FindCompositeObjCPointerType(ExprResult &LHS, ExprResult &RHS, SourceLocation QuestionLoc)
void LoadExternalVTableUses()
Load any externally-stored vtable uses.
void FreeVisContext()
FreeVisContext - Deallocate and null out VisContext.
bool LookupInSuper(LookupResult &R, CXXRecordDecl *Class)
Perform qualified name lookup into all base classes of the given class.
The message is a class message, and the identifier is a type name.
ExprResult UsualUnaryConversions(Expr *E)
friend const SemaDiagnosticBuilder & operator<<(const SemaDiagnosticBuilder &Diag, const T &Value)
Teach operator<< to produce an object of the correct type.
ExprResult ActOnPostfixUnaryOp(Scope *S, SourceLocation OpLoc, tok::TokenKind Kind, Expr *Input)
bool isDependentScopeSpecifier(const CXXScopeSpec &SS)
void PrintInstantiationStack()
Prints the current instantiation stack through a series of notes.
ContextualImplicitConverter(bool Suppress=false, bool SuppressConversion=false)
bool ActOnCXXNestedNameSpecifierDecltype(CXXScopeSpec &SS, const DeclSpec &DS, SourceLocation ColonColonLoc)
Represents a class template specialization, which refers to a class template with a given set of temp...
std::unique_ptr< NSAPI > NSAPIObj
Caches identifiers/selectors for NSFoundation APIs.
LocalInstantiationScope * CurrentInstantiationScope
The current instantiation scope used to store local variables.
void MarkUnusedFileScopedDecl(const DeclaratorDecl *D)
If it's a file scoped decl that must warn if not used, keep track of it.
bool hasAnyUnrecoverableErrorsInThisFunction() const
Determine whether any errors occurred within this function/method/ block.
The lookup found a single 'raw' literal operator, which expects a string literal containing the spell...
Decl * ActOnNamespaceAliasDef(Scope *CurScope, SourceLocation NamespaceLoc, SourceLocation AliasLoc, IdentifierInfo *Alias, CXXScopeSpec &SS, SourceLocation IdentLoc, IdentifierInfo *Ident)
DeclarationNameInfo GetNameFromUnqualifiedId(const UnqualifiedId &Name)
Retrieves the declaration name from a parsed unqualified-id.
sema::DelayedDiagnosticPool * getCurrentPool() const
Returns the current delayed-diagnostics pool.
QualType SubstAutoType(QualType TypeWithAuto, QualType Replacement)
Substitute Replacement for auto in TypeWithAuto.
void RegisterLocallyScopedExternCDecl(NamedDecl *ND, Scope *S)
Register the given locally-scoped extern "C" declaration so that it can be found later for redeclarat...
SavePendingLocalImplicitInstantiationsRAII(Sema &S)
OpaquePtr< QualType > ParsedType
void DiagnoseUnusedExprResult(const Stmt *S)
void MergeVarDeclTypes(VarDecl *New, VarDecl *Old, bool MergeTypeWithOld)
ExceptionSpecificationType getExceptionSpecType() const
Get the computed exception specification type.
void DiagnoseTemplateParameterShadow(SourceLocation Loc, Decl *PrevDecl)
void CodeCompleteObjCInterfaceDecl(Scope *S)
An element in an Objective-C dictionary literal.
Enumerator value with fixed underlying type.
Decl * ActOnUsingDeclaration(Scope *CurScope, AccessSpecifier AS, bool HasUsingKeyword, SourceLocation UsingLoc, CXXScopeSpec &SS, UnqualifiedId &Name, AttributeList *AttrList, bool HasTypenameKeyword, SourceLocation TypenameLoc)
DeclGroupPtrTy ActOnForwardClassDeclaration(SourceLocation Loc, IdentifierInfo **IdentList, SourceLocation *IdentLocs, ArrayRef< ObjCTypeParamList * > TypeParamLists, unsigned NumElts)
sema::LambdaScopeInfo * getCurGenericLambda()
Retrieve the current generic lambda info, if any.
Value of a non-type template parameter.
ExprResult RebuildExprInCurrentInstantiation(Expr *E)
void AddArgumentDependentLookupCandidates(DeclarationName Name, SourceLocation Loc, ArrayRef< Expr * > Args, TemplateArgumentListInfo *ExplicitTemplateArgs, OverloadCandidateSet &CandidateSet, bool PartialOverloading=false)
Add function candidates found via argument-dependent lookup to the set of overloading candidates...
VarDecl * getCopyElisionCandidate(QualType ReturnType, Expr *E, bool AllowFunctionParameters)
Determine whether the given expression is a candidate for copy elision in either a return statement o...
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.
NestedNameSpecifierLoc SubstNestedNameSpecifierLoc(NestedNameSpecifierLoc NNS, const MultiLevelTemplateArgumentList &TemplateArgs)
DeclGroupPtrTy ActOnForwardProtocolDeclaration(SourceLocation AtProtoclLoc, const IdentifierLocPair *IdentList, unsigned NumElts, AttributeList *attrList)
ActOnForwardProtocolDeclaration - Handle @protocol foo;.
The results of name lookup within a DeclContext. This is either a single result (with no stable stora...
bool CheckQualifiedMemberReference(Expr *BaseExpr, QualType BaseType, const CXXScopeSpec &SS, const LookupResult &R)
QualType BuildParenType(QualType T)
Build a paren type including T.
bool SetCtorInitializers(CXXConstructorDecl *Constructor, bool AnyErrors, ArrayRef< CXXCtorInitializer * > Initializers=None)
void ActOnTagStartDefinition(Scope *S, Decl *TagDecl)
bool CheckEnumUnderlyingType(TypeSourceInfo *TI)
Check that this is a valid underlying type for an enum declaration.
bool CheckDependentFunctionTemplateSpecialization(FunctionDecl *FD, const TemplateArgumentListInfo &ExplicitTemplateArgs, LookupResult &Previous)
Perform semantic analysis for the given dependent function template specialization.
Decl * ActOnNonTypeTemplateParameter(Scope *S, Declarator &D, unsigned Depth, unsigned Position, SourceLocation EqualLoc, Expr *DefaultArg)
OMPClause * ActOnOpenMPDependClause(OpenMPDependClauseKind DepKind, SourceLocation DepLoc, SourceLocation ColonLoc, ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'depend' clause.
Base class for callback objects used by Sema::CorrectTypo to check the validity of a potential typo c...
ImplicitExceptionSpecification(Sema &Self)
FunctionScopeRAII(Sema &S)
BaseResult ActOnBaseSpecifier(Decl *classdecl, SourceRange SpecifierRange, ParsedAttributes &Attrs, bool Virtual, AccessSpecifier Access, ParsedType basetype, SourceLocation BaseLoc, SourceLocation EllipsisLoc)
sema::BlockScopeInfo * getCurBlock()
Retrieve the current block, if any.
FileNullability & operator[](FileID file)
void checkExceptionSpecification(bool IsTopLevel, ExceptionSpecificationType EST, ArrayRef< ParsedType > DynamicExceptions, ArrayRef< SourceRange > DynamicExceptionRanges, Expr *NoexceptExpr, SmallVectorImpl< QualType > &Exceptions, FunctionProtoType::ExceptionSpecInfo &ESI)
Check the given exception-specification and update the exception specification information with the r...
bool isAcceptableTagRedeclaration(const TagDecl *Previous, TagTypeKind NewTag, bool isDefinition, SourceLocation NewTagLoc, const IdentifierInfo *Name)
Determine whether a tag with a given kind is acceptable as a redeclaration of the given tag declarati...
VarDecl * BuildExceptionDeclaration(Scope *S, TypeSourceInfo *TInfo, SourceLocation StartLoc, SourceLocation IdLoc, IdentifierInfo *Id)
Perform semantic analysis for the variable declaration that occurs within a C++ catch clause...
void LookupVisibleDecls(Scope *S, LookupNameKind Kind, VisibleDeclConsumer &Consumer, bool IncludeGlobalScope=true)
CXXRecordDecl * getCurrentInstantiationOf(NestedNameSpecifier *NNS)
If the given nested name specifier refers to the current instantiation, return the declaration that c...
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.
void diagnoseARCUnbridgedCast(Expr *e)
bool ShouldEnterDeclaratorScope(Scope *S, const CXXScopeSpec &SS)
Decl * Entity
The entity that is being instantiated.
threadSafety::BeforeSet * ThreadSafetyDeclCache
DeclGroupPtrTy ConvertDeclToDeclGroup(Decl *Ptr, Decl *OwnedType=nullptr)
The arguments included an overloaded function name that could not be resolved to a suitable function...
void ActOnBaseSpecifiers(Decl *ClassDecl, CXXBaseSpecifier **Bases, unsigned NumBases)
void AddBuiltinOperatorCandidates(OverloadedOperatorKind Op, SourceLocation OpLoc, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet)
ObjCInterfaceDecl * NSValueDecl
The declaration of the Objective-C NSValue class.
ExprResult CheckObjCForCollectionOperand(SourceLocation forLoc, Expr *collection)
UnaryExprOrTypeTrait
Names for the "expression or type" traits.
bool buildOverloadedCallSet(Scope *S, Expr *Fn, UnresolvedLookupExpr *ULE, MultiExprArg Args, SourceLocation RParenLoc, OverloadCandidateSet *CandidateSet, ExprResult *Result)
Constructs and populates an OverloadedCandidateSet from the given function.
StmtResult ActOnForStmt(SourceLocation ForLoc, SourceLocation LParenLoc, Stmt *First, FullExprArg Second, Decl *SecondVar, FullExprArg Third, SourceLocation RParenLoc, Stmt *Body)
void ActOnEndOfTranslationUnit()
ExprResult CreateOverloadedBinOp(SourceLocation OpLoc, unsigned Opc, const UnresolvedSetImpl &Fns, Expr *LHS, Expr *RHS)
Create a binary operation that may resolve to an overloaded operator.
TypeResult ActOnTemplateIdType(CXXScopeSpec &SS, SourceLocation TemplateKWLoc, TemplateTy Template, SourceLocation TemplateLoc, SourceLocation LAngleLoc, ASTTemplateArgsPtr TemplateArgs, SourceLocation RAngleLoc, bool IsCtorOrDtorName=false)
void CodeCompleteObjCInterfaceCategory(Scope *S, IdentifierInfo *ClassName, SourceLocation ClassNameLoc)
const internal::VariadicAllOfMatcher< Decl > decl
Matches declarations.
void StartOpenMPDSABlock(OpenMPDirectiveKind K, const DeclarationNameInfo &DirName, Scope *CurScope, SourceLocation Loc)
Called on start of new data sharing attribute block.
llvm::MapVector< const FunctionDecl *, LateParsedTemplate * > LateParsedTemplateMapT
Code completion occurs following one or more template headers within a class.
QualType adjustCCAndNoReturn(QualType ArgFunctionType, QualType FunctionType)
void DiagnoseEqualityWithExtraParens(ParenExpr *ParenE)
Redundant parentheses over an equality comparison can indicate that the user intended an assignment u...
ParsedType ActOnObjCInstanceType(SourceLocation Loc)
The parser has parsed the context-sensitive type 'instancetype' in an Objective-C message declaration...
ExprResult BuildClassMessageImplicit(QualType ReceiverType, bool isSuperReceiver, SourceLocation Loc, Selector Sel, ObjCMethodDecl *Method, MultiExprArg Args)
ExprResult ActOnCXXUuidof(SourceLocation OpLoc, SourceLocation LParenLoc, bool isType, void *TyOrExpr, SourceLocation RParenLoc)
ActOnCXXUuidof - Parse __uuidof( something ).
ExprResult BuildArrayTypeTrait(ArrayTypeTrait ATT, SourceLocation KWLoc, TypeSourceInfo *TSInfo, Expr *DimExpr, SourceLocation RParen)
ObjCSubscriptKind CheckSubscriptingKind(Expr *FromE)
void CodeCompleteCase(Scope *S)
SkipBodyInfo shouldSkipAnonEnumBody(Scope *S, IdentifierInfo *II, SourceLocation IILoc)
ExprResult PerformContextuallyConvertToObjCPointer(Expr *From)
StmtResult ActOnOpenMPCriticalDirective(const DeclarationNameInfo &DirName, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp critical' after parsing of the associated statement.
StmtResult ActOnOpenMPOrderedDirective(Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp ordered' after parsing of the associated statement.
ParsingDeclState PushParsingDeclaration(sema::DelayedDiagnosticPool &pool)
ExprResult ActOnCXXNullPtrLiteral(SourceLocation Loc)
ActOnCXXNullPtrLiteral - Parse 'nullptr'.
The fixed underlying type of an enumeration.
void CheckMain(FunctionDecl *FD, const DeclSpec &D)
Represents a C++ member access expression for which lookup produced a set of overloaded functions...
void CodeCompletePreprocessorMacroArgument(Scope *S, IdentifierInfo *Macro, MacroInfo *MacroInfo, unsigned Argument)
LazyVector< VarDecl *, ExternalSemaSource,&ExternalSemaSource::ReadTentativeDefinitions, 2, 2 > TentativeDefinitionsType
TypedefDecl * ParseTypedefDecl(Scope *S, Declarator &D, QualType T, TypeSourceInfo *TInfo)
Subroutines of ActOnDeclarator().
Defines some OpenMP-specific enums and functions.
bool CheckParameterPacksForExpansion(SourceLocation EllipsisLoc, SourceRange PatternRange, ArrayRef< UnexpandedParameterPack > Unexpanded, const MultiLevelTemplateArgumentList &TemplateArgs, bool &ShouldExpand, bool &RetainExpansion, Optional< unsigned > &NumExpansions)
Determine whether we could expand a pack expansion with the given set of parameter packs into separat...
bool hasAnyAcceptableTemplateNames(LookupResult &R, bool AllowFunctionTemplates=true)
bool DiagnoseUnknownTemplateName(const IdentifierInfo &II, SourceLocation IILoc, Scope *S, const CXXScopeSpec *SS, TemplateTy &SuggestedTemplate, TemplateNameKind &SuggestedKind)
ExprResult ActOnObjCBoolLiteral(SourceLocation OpLoc, tok::TokenKind Kind)
ActOnObjCBoolLiteral - Parse {__objc_yes,__objc_no} literals.
Decl * ActOnEnumConstant(Scope *S, Decl *EnumDecl, Decl *LastEnumConstant, SourceLocation IdLoc, IdentifierInfo *Id, AttributeList *Attrs, SourceLocation EqualLoc, Expr *Val)
bool isMicrosoftMissingTypename(const CXXScopeSpec *SS, Scope *S)
bool CheckMemberSpecialization(NamedDecl *Member, LookupResult &Previous)
Perform semantic analysis for the given non-template member specialization.
void ActOnFinishDelayedAttribute(Scope *S, Decl *D, ParsedAttributes &Attrs)
bool DefineUsedVTables()
Define all of the vtables that have been used in this translation unit and reference any virtual memb...
bool ConversionToObjCStringLiteralCheck(QualType DstType, Expr *&SrcExpr)
Represents an access specifier followed by colon ':'.
DeclarationNameInfo SubstDeclarationNameInfo(const DeclarationNameInfo &NameInfo, const MultiLevelTemplateArgumentList &TemplateArgs)
Do template substitution on declaration name info.
ParsedType getDestructorName(SourceLocation TildeLoc, IdentifierInfo &II, SourceLocation NameLoc, Scope *S, CXXScopeSpec &SS, ParsedType ObjectType, bool EnteringContext)
bool isOpenMPPrivateVar(VarDecl *VD, unsigned Level)
QualType CheckConditionalOperands(ExprResult &Cond, ExprResult &LHS, ExprResult &RHS, ExprValueKind &VK, ExprObjectKind &OK, SourceLocation QuestionLoc)
The type of a non-type template parameter.
void AddConversionCandidate(CXXConversionDecl *Conversion, DeclAccessPair FoundDecl, CXXRecordDecl *ActingContext, Expr *From, QualType ToType, OverloadCandidateSet &CandidateSet, bool AllowObjCConversionOnExplicit)
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.
void redelayDiagnostics(sema::DelayedDiagnosticPool &pool)
Decl * ActOnTag(Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc, CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc, AttributeList *Attr, AccessSpecifier AS, SourceLocation ModulePrivateLoc, MultiTemplateParamsArg TemplateParameterLists, bool &OwnedDecl, bool &IsDependent, SourceLocation ScopedEnumKWLoc, bool ScopedEnumUsesClassTag, TypeResult UnderlyingType, bool IsTypeSpecifier, SkipBodyInfo *SkipBody=nullptr)
This is invoked when we see 'struct foo' or 'struct {'. In the former case, Name will be non-null...
void PopExpressionEvaluationContext()
void FinalizeVarWithDestructor(VarDecl *VD, const RecordType *DeclInitType)
OverloadKind
C++ Overloading.
void CheckObjCBridgeRelatedCast(QualType castType, Expr *castExpr)
void EndOpenMPClause()
End analysis of clauses.
void CheckExtraCXXDefaultArguments(Declarator &D)
void adjustMemberFunctionCC(QualType &T, bool IsStatic)
SourceRange getExprRange(Expr *E) const
Stmt * MaybeCreateStmtWithCleanups(Stmt *SubStmt)
static bool adjustContextForLocalExternDecl(DeclContext *&DC)
OMPClause * ActOnOpenMPSharedClause(ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'shared' clause.
Code completion occurs where only a type is permitted.
Describes a module or submodule.
void DiagnoseEmptyLoopBody(const Stmt *S, const Stmt *PossibleBody)
llvm::BumpPtrAllocator BumpAlloc
ObjCMethodDecl * LookupFactoryMethodInGlobalPool(Selector Sel, SourceRange R, bool receiverIdOrClass=false)
void ActOnAbortSEHFinallyBlock()
This little struct is used to capture information about structure field declarators, which is basically just a bitfield size.
void NoteDeletedFunction(FunctionDecl *FD)
Emit a note explaining that this function is deleted.
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.
LabelDecl * GetOrCreateMSAsmLabel(StringRef ExternalLabelName, SourceLocation Location, bool AlwaysCreate)
Code completion occurs at top-level or namespace context.
StmtResult BuildMSDependentExistsStmt(SourceLocation KeywordLoc, bool IsIfExists, NestedNameSpecifierLoc QualifierLoc, DeclarationNameInfo NameInfo, Stmt *Nested)
ExprResult ActOnBooleanCondition(Scope *S, SourceLocation Loc, Expr *SubExpr)
SemaDiagnosticBuilder(DiagnosticBuilder &DB, Sema &SemaRef, unsigned DiagID)
void InstantiateMemInitializers(CXXConstructorDecl *New, const CXXConstructorDecl *Tmpl, const MultiLevelTemplateArgumentList &TemplateArgs)
ExprResult ActOnStartCXXMemberReference(Scope *S, Expr *Base, SourceLocation OpLoc, tok::TokenKind OpKind, ParsedType &ObjectType, bool &MayBePseudoDestructor)
void CodeCompleteLambdaIntroducer(Scope *S, LambdaIntroducer &Intro, bool AfterAmpersand)
ExprResult ActOnDependentIdExpression(const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, const DeclarationNameInfo &NameInfo, bool isAddressOfOperand, const TemplateArgumentListInfo *TemplateArgs)
An allocator used specifically for the purpose of code completion.
unsigned TyposCorrected
The number of typos corrected by CorrectTypo.
void ActOnDefs(Scope *S, Decl *TagD, SourceLocation DeclStart, IdentifierInfo *ClassName, SmallVectorImpl< Decl * > &Decls)
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...
void AddMethodTemplateCandidate(FunctionTemplateDecl *MethodTmpl, DeclAccessPair FoundDecl, CXXRecordDecl *ActingContext, TemplateArgumentListInfo *ExplicitTemplateArgs, QualType ObjectType, Expr::Classification ObjectClassification, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, bool SuppressUserConversions=false, bool PartialOverloading=false)
Add a C++ member function template as a candidate to the candidate set, using template argument deduc...
void MatchAllMethodDeclarations(const SelectorSet &InsMap, const SelectorSet &ClsMap, SelectorSet &InsMapSeen, SelectorSet &ClsMapSeen, ObjCImplDecl *IMPDecl, ObjCContainerDecl *IDecl, bool &IncompleteImpl, bool ImmediateClass, bool WarnCategoryMethodImpl=false)
void CheckStaticArrayArgument(SourceLocation CallLoc, ParmVarDecl *Param, const Expr *ArgExpr)
bool checkInitMethod(ObjCMethodDecl *method, QualType receiverTypeIfCall)
void AddAssumeAlignedAttr(SourceRange AttrRange, Decl *D, Expr *E, Expr *OE, unsigned SpellingListIndex)
StmtResult ActOnOpenMPForDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, llvm::DenseMap< VarDecl *, Expr * > &VarsWithImplicitDSA)
Called on well-formed '#pragma omp for' after parsing of the associated statement.
ExprResult ActOnBlockStmtExpr(SourceLocation CaretLoc, Stmt *Body, Scope *CurScope)
ExprResult ActOnGenericSelectionExpr(SourceLocation KeyLoc, SourceLocation DefaultLoc, SourceLocation RParenLoc, Expr *ControllingExpr, ArrayRef< ParsedType > ArgTypes, ArrayRef< Expr * > ArgExprs)
ExprResult ActOnCXXThrow(Scope *S, SourceLocation OpLoc, Expr *expr)
ActOnCXXThrow - Parse throw expressions.
StmtResult ActOnCXXTryBlock(SourceLocation TryLoc, Stmt *TryBlock, ArrayRef< Stmt * > Handlers)
Represents a C++ unqualified-id that has been parsed.
bool isFunctionConsideredUnavailable(FunctionDecl *FD)
Checks availability of the function depending on the current function context.Inside an unavailable f...
bool findMacroSpelling(SourceLocation &loc, StringRef name)
Looks through the macro-expansion chain for the given location, looking for a macro expansion with th...
Look up implicit 'self' parameter of an objective-c method.
TypeDiagnoser(bool Suppressed=false)
void ActOnPragmaMSSection(SourceLocation PragmaLocation, int SectionFlags, StringLiteral *SegmentName)
Called on well formed #pragma section().
The current expression is potentially evaluated, but any declarations referenced inside that expressi...
StmtResult ActOnOpenMPAtomicDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp atomic' after parsing of the associated statement.
NamespaceDecl * getOrCreateStdNamespace()
Retrieve the special "std" namespace, which may require us to implicitly define the namespace...
ExprResult ActOnCUDAExecConfigExpr(Scope *S, SourceLocation LLLLoc, MultiExprArg ExecConfig, SourceLocation GGGLoc)
Represents the results of name lookup.
static const std::string & getPrintable(const std::string &S)
ExprResult CallExprUnaryConversions(Expr *E)
ObjCMethodDecl * LookupImplementedMethodInGlobalPool(Selector Sel)
void DeclareGlobalNewDelete()
TypeVisibilityAttr * mergeTypeVisibilityAttr(Decl *D, SourceRange Range, TypeVisibilityAttr::VisibilityType Vis, unsigned AttrSpellingListIndex)
void mergeDeclAttributes(NamedDecl *New, Decl *Old, AvailabilityMergeKind AMK=AMK_Redeclaration)
mergeDeclAttributes - Copy attributes from the Old decl to the New one.
bool DiagnoseUnexpandedParameterPacks(SourceLocation Loc, UnexpandedParameterPackContext UPPC, ArrayRef< UnexpandedParameterPack > Unexpanded)
Diagnose unexpanded parameter packs.
bool DiagnoseUseOfDecl(NamedDecl *D, SourceLocation Loc, const ObjCInterfaceDecl *UnknownObjCClass=nullptr, bool ObjCPropertyAccess=false)
Determine whether the use of this declaration is valid, and emit any corresponding diagnostics...
RAII class used to indicate that we are performing provisional semantic analysis to determine the val...
static DeclAccessPair make(NamedDecl *D, AccessSpecifier AS)
ExprResult MaybeConvertParenListExprToParenExpr(Scope *S, Expr *ME)
MinSizeAttr * mergeMinSizeAttr(Decl *D, SourceRange Range, unsigned AttrSpellingListIndex)
void ActOnBlockStart(SourceLocation CaretLoc, Scope *CurScope)
ActOnBlockStart - This callback is invoked when a block literal is started.
ObjCMethodDecl * getCurMethodDecl()
ImplicitExceptionSpecification ComputeInheritingCtorExceptionSpec(CXXConstructorDecl *CD)
Determine what sort of exception specification an inheriting constructor of a class will have...
SourceRange InstantiationRange
The source range that covers the construct that cause the instantiation, e.g., the template-id that c...
ParsedType getTypeName(const IdentifierInfo &II, SourceLocation NameLoc, Scope *S, CXXScopeSpec *SS=nullptr, bool isClassName=false, bool HasTrailingDot=false, ParsedType ObjectType=ParsedType(), bool IsCtorOrDtorName=false, bool WantNontrivialTypeSourceInfo=false, IdentifierInfo **CorrectedII=nullptr)
If the identifier refers to a type name within this scope, return the declaration of that type...
ReferenceCompareResult CompareReferenceRelationship(SourceLocation Loc, QualType T1, QualType T2, bool &DerivedToBase, bool &ObjCConversion, bool &ObjCLifetimeConversion)
void ActOnPragmaOptionsAlign(PragmaOptionsAlignKind Kind, SourceLocation PragmaLoc)
ActOnPragmaOptionsAlign - Called on well formed #pragma options align.
void ActOnStartSEHFinallyBlock()
bool CheckCXXThrowOperand(SourceLocation ThrowLoc, QualType ThrowTy, Expr *E)
CheckCXXThrowOperand - Validate the operand of a throw.
bool AllowAbstractFieldReference
OMPClause * ActOnOpenMPReadClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'read' clause.
Scope * getNonFieldDeclScope(Scope *S)
void addLambdaParameters(CXXMethodDecl *CallOperator, Scope *CurScope)
Introduce the lambda parameters into scope.
bool isObjCMethodDecl(Decl *D)
ExprResult ActOnDesignatedInitializer(Designation &Desig, SourceLocation Loc, bool GNUSyntax, ExprResult Init)
ICEConvertDiagnoser(bool AllowScopedEnumerations, bool Suppress, bool SuppressConversion)
Code completion occurs following one or more template headers.
CXXConstructorDecl * DeclareImplicitMoveConstructor(CXXRecordDecl *ClassDecl)
Declare the implicit move constructor for the given class.
ExprResult BuildObjCNumericLiteral(SourceLocation AtLoc, Expr *Number)
bool isSpecialMemberAccessibleForDeletion(CXXMethodDecl *decl, AccessSpecifier access, QualType objectType)
The base type of a class type.
Keeps track of the mangled names of lambda expressions and block literals within a particular context...
bool checkThisInStaticMemberFunctionType(CXXMethodDecl *Method)
Check whether 'this' shows up in the type of a static member function after the (naturally empty) cv-...
void ActOnTypedefedProtocols(SmallVectorImpl< Decl * > &ProtocolRefs, IdentifierInfo *SuperName, SourceLocation SuperLoc)
void ActOnInitializerError(Decl *Dcl)
StmtResult SubstStmt(Stmt *S, const MultiLevelTemplateArgumentList &TemplateArgs)
OriginalCallArg(QualType OriginalParamType, unsigned ArgIdx, QualType OriginalArgType)
bool CheckUsingShadowDecl(UsingDecl *UD, NamedDecl *Target, const LookupResult &PreviousDecls, UsingShadowDecl *&PrevShadow)
AssignConvertType CheckAssignmentConstraints(SourceLocation Loc, QualType LHSType, QualType RHSType)
ExprResult BuildCXXNew(SourceRange Range, bool UseGlobal, SourceLocation PlacementLParen, MultiExprArg PlacementArgs, SourceLocation PlacementRParen, SourceRange TypeIdParens, QualType AllocType, TypeSourceInfo *AllocTypeInfo, Expr *ArraySize, SourceRange DirectInitRange, Expr *Initializer, bool TypeMayContainAuto=true)
void CodeCompleteMemberReferenceExpr(Scope *S, Expr *Base, SourceLocation OpLoc, bool IsArrow)
void CodeCompleteObjCPropertyFlags(Scope *S, ObjCDeclSpec &ODS)
void CheckFormatString(const StringLiteral *FExpr, const Expr *OrigFormatExpr, ArrayRef< const Expr * > Args, bool HasVAListArg, unsigned format_idx, unsigned firstDataArg, FormatStringType Type, bool inFunctionCall, VariadicCallType CallType, llvm::SmallBitVector &CheckedVarArgs)
void FilterAcceptableTemplateNames(LookupResult &R, bool AllowFunctionTemplates=true)
bool isCurrentClassNameTypo(IdentifierInfo *&II, const CXXScopeSpec *SS)
Determine whether the identifier II is a typo for the name of the class type currently being defined...
void ActOnPragmaPack(PragmaPackKind Kind, IdentifierInfo *Name, Expr *Alignment, SourceLocation PragmaLoc, SourceLocation LParenLoc, SourceLocation RParenLoc)
ActOnPragmaPack - Called on well formed #pragma pack(...).
Code completion occurs within an expression.
bool CheckOverridingFunctionExceptionSpec(const CXXMethodDecl *New, const CXXMethodDecl *Old)
bool CheckConstexprFunctionDecl(const FunctionDecl *FD)
void DefineInheritingConstructor(SourceLocation UseLoc, CXXConstructorDecl *Constructor)
Define the specified inheriting constructor.
void PopParsingDeclaration(ParsingDeclState state, Decl *decl)
NamedDecl * ActOnVariableDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamLists, bool &AddToScope)
std::pair< SourceLocation, bool > DeleteExprLoc
Delete-expressions to be analyzed at the end of translation unit.
Decl * ActOnObjCContainerStartDefinition(Decl *IDecl)
RecordDecl * CreateCapturedStmtRecordDecl(CapturedDecl *&CD, SourceLocation Loc, unsigned NumParams)
The lookup found an overload set of literal operator templates, which expect the character type and c...
Concrete class used by the front-end to report problems and issues.
ExprResult BuildAnonymousStructUnionMemberReference(const CXXScopeSpec &SS, SourceLocation nameLoc, IndirectFieldDecl *indirectField, DeclAccessPair FoundDecl=DeclAccessPair::make(nullptr, AS_none), Expr *baseObjectExpr=nullptr, SourceLocation opLoc=SourceLocation())
llvm::DenseSet< Module * > LookupModulesCache
Cache of additional modules that should be used for name lookup within the current template instantia...
bool diagnoseQualifiedDeclaration(CXXScopeSpec &SS, DeclContext *DC, DeclarationName Name, SourceLocation Loc)
Diagnose a declaration whose declarator-id has the given nested-name-specifier.
NamedDecl * BuildUsingDeclaration(Scope *S, AccessSpecifier AS, SourceLocation UsingLoc, CXXScopeSpec &SS, DeclarationNameInfo NameInfo, AttributeList *AttrList, bool IsInstantiation, bool HasTypenameKeyword, SourceLocation TypenameLoc)
bool CheckCallingConvAttr(const AttributeList &attr, CallingConv &CC, const FunctionDecl *FD=nullptr)
GlobalMethodPool MethodPool
OMPClause * ActOnOpenMPCaptureClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'capture' clause.
void CodeCompleteModuleImport(SourceLocation ImportLoc, ModuleIdPath Path)
Substitution of the deduced template argument values resulted in an error.
void PerformPendingInstantiations(bool LocalOnly=false)
Performs template instantiation for all implicit template instantiations we have seen until this poin...
A set of unresolved declarations.
llvm::SmallSetVector< const NamedDecl *, 16 > NamedDeclSetType
void CheckDelegatingCtorCycles()
QualType CheckDestructorDeclarator(Declarator &D, QualType R, StorageClass &SC)
LiteralOperatorLookupResult LookupLiteralOperator(Scope *S, LookupResult &R, ArrayRef< QualType > ArgTys, bool AllowRaw, bool AllowTemplate, bool AllowStringTemplate)
StmtResult ActOnBreakStmt(SourceLocation BreakLoc, Scope *CurScope)
ImplicitExceptionSpecification ComputeDefaultedDtorExceptionSpec(CXXMethodDecl *MD)
Determine what sort of exception specification a defaulted destructor of a class will have...
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.
OMPClause * ActOnOpenMPClause(OpenMPClauseKind Kind, SourceLocation StartLoc, SourceLocation EndLoc)
std::pair< StringRef, QualType > CapturedParamNameType
std::function< ExprResult(Sema &, TypoExpr *, TypoCorrection)> TypoRecoveryCallback
virtual ~VerifyICEDiagnoser()
StmtResult ActOnGotoStmt(SourceLocation GotoLoc, SourceLocation LabelLoc, LabelDecl *TheDecl)
FunctionDecl * ResolveAddressOfOverloadedFunction(Expr *AddressOfExpr, QualType TargetType, bool Complain, DeclAccessPair &Found, bool *pHadMultipleCandidates=nullptr)
bool UnifySection(StringRef SectionName, int SectionFlags, DeclaratorDecl *TheDecl)
LazyDeclPtr StdBadAlloc
The C++ "std::bad_alloc" class, which is defined by the C++ standard library.
IfExistsResult CheckMicrosoftIfExistsSymbol(Scope *S, CXXScopeSpec &SS, const DeclarationNameInfo &TargetNameInfo)
ExprResult ActOnUnaryExprOrTypeTraitExpr(SourceLocation OpLoc, UnaryExprOrTypeTrait ExprKind, bool IsType, void *TyOrEx, const SourceRange &ArgRange)
void CodeCompleteObjCSuperclass(Scope *S, IdentifierInfo *ClassName, SourceLocation ClassNameLoc)
void AddPushedVisibilityAttribute(Decl *RD)
AccessResult
A copy of Sema's enum without AR_delayed.
QualType getCapturedDeclRefType(VarDecl *Var, SourceLocation Loc)
Given a variable, determine the type that a reference to that variable will have in the given scope...
ExprResult ActOnCXXFoldExpr(SourceLocation LParenLoc, Expr *LHS, tok::TokenKind Operator, SourceLocation EllipsisLoc, Expr *RHS, SourceLocation RParenLoc)
Handle a C++1z fold-expression: ( expr op ... op expr ).
void addExternalSource(ExternalSemaSource *E)
Registers an external source. If an external source already exists, creates a multiplex external sour...
void ActOnModuleInclude(SourceLocation DirectiveLoc, Module *Mod)
The parser has processed a module import translated from a #include or similar preprocessing directiv...
const ObjCMethodDecl * SelectorsForTypoCorrection(Selector Sel, QualType ObjectType=QualType())
The type of a data member.
void DiagnoseAmbiguousLookup(LookupResult &Result)
Produce a diagnostic describing the ambiguity that resulted from name lookup.
bool SetParamDefaultArgument(ParmVarDecl *Param, Expr *DefaultArg, SourceLocation EqualLoc)
Decl * ActOnFileScopeAsmDecl(Expr *expr, SourceLocation AsmLoc, SourceLocation RParenLoc)
static const unsigned NumNSNumberLiteralMethods
virtual void ReadTentativeDefinitions(SmallVectorImpl< VarDecl * > &TentativeDefs)
Read the set of tentative definitions known to the external Sema source.
CXXBaseSpecifier * CheckBaseSpecifier(CXXRecordDecl *Class, SourceRange SpecifierRange, bool Virtual, AccessSpecifier Access, TypeSourceInfo *TInfo, SourceLocation EllipsisLoc)
ActOnBaseSpecifier - Parsed a base specifier.
QualType BuildExtVectorType(QualType T, Expr *ArraySize, SourceLocation AttrLoc)
Build an ext-vector type.
void popUndelayed(DelayedDiagnosticsState state)
Undo a previous pushUndelayed().
bool CanUseDecl(NamedDecl *D)
Determine whether the use of this declaration is valid, without emitting diagnostics.
ExprResult ActOnCXXThis(SourceLocation loc)
Decl * ActOnStartProtocolInterface(SourceLocation AtProtoInterfaceLoc, IdentifierInfo *ProtocolName, SourceLocation ProtocolLoc, Decl *const *ProtoRefNames, unsigned NumProtoRefs, const SourceLocation *ProtoLocs, SourceLocation EndProtoLoc, AttributeList *AttrList)
StmtResult BuildCXXForRangeStmt(SourceLocation ForLoc, SourceLocation ColonLoc, Stmt *RangeDecl, Stmt *BeginEndDecl, Expr *Cond, Expr *Inc, Stmt *LoopVarDecl, SourceLocation RParenLoc, BuildForRangeKind Kind)
BuildCXXForRangeStmt - Build or instantiate a C++11 for-range statement.
void DiagnoseUnusedDecl(const NamedDecl *ND)
ExprResult ActOnDependentMemberExpr(Expr *Base, QualType BaseType, bool IsArrow, SourceLocation OpLoc, const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, NamedDecl *FirstQualifierInScope, const DeclarationNameInfo &NameInfo, const TemplateArgumentListInfo *TemplateArgs)
Represents a C++ nested-name-specifier or a global scope specifier.
void emitAndClearUnusedLocalTypedefWarnings()
void CheckTollFreeBridgeCast(QualType castType, Expr *castExpr)
void ActOnFinishInlineMethodDef(CXXMethodDecl *D)
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...
LabelDecl * LookupOrCreateLabel(IdentifierInfo *II, SourceLocation IdentLoc, SourceLocation GnuLabelLoc=SourceLocation())
ArrayTypeTrait
Names for the array type traits.
bool isIncompatibleTypedef(TypeDecl *Old, TypedefNameDecl *New)
void CheckCompleteVariableDeclaration(VarDecl *var)
void CheckVariableDeclarationType(VarDecl *NewVD)
ObjCInterfaceDecl * NSNumberDecl
The declaration of the Objective-C NSNumber class.
Decl * ActOnTemplateDeclarator(Scope *S, MultiTemplateParamsArg TemplateParameterLists, Declarator &D)
ExprResult ActOnNumericConstant(const Token &Tok, Scope *UDLScope=nullptr)
StmtResult ActOnFinishSEHFinallyBlock(SourceLocation Loc, Stmt *Block)
bool CheckTemplateArgumentList(TemplateDecl *Template, SourceLocation TemplateLoc, TemplateArgumentListInfo &TemplateArgs, bool PartialTemplateArgs, SmallVectorImpl< TemplateArgument > &Converted)
Check that the given template arguments can be be provided to the given template, converting the argu...
Decl * ActOnObjCExceptionDecl(Scope *S, Declarator &D)
StmtResult ActOnSEHLeaveStmt(SourceLocation Loc, Scope *CurScope)
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.
void CheckMSVCRTEntryPoint(FunctionDecl *FD)
Decl * ActOnFinishFunctionBody(Decl *Decl, Stmt *Body)
Decl * ActOnStartLinkageSpecification(Scope *S, SourceLocation ExternLoc, Expr *LangStr, SourceLocation LBraceLoc)
This represents the body of a CapturedStmt, and serves as its DeclContext.
Represents an ObjC class declaration.
DeclResult CheckClassTemplate(Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc, CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc, AttributeList *Attr, TemplateParameterList *TemplateParams, AccessSpecifier AS, SourceLocation ModulePrivateLoc, SourceLocation FriendLoc, unsigned NumOuterTemplateParamLists, TemplateParameterList **OuterTemplateParamLists, SkipBodyInfo *SkipBody=nullptr)
SmallVector< LambdaExpr *, 2 > Lambdas
The lambdas that are present within this context, if it is indeed an unevaluated context.
CastKind PrepareScalarCast(ExprResult &src, QualType destType)
We are matching the template parameter lists of a template template argument against the template par...
ExprResult BuildDeclarationNameExpr(const CXXScopeSpec &SS, LookupResult &R, bool NeedsADL, bool AcceptInvalidDecl=false)
llvm::DenseMap< IdentifierInfo *, AsmLabelAttr * > ExtnameUndeclaredIdentifiers
Decl * ActOnTypeParameter(Scope *S, bool Typename, SourceLocation EllipsisLoc, SourceLocation KeyLoc, IdentifierInfo *ParamName, SourceLocation ParamNameLoc, unsigned Depth, unsigned Position, SourceLocation EqualLoc, ParsedType DefaultArg)
FullExprArg(Sema &actions)
ExprResult checkUnknownAnyArg(SourceLocation callLoc, Expr *result, QualType ¶mType)
Type-check an expression that's being passed to an __unknown_anytype parameter.
OMPClause * ActOnOpenMPSafelenClause(Expr *Length, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'safelen' clause.
ObjCMethodDecl * StringWithUTF8StringMethod
The declaration of the stringWithUTF8String: method.
void addOverloadedOperatorToUnresolvedSet(UnresolvedSetImpl &Functions, DeclAccessPair Operator, QualType T1, QualType T2)
StmtResult ActOnObjCAtThrowStmt(SourceLocation AtLoc, Expr *Throw, Scope *CurScope)
void MarkVariableReferenced(SourceLocation Loc, VarDecl *Var)
Mark a variable referenced, and check whether it is odr-used (C++ [basic.def.odr]p2, C99 6.9p3). Note that this should not be used directly for normal expressions referring to VarDecl.
OMPClause * ActOnOpenMPDefaultClause(OpenMPDefaultClauseKind Kind, SourceLocation KindLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'default' clause.
const LangOptions & LangOpts
void DiagnoseUnknownTypeName(IdentifierInfo *&II, SourceLocation IILoc, Scope *S, CXXScopeSpec *SS, ParsedType &SuggestedType, bool AllowClassTemplates=false)
void ProcessDeclAttributeList(Scope *S, Decl *D, const AttributeList *AL, bool IncludeCXX11Attributes=true)
static NameClassification TypeTemplate(TemplateName Name)
bool IsStringLiteralToNonConstPointerConversion(Expr *From, QualType ToType)
RAII object used to change the argument pack substitution index within a Sema object.
The lookup results will be used for redeclaration of a name, if an entity by that name already exists...
void PopPragmaVisibility(bool IsNamespaceEnd, SourceLocation EndLoc)
uint8_t PointerKind
Which kind of pointer declarator we saw.
Contains information about the compound statement currently being parsed.
void AddAlignedAttr(SourceRange AttrRange, Decl *D, Expr *E, unsigned SpellingListIndex, bool IsPackExpansion)
AddAlignedAttr - Adds an aligned attribute to a particular declaration.
AccessResult CheckUnresolvedMemberAccess(UnresolvedMemberExpr *E, DeclAccessPair FoundDecl)
bool isUnevaluatedContext() const
Determines whether we are currently in a context that is not evaluated as per C++ [expr] p5...
ObjCPropertyDecl * HandlePropertyInClassExtension(Scope *S, SourceLocation AtLoc, SourceLocation LParenLoc, FieldDeclarator &FD, Selector GetterSel, Selector SetterSel, const bool isAssign, const bool isReadWrite, const unsigned Attributes, const unsigned AttributesAsWritten, bool *isOverridingProperty, QualType T, TypeSourceInfo *TSI, tok::ObjCKeywordKind MethodImplKind)
bool isKnownName(StringRef name)
void ActOnStmtExprError()
UsingShadowDecl * BuildUsingShadowDecl(Scope *S, UsingDecl *UD, NamedDecl *Target, UsingShadowDecl *PrevDecl)
Builds a shadow declaration corresponding to a 'using' declaration.
ParsingClassState PushParsingClass()
unsigned NumCleanupObjects
The number of active cleanup objects when we entered this expression evaluation context.
llvm::SmallVector< DeleteExprLoc, 4 > DeleteLocs
void AddInstanceMethodToGlobalPool(ObjCMethodDecl *Method, bool impl=false)
bool IsOverload(FunctionDecl *New, FunctionDecl *Old, bool IsForUsingDecl)
Code completion occurs within a sequence of declaration specifiers within a function, method, or block.
TypeTrait
Names for traits that operate specifically on types.
void CheckObjCMethodOverrides(ObjCMethodDecl *ObjCMethod, ObjCInterfaceDecl *CurrentClass, ResultTypeCompatibilityKind RTC)
AvailabilityResult
Captures the result of checking the availability of a declaration.
bool IsComplexPromotion(QualType FromType, QualType ToType)
Determine if a conversion is a complex promotion.
CXXMethodDecl * getMethod() const
We are matching the template parameter lists of two template template parameters as part of matching ...
RAII class used to determine whether SFINAE has trapped any errors that occur during template argumen...
virtual void ReadExtVectorDecls(SmallVectorImpl< TypedefNameDecl * > &Decls)
Read the set of ext_vector type declarations known to the external Sema source.
Defines the clang::TemplateNameKind enum.
ArgumentPackSubstitutionIndexRAII(Sema &Self, int NewSubstitutionIndex)
void ActOnCXXExitDeclInitializer(Scope *S, Decl *Dcl)
void CodeCompleteObjCMethodDecl(Scope *S, bool IsInstanceMethod, ParsedType ReturnType)
CXXSpecialMember
Kinds of C++ special members.
QualType CheckTemplateIdType(TemplateName Template, SourceLocation TemplateLoc, TemplateArgumentListInfo &TemplateArgs)
MemInitResult BuildMemInitializer(Decl *ConstructorD, Scope *S, CXXScopeSpec &SS, IdentifierInfo *MemberOrBase, ParsedType TemplateTypeTy, const DeclSpec &DS, SourceLocation IdLoc, Expr *Init, SourceLocation EllipsisLoc)
Handle a C++ member initializer.
QualType BuildBlockPointerType(QualType T, SourceLocation Loc, DeclarationName Entity)
Build a block pointer type.
bool SubstBaseSpecifiers(CXXRecordDecl *Instantiation, CXXRecordDecl *Pattern, const MultiLevelTemplateArgumentList &TemplateArgs)
Perform substitution on the base class specifiers of the given class template specialization.
void BuildVariableInstantiation(VarDecl *NewVar, VarDecl *OldVar, const MultiLevelTemplateArgumentList &TemplateArgs, LateInstantiatedAttrVec *LateAttrs, DeclContext *Owner, LocalInstantiationScope *StartingScope, bool InstantiatingVarTemplate=false)
ExprResult checkPseudoObjectIncDec(Scope *S, SourceLocation OpLoc, UnaryOperatorKind Opcode, Expr *Op)
Check an increment or decrement of a pseudo-object expression.
OMPClause * ActOnOpenMPWriteClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'write' clause.
bool CheckTemplateTypeArgument(TemplateTypeParmDecl *Param, TemplateArgumentLoc &Arg, SmallVectorImpl< TemplateArgument > &Converted)
Decl * ActOnStartOfFunctionDef(Scope *S, Declarator &D)
sema::TemplateDeductionInfo * DeductionInfo
The template deduction info object associated with the substitution or checking of explicit or deduce...
IdentifierInfo * IdentInfo
Sema - This implements semantic analysis and AST building for C.
Decl * ActOnEmptyDeclaration(Scope *S, AttributeList *AttrList, SourceLocation SemiLoc)
Handle a C++11 empty-declaration and attribute-declaration.
void CodeCompleteObjCSuperMessage(Scope *S, SourceLocation SuperLoc, ArrayRef< IdentifierInfo * > SelIdents, bool AtArgumentExpression)
void pushExternalDeclIntoScope(NamedDecl *D, DeclarationName Name)
Make the given externally-produced declaration visible at the top level scope.
void EmitRelatedResultTypeNoteForReturn(QualType destType)
Given that we had incompatible pointer types in a return statement, check whether we're in a method w...
TemplateArgumentLoc getTemplateArgumentPackExpansionPattern(TemplateArgumentLoc OrigLoc, SourceLocation &Ellipsis, Optional< unsigned > &NumExpansions) const
Returns the pattern of the pack expansion for a template argument.
A little helper class used to produce diagnostics.
StmtResult ActOnDeclStmt(DeclGroupPtrTy Decl, SourceLocation StartLoc, SourceLocation EndLoc)
ObjCMessageKind
Represents the ways an Objective-C message send can occur.
bool CheckCUDATarget(const FunctionDecl *Caller, const FunctionDecl *Callee)
bool CheckTemplateArgument(NamedDecl *Param, TemplateArgumentLoc &Arg, NamedDecl *Template, SourceLocation TemplateLoc, SourceLocation RAngleLoc, unsigned ArgumentPackIndex, SmallVectorImpl< TemplateArgument > &Converted, CheckTemplateArgumentKind CTAK=CTAK_Specified)
Check that the given template argument corresponds to the given template parameter.
bool hasVisibleDefaultArgument(const NamedDecl *D, llvm::SmallVectorImpl< Module * > *Modules=nullptr)
Determine if the template parameter D has a visible default argument.
void checkVariadicArgument(const Expr *E, VariadicCallType CT)
void AddInitializerToDecl(Decl *dcl, Expr *init, bool DirectInit, bool TypeMayContainAuto)
SmallVector< CallExpr *, 8 > DelayedDecltypeCalls
If we are processing a decltype type, a set of call expressions for which we have deferred checking t...
StmtResult ActOnOpenMPSingleDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp single' after parsing of the associated statement.
TentativeDefinitionsType TentativeDefinitions
All the tentative definitions encountered in the TU.
const llvm::MapVector< FieldDecl *, DeleteLocs > & getMismatchingDeleteExpressions() const
ResultTypeCompatibilityKind
Describes the compatibility of a result type with its method.
llvm::DenseMap< Selector, GlobalMethods > GlobalMethodPool
ExprResult CreateBuiltinBinOp(SourceLocation OpLoc, BinaryOperatorKind Opc, Expr *LHSExpr, Expr *RHSExpr)
void ActOnFinishCXXMemberDecls()
Perform any semantic analysis which needs to be delayed until all pending class member declarations h...
OMPClause * ActOnOpenMPNowaitClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'nowait' clause.
Qualifiers::ObjCLifetime getObjCLifetime() const
getObjCLifetime - Returns lifetime attribute of this type.
Retains information about a captured region.
void DefineImplicitCopyAssignment(SourceLocation CurrentLocation, CXXMethodDecl *MethodDecl)
Defines an implicitly-declared copy assignment operator.
llvm::SmallPtrSet< Selector, 8 > SelectorSet
bool InstantiateEnum(SourceLocation PointOfInstantiation, EnumDecl *Instantiation, EnumDecl *Pattern, const MultiLevelTemplateArgumentList &TemplateArgs, TemplateSpecializationKind TSK)
Instantiate the definition of an enum from a given pattern.
A RAII object to enter scope of a compound statement.
TypeSpecifierType isTagName(IdentifierInfo &II, Scope *S)
bool isStdInitializerList(QualType Ty, QualType *Element)
Tests whether Ty is an instance of std::initializer_list and, if it is and Element is not NULL...
bool inferObjCARCLifetime(ValueDecl *decl)
Represents a ValueDecl that came out of a declarator. Contains type source information through TypeSo...
ExprResult BuildObjCBridgedCast(SourceLocation LParenLoc, ObjCBridgeCastKind Kind, SourceLocation BridgeKeywordLoc, TypeSourceInfo *TSInfo, Expr *SubExpr)
CastKind
CastKind - The kind of operation required for a conversion.
The return type of classify(). Represents the C++11 expression taxonomy.
std::string getFixItZeroLiteralForType(QualType T, SourceLocation Loc) const
StmtResult BuildReturnStmt(SourceLocation ReturnLoc, Expr *RetValExp)
ImplicitExceptionSpecification ComputeDefaultedCopyCtorExceptionSpec(CXXMethodDecl *MD)
Determine what sort of exception specification a defaulted default constructor of a class will have...
NameClassificationKind getKind() const
void AddMemberOperatorCandidates(OverloadedOperatorKind Op, SourceLocation OpLoc, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, SourceRange OpRange=SourceRange())
Add overload candidates for overloaded operators that are member functions.
void recordUseOfWeak(const ExprT *E, bool IsRead=true)
Template argument deduction did not deduce a value for every template parameter.
bool CheckSpecializationInstantiationRedecl(SourceLocation NewLoc, TemplateSpecializationKind NewTSK, NamedDecl *PrevDecl, TemplateSpecializationKind PrevTSK, SourceLocation PrevPtOfInstantiation, bool &SuppressNew)
Diagnose cases where we have an explicit template specialization before/after an explicit template in...
StmtResult ActOnOpenMPSectionsDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp sections' after parsing of the associated statement.
void AddAnyMethodToGlobalPool(Decl *D)
QualType CheckBitwiseOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign=false)
StmtResult ActOnIfStmt(SourceLocation IfLoc, FullExprArg CondVal, Decl *CondVar, Stmt *ThenVal, SourceLocation ElseLoc, Stmt *ElseVal)
bool MergeFunctionDecl(FunctionDecl *New, NamedDecl *&Old, Scope *S, bool MergeTypeWithOld)
void finishLambdaExplicitCaptures(sema::LambdaScopeInfo *LSI)
Note that we have finished the explicit captures for the given lambda.
bool CheckMessageArgumentTypes(QualType ReceiverType, MultiExprArg Args, Selector Sel, ArrayRef< SourceLocation > SelectorLocs, ObjCMethodDecl *Method, bool isClassMessage, bool isSuperMessage, SourceLocation lbrac, SourceLocation rbrac, SourceRange RecRange, QualType &ReturnType, ExprValueKind &VK)
void ActOnFinishOfCompoundStmt()
TemplateParameterListEqualKind
Enumeration describing how template parameter lists are compared for equality.
void ActOnSuperClassOfClassInterface(Scope *S, SourceLocation AtInterfaceLoc, ObjCInterfaceDecl *IDecl, IdentifierInfo *ClassName, SourceLocation ClassLoc, IdentifierInfo *SuperName, SourceLocation SuperLoc, ArrayRef< ParsedType > SuperTypeArgs, SourceRange SuperTypeArgsRange)
DelayedDiagnosticsState ParsingDeclState
bool checkNullabilityTypeSpecifier(QualType &type, NullabilityKind nullability, SourceLocation nullabilityLoc, bool isContextSensitive)
Captures information about a #pragma weak directive.
StmtResult ActOnAttributedStmt(SourceLocation AttrLoc, ArrayRef< const Attr * > Attrs, Stmt *SubStmt)
void ReadMethodPool(Selector Sel)
Read the contents of the method pool for a given selector from external storage.
bool CheckTemplateDeclScope(Scope *S, TemplateParameterList *TemplateParams)
Check whether a template can be declared within this scope.
sema::FunctionScopeInfo * getEnclosingFunction() const
ID
Defines the set of possible language-specific address spaces.
void ActOnReenterCXXMethodParameter(Scope *S, ParmVarDecl *Param)
MemInitResult BuildMemberInitializer(ValueDecl *Member, Expr *Init, SourceLocation IdLoc)
ImplicitConversionSequence TryImplicitConversion(Expr *From, QualType ToType, bool SuppressUserConversions, bool AllowExplicit, bool InOverloadResolution, bool CStyle, bool AllowObjCWritebackConversion)
ExprResult LookupInlineAsmIdentifier(CXXScopeSpec &SS, SourceLocation TemplateKWLoc, UnqualifiedId &Id, llvm::InlineAsmIdentifierInfo &Info, bool IsUnevaluatedContext)
std::function< void(const TypoCorrection &)> TypoDiagnosticGenerator
bool InstantiateInClassInitializer(SourceLocation PointOfInstantiation, FieldDecl *Instantiation, FieldDecl *Pattern, const MultiLevelTemplateArgumentList &TemplateArgs)
Instantiate the definition of a field from the given pattern.
StmtResult ActOnObjCAtFinallyStmt(SourceLocation AtLoc, Stmt *Body)
void AddAlignValueAttr(SourceRange AttrRange, Decl *D, Expr *E, unsigned SpellingListIndex)
bool isObjCWritebackConversion(QualType FromType, QualType ToType, QualType &ConvertedType)
Determine whether this is an Objective-C writeback conversion, used for parameter passing when perfor...
ExprResult BuildTypeTrait(TypeTrait Kind, SourceLocation KWLoc, ArrayRef< TypeSourceInfo * > Args, SourceLocation RParenLoc)
QualType BuildObjCObjectType(QualType BaseType, SourceLocation Loc, SourceLocation TypeArgsLAngleLoc, ArrayRef< TypeSourceInfo * > TypeArgs, SourceLocation TypeArgsRAngleLoc, SourceLocation ProtocolLAngleLoc, ArrayRef< ObjCProtocolDecl * > Protocols, ArrayRef< SourceLocation > ProtocolLocs, SourceLocation ProtocolRAngleLoc, bool FailOnError=false)
Build an Objective-C object pointer type.
ExprResult ActOnCompoundLiteral(SourceLocation LParenLoc, ParsedType Ty, SourceLocation RParenLoc, Expr *InitExpr)
void DiagnoseAssignmentAsCondition(Expr *E)
ExprResult ActOnBinOp(Scope *S, SourceLocation TokLoc, tok::TokenKind Kind, Expr *LHSExpr, Expr *RHSExpr)
NameClassification(ParsedType Type)
Decl * ActOnStaticAssertDeclaration(SourceLocation StaticAssertLoc, Expr *AssertExpr, Expr *AssertMessageExpr, SourceLocation RParenLoc)
Retains information about a block that is currently being parsed.
TypeSourceInfo * CheckPackExpansion(TypeSourceInfo *Pattern, SourceLocation EllipsisLoc, Optional< unsigned > NumExpansions)
Construct a pack expansion type from the pattern of the pack expansion.
void popWithoutEmitting(DelayedDiagnosticsState state)
bool checkThisInStaticMemberFunctionExceptionSpec(CXXMethodDecl *Method)
Whether this' shows up in the exception specification of a static member function.
MultiLevelTemplateArgumentList getTemplateInstantiationArgs(NamedDecl *D, const TemplateArgumentList *Innermost=nullptr, bool RelativeToPrimary=false, const FunctionDecl *Pattern=nullptr)
Retrieve the template argument list(s) that should be used to instantiate the definition of the given...
ExprResult BuildResolvedCallExpr(Expr *Fn, NamedDecl *NDecl, SourceLocation LParenLoc, ArrayRef< Expr * > Arg, SourceLocation RParenLoc, Expr *Config=nullptr, bool IsExecConfig=false)
ExprResult ActOnLambdaExpr(SourceLocation StartLoc, Stmt *Body, Scope *CurScope)
bool DiagnoseEmptyLookup(Scope *S, CXXScopeSpec &SS, LookupResult &R, std::unique_ptr< CorrectionCandidateCallback > CCC, TemplateArgumentListInfo *ExplicitTemplateArgs=nullptr, ArrayRef< Expr * > Args=None, TypoExpr **Out=nullptr)
Defines the clang::LangOptions interface.
TemplateDeductionResult FinishTemplateArgumentDeduction(FunctionTemplateDecl *FunctionTemplate, SmallVectorImpl< DeducedTemplateArgument > &Deduced, unsigned NumExplicitlySpecified, FunctionDecl *&Specialization, sema::TemplateDeductionInfo &Info, SmallVectorImpl< OriginalCallArg > const *OriginalCallArgs=nullptr, bool PartialOverloading=false)
Finish template argument deduction for a function template, checking the deduced template arguments f...
DeclResult CheckVarTemplateId(VarTemplateDecl *Template, SourceLocation TemplateLoc, SourceLocation TemplateNameLoc, const TemplateArgumentListInfo &TemplateArgs)
void StartOpenMPClause(OpenMPClauseKind K)
Start analysis of clauses.
LookupNameKind
Describes the kind of name lookup to perform.
bool containsUnexpandedParameterPacks(Declarator &D)
Determine whether the given declarator contains any unexpanded parameter packs.
void DefineImplicitCopyConstructor(SourceLocation CurrentLocation, CXXConstructorDecl *Constructor)
SmallVector< Decl *, 2 > WeakTopLevelDecl
bool ActOnCXXGlobalScopeSpecifier(SourceLocation CCLoc, CXXScopeSpec &SS)
The parser has parsed a global nested-name-specifier '::'.
DelayedDiagnosticsState push(sema::DelayedDiagnosticPool &pool)
ExprValueKind
The categorization of expression values, currently following the C++11 scheme.
DLLImportAttr * mergeDLLImportAttr(Decl *D, SourceRange Range, unsigned AttrSpellingListIndex)
TemplateNameKind getTemplateNameKind() const
Expr * stripARCUnbridgedCast(Expr *e)
ExprResult BuildPossibleImplicitMemberExpr(const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, LookupResult &R, const TemplateArgumentListInfo *TemplateArgs)
Builds an expression which might be an implicit member expression.
ImplicitExceptionSpecification ComputeDefaultedMoveCtorExceptionSpec(CXXMethodDecl *MD)
Determine what sort of exception specification a defaulted move constructor of a class will have...
Helper class that collects exception specifications for implicitly-declared special member functions...
void InstantiateAttrs(const MultiLevelTemplateArgumentList &TemplateArgs, const Decl *Pattern, Decl *Inst, LateInstantiatedAttrVec *LateAttrs=nullptr, LocalInstantiationScope *OuterMostScope=nullptr)
When performing template argument deduction for a function template, there were too many call argumen...
llvm::SmallPtrSet< const Decl *, 4 > ParsingInitForAutoVars
void BuildBasePathArray(const CXXBasePaths &Paths, CXXCastPath &BasePath)
bool CollectMultipleMethodsInGlobalPool(Selector Sel, SmallVectorImpl< ObjCMethodDecl * > &Methods, bool instance)
Returns instance or factory methods in global method pool for given selector. If no such method or on...
Declaration of a template type parameter.
The message is an instance message.
void CodeCompleteObjCPropertyDefinition(Scope *S)
ExprResult BuildCXXTypeConstructExpr(TypeSourceInfo *Type, SourceLocation LParenLoc, MultiExprArg Exprs, SourceLocation RParenLoc)
void ActOnPragmaMSInitSeg(SourceLocation PragmaLocation, StringLiteral *SegmentName)
Called on well-formed #pragma init_seg().
StmtResult ActOnDefaultStmt(SourceLocation DefaultLoc, SourceLocation ColonLoc, Stmt *SubStmt, Scope *CurScope)
OMPClause * ActOnOpenMPFlushClause(ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'flush' pseudo clause.
void addImplicitTypedef(StringRef Name, QualType T)
void PerformDependentDiagnostics(const DeclContext *Pattern, const MultiLevelTemplateArgumentList &TemplateArgs)
CompoundScopeRAII(Sema &S)
This file defines the classes used to store parsed information about declaration-specifiers and decla...
bool isModuleVisible(Module *M)
ElaboratedTypeKeyword
The elaboration keyword that precedes a qualified type name or introduces an elaborated-type-specifie...
TypeResult ActOnTypeName(Scope *S, Declarator &D)
OMPClause * ActOnOpenMPMergeableClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'mergeable' clause.
ExprResult BuildExpressionFromDeclTemplateArgument(const TemplateArgument &Arg, QualType ParamType, SourceLocation Loc)
Given a non-type template argument that refers to a declaration and the type of its corresponding non...
Represents a C++ destructor within a class.
LazyDeclPtr StdNamespace
The C++ "std" namespace, where the standard library resides.
ExprResult ActOnPseudoDestructorExpr(Scope *S, Expr *Base, SourceLocation OpLoc, tok::TokenKind OpKind, CXXScopeSpec &SS, UnqualifiedId &FirstTypeName, SourceLocation CCLoc, SourceLocation TildeLoc, UnqualifiedId &SecondTypeName)
bool isObjCGCWeak() const
isObjCGCWeak true when Type is objc's weak.
OMPClause * ActOnOpenMPOrderedClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'ordered' clause.
QualType BuildAtomicType(QualType T, SourceLocation Loc)
llvm::SmallSet< SpecialMemberDecl, 4 > SpecialMembersBeingDeclared
SavePendingInstantiationsAndVTableUsesRAII(Sema &S, bool Enabled)
Code completion occurs within an Objective-C interface, protocol, or category.
bool CheckObjCBridgeRelatedConversions(SourceLocation Loc, QualType DestType, QualType SrcType, Expr *&SrcExpr)
bool InNonInstantiationSFINAEContext
Whether we are in a SFINAE context that is not associated with template instantiation.
Decl * BuildMicrosoftCAnonymousStruct(Scope *S, DeclSpec &DS, RecordDecl *Record)
void PushUsingDirective(Scope *S, UsingDirectiveDecl *UDir)
bool CheckInheritingConstructorUsingDecl(UsingDecl *UD)
Additional checks for a using declaration referring to a constructor name.
void ActOnStartOfObjCMethodDef(Scope *S, Decl *D)
ExprResult VerifyIntegerConstantExpression(Expr *E, llvm::APSInt *Result, VerifyICEDiagnoser &Diagnoser, bool AllowFold=true)
llvm::MapVector< IdentifierInfo *, WeakInfo > WeakUndeclaredIdentifiers
bool isInitListConstructor(const CXXConstructorDecl *Ctor)
Determine whether Ctor is an initializer-list constructor, as defined in [dcl.init.list]p2.
void CodeCompleteObjCAtVisibility(Scope *S)
OpenMPClauseKind
OpenMP clauses.
void CodeCompleteObjCImplementationCategory(Scope *S, IdentifierInfo *ClassName, SourceLocation ClassNameLoc)
StmtResult ActOnOpenMPTaskyieldDirective(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp taskyield'.
ParmVarDecl * SubstParmVarDecl(ParmVarDecl *D, const MultiLevelTemplateArgumentList &TemplateArgs, int indexAdjustment, Optional< unsigned > NumExpansions, bool ExpectParameterPack)
bool ActOnAccessSpecifier(AccessSpecifier Access, SourceLocation ASLoc, SourceLocation ColonLoc, AttributeList *Attrs=nullptr)
ActOnAccessSpecifier - Parsed an access specifier followed by a colon.
void CheckAlignasUnderalignment(Decl *D)
void PopFunctionScopeInfo(const sema::AnalysisBasedWarnings::Policy *WP=nullptr, const Decl *D=nullptr, const BlockExpr *blkExpr=nullptr)
PragmaStack< StringLiteral * > BSSSegStack
void actOnObjCTypeArgsOrProtocolQualifiers(Scope *S, ParsedType baseType, SourceLocation lAngleLoc, ArrayRef< IdentifierInfo * > identifiers, ArrayRef< SourceLocation > identifierLocs, SourceLocation rAngleLoc, SourceLocation &typeArgsLAngleLoc, SmallVectorImpl< ParsedType > &typeArgs, SourceLocation &typeArgsRAngleLoc, SourceLocation &protocolLAngleLoc, SmallVectorImpl< Decl * > &protocols, SourceLocation &protocolRAngleLoc, bool warnOnIncompleteProtocols)
FunctionProtoType::ExceptionSpecInfo getExceptionSpec() const
Overwrite an EPI's exception specification with this computed exception specification.
ExprResult BuildCXXNamedCast(SourceLocation OpLoc, tok::TokenKind Kind, TypeSourceInfo *Ty, Expr *E, SourceRange AngleBrackets, SourceRange Parens)
Initial building of a for-range statement.
bool DiagnoseAssignmentResult(AssignConvertType ConvTy, SourceLocation Loc, QualType DstType, QualType SrcType, Expr *SrcExpr, AssignmentAction Action, bool *Complained=nullptr)
When performing template argument deduction for a function template, there were too few call argument...
void ActOnFinishCXXInClassMemberInitializer(Decl *VarDecl, SourceLocation EqualLoc, Expr *Init)
This is invoked after parsing an in-class initializer for a non-static C++ class member, and after instantiating an in-class initializer in a class template. Such actions are deferred until the class is complete.
An abstract interface that should be implemented by listeners that want to be notified when an AST en...
void NoteAllFoundTemplates(TemplateName Name)
ExprResult CheckPlaceholderExpr(Expr *E)
void ActOnDelayedCXXMethodParameter(Scope *S, Decl *Param)
Represents a C++ template name within the type system.
bool CheckFunctionTemplateSpecialization(FunctionDecl *FD, TemplateArgumentListInfo *ExplicitTemplateArgs, LookupResult &Previous)
Perform semantic analysis for the given function template specialization.
NamedDecl * ActOnTypedefNameDecl(Scope *S, DeclContext *DC, TypedefNameDecl *D, LookupResult &Previous, bool &Redeclaration)
void CodeCompletePreprocessorExpression()
QualType NSNumberPointer
Pointer to NSNumber type (NSNumber *).
void buildLambdaScope(sema::LambdaScopeInfo *LSI, CXXMethodDecl *CallOperator, SourceRange IntroducerRange, LambdaCaptureDefault CaptureDefault, SourceLocation CaptureDefaultLoc, bool ExplicitParams, bool ExplicitResultType, bool Mutable)
Endow the lambda scope info with the relevant properties.
bool RequireCompleteType(SourceLocation Loc, QualType T, TypeDiagnoser &Diagnoser)
Ensure that the type T is a complete type.
llvm::DenseMap< NamedDecl *, SourceLocation > UndefinedButUsed
Defines the clang::TypeLoc interface and its subclasses.
Decl * ActOnField(Scope *S, Decl *TagD, SourceLocation DeclStart, Declarator &D, Expr *BitfieldWidth)
bool isVisible(const NamedDecl *D)
Determine whether a declaration is visible to name lookup.
void DiscardCleanupsInEvaluationContext()
ExprResult BuildTemplateIdExpr(const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, LookupResult &R, bool RequiresADL, const TemplateArgumentListInfo *TemplateArgs)
Code completion occurs within a statement, which may also be an expression or a declaration.
FunctionDecl * ResolveSingleFunctionTemplateSpecialization(OverloadExpr *ovl, bool Complain=false, DeclAccessPair *Found=nullptr)
Given an expression that refers to an overloaded function, try to resolve that overloaded function ex...
bool isSameOrCompatibleFunctionType(CanQualType Param, CanQualType Arg)
Compare types for equality with respect to possibly compatible function types (noreturn adjustment...
void ActOnPragmaUnused(const Token &Identifier, Scope *curScope, SourceLocation PragmaLoc)
ActOnPragmaUnused - Called on well-formed '#pragma unused'.
unsigned NumTemplateArgs
The number of template arguments in TemplateArgs.
void propagateDLLAttrToBaseClassTemplate(CXXRecordDecl *Class, Attr *ClassAttr, ClassTemplateSpecializationDecl *BaseTemplateSpec, SourceLocation BaseLoc)
Perform propagation of DLL attributes from a derived class to a templated base class for MS compatibi...
StmtResult ActOnStartOfSwitchStmt(SourceLocation SwitchLoc, Expr *Cond, Decl *CondVar)
FieldDecl * CheckFieldDecl(DeclarationName Name, QualType T, TypeSourceInfo *TInfo, RecordDecl *Record, SourceLocation Loc, bool Mutable, Expr *BitfieldWidth, InClassInitStyle InitStyle, SourceLocation TSSL, AccessSpecifier AS, NamedDecl *PrevDecl, Declarator *D=nullptr)
Build a new FieldDecl and check its well-formedness.
void HandleDelayedAccessCheck(sema::DelayedDiagnostic &DD, Decl *Ctx)
MSInheritanceAttr * mergeMSInheritanceAttr(Decl *D, SourceRange Range, bool BestCase, unsigned AttrSpellingListIndex, MSInheritanceAttr::Spelling SemanticSpelling)
TemplateNameKind
Specifies the kind of template name that an identifier refers to. Be careful when changing this: this...
ASTMutationListener * getASTMutationListener() const
CXXMethodDecl * startLambdaDefinition(CXXRecordDecl *Class, SourceRange IntroducerRange, TypeSourceInfo *MethodType, SourceLocation EndLoc, ArrayRef< ParmVarDecl * > Params)
Start the definition of a lambda expression.
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.
ExprResult ActOnTypeTrait(TypeTrait Kind, SourceLocation KWLoc, ArrayRef< ParsedType > Args, SourceLocation RParenLoc)
Parsed one of the type trait support pseudo-functions.
StorageClass
Storage classes.
TemplateDeductionResult SubstituteExplicitTemplateArguments(FunctionTemplateDecl *FunctionTemplate, TemplateArgumentListInfo &ExplicitTemplateArgs, SmallVectorImpl< DeducedTemplateArgument > &Deduced, SmallVectorImpl< QualType > &ParamTypes, QualType *FunctionType, sema::TemplateDeductionInfo &Info)
Substitute the explicitly-provided template arguments into the given function template according to C...
Decl * ActOnStartClassImplementation(SourceLocation AtClassImplLoc, IdentifierInfo *ClassName, SourceLocation ClassLoc, IdentifierInfo *SuperClassname, SourceLocation SuperClassLoc)
TemplateDecl * AdjustDeclIfTemplate(Decl *&Decl)
ExprResult BuildCXXUuidof(QualType TypeInfoType, SourceLocation TypeidLoc, TypeSourceInfo *Operand, SourceLocation RParenLoc)
Build a Microsoft __uuidof expression with a type operand.
void DefineImplicitMoveAssignment(SourceLocation CurrentLocation, CXXMethodDecl *MethodDecl)
Defines an implicitly-declared move assignment operator.
void CheckCompletedCXXClass(CXXRecordDecl *Record)
Perform semantic checks on a class definition that has been completing, introducing implicitly-declar...
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...
void AdjustDestructorExceptionSpec(CXXRecordDecl *ClassDecl, CXXDestructorDecl *Destructor)
Build an exception spec for destructors that don't have one.
ObjCMessageKind getObjCMessageKind(Scope *S, IdentifierInfo *Name, SourceLocation NameLoc, bool IsSuper, bool HasTrailingDot, ParsedType &ReceiverType)
llvm::SmallPtrSet< CXXRecordDecl *, 16 > AssociatedClassSet
InClassInitStyle
In-class initialization styles for non-static data members.
bool IsDerivedFrom(QualType Derived, QualType Base)
Determine whether the type Derived is a C++ class that is derived from the type Base.
void AddFunctionCandidates(const UnresolvedSetImpl &Functions, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, TemplateArgumentListInfo *ExplicitTemplateArgs=nullptr, bool SuppressUserConversions=false, bool PartialOverloading=false)
Add all of the function declarations in the given function set to the overload candidate set...
NameClassification(ExprResult Expr)
void ActOnPragmaDetectMismatch(StringRef Name, StringRef Value)
ActOnPragmaDetectMismatch - Call on well-formed #pragma detect_mismatch.
StmtResult ActOnNullStmt(SourceLocation SemiLoc, bool HasLeadingEmptyMacro=false)
void AddTemplateOverloadCandidate(FunctionTemplateDecl *FunctionTemplate, DeclAccessPair FoundDecl, TemplateArgumentListInfo *ExplicitTemplateArgs, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, bool SuppressUserConversions=false, bool PartialOverloading=false)
Add a C++ function template specialization as a candidate in the candidate set, using template argume...
An expression that sends a message to the given Objective-C object or class.
Data structure that captures multiple levels of template argument lists for use in template instantia...
void SetDeclDeleted(Decl *dcl, SourceLocation DelLoc)
TypeSourceInfo * GetTypeSourceInfoForDeclarator(Declarator &D, QualType T, TypeSourceInfo *ReturnTypeInfo)
Create and instantiate a TypeSourceInfo with type source information.
bool isExternallyVisible() const
void WarnConflictingTypedMethods(ObjCMethodDecl *Method, ObjCMethodDecl *MethodDecl, bool IsProtocolMethodDecl)
SmallVector< ActiveTemplateInstantiation, 16 > ActiveTemplateInstantiations
List of active template instantiations.
bool DeduceReturnType(FunctionDecl *FD, SourceLocation Loc, bool Diagnose=true)
bool RequireLiteralType(SourceLocation Loc, QualType T, TypeDiagnoser &Diagnoser)
Ensure that the type T is a literal type.
ExprResult ActOnChooseExpr(SourceLocation BuiltinLoc, Expr *CondExpr, Expr *LHSExpr, Expr *RHSExpr, SourceLocation RPLoc)
bool RequireCompleteType(SourceLocation Loc, QualType T, unsigned DiagID, const Ts &...Args)
DiagnosticsEngine & getDiagnostics() const
ParsedType getInheritingConstructorName(CXXScopeSpec &SS, SourceLocation NameLoc, IdentifierInfo &Name)
Handle the result of the special case name lookup for inheriting constructor declarations. 'NS::X::X' and 'NS::X<...>::X' are treated as constructor names in member using declarations, even if 'X' is not the name of the corresponding type.
bool AttachBaseSpecifiers(CXXRecordDecl *Class, CXXBaseSpecifier **Bases, unsigned NumBases)
Performs the actual work of attaching the given base class specifiers to a C++ class.
CXXRecordDecl * getStdBadAlloc() const
ObjCMethodDecl * ArrayWithObjectsMethod
The declaration of the arrayWithObjects:count: method.
void CleanupVarDeclMarking()
DeclContext * getContainingDC(DeclContext *DC)
void addMethodToGlobalList(ObjCMethodList *List, ObjCMethodDecl *Method)
Add the given method to the list of globally-known methods.
QualType CheckVectorCompareOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool isRelational)
void PushOnScopeChains(NamedDecl *D, Scope *S, bool AddToContext=true)
Add this decl to the scope shadowed decl chains.
void AddOptnoneAttributeIfNoConflicts(FunctionDecl *FD, SourceLocation Loc)
Adds the 'optnone' attribute to the function declaration if there are no conflicts; Loc represents th...
Wraps an identifier and optional source location for the identifier.
TemplateNameKind isTemplateName(Scope *S, CXXScopeSpec &SS, bool hasTemplateKeyword, UnqualifiedId &Name, ParsedType ObjectType, bool EnteringContext, TemplateTy &Template, bool &MemberOfUnknownSpecialization)
void ActOnCXXEnterDeclInitializer(Scope *S, Decl *Dcl)
ExprResult ActOnCXXDelete(SourceLocation StartLoc, bool UseGlobal, bool ArrayForm, Expr *Operand)
ActOnCXXDelete - Parsed a C++ 'delete' expression.
bool CheckTollFreeBridgeStaticCast(QualType castType, Expr *castExpr, CastKind &Kind)
Represents a C++ conversion function within a class.
sema::LambdaScopeInfo * PushLambdaScope()
The result type of a method or function.
llvm::FoldingSet< SpecialMemberOverloadResult > SpecialMemberCache
A cache of special member function overload resolution results for C++ records.
NamedDecl * LookupSingleName(Scope *S, DeclarationName Name, SourceLocation Loc, LookupNameKind NameKind, RedeclarationKind Redecl=NotForRedeclaration)
Look up a name, looking for a single declaration. Return null if the results were absent...
ExprResult DefaultFunctionArrayLvalueConversion(Expr *E)
StmtResult ProcessStmtAttributes(Stmt *Stmt, AttributeList *Attrs, SourceRange Range)
Stmt attributes - this routine is the top level dispatcher.
bool ParentNeedsCleanups
Whether the enclosing context needed a cleanup.
Code completion occurs within the list of instance variables in an Objective-C interface, protocol, category, or implementation.
void CodeCompleteNamespaceDecl(Scope *S)
bool RequireCompleteExprType(Expr *E, TypeDiagnoser &Diagnoser)
Ensure that the type of the given expression is complete.
ExprResult BuildCompoundLiteralExpr(SourceLocation LParenLoc, TypeSourceInfo *TInfo, SourceLocation RParenLoc, Expr *LiteralExpr)
OpenMPProcBindClauseKind
OpenMP attributes for 'proc_bind' clause.
void DiagnoseNontrivial(const CXXRecordDecl *Record, CXXSpecialMember CSM)
ObjCTypeParamVariance
Describes the variance of a given generic parameter.
DeclGroupPtrTy ActOnFinishObjCImplementation(Decl *ObjCImpDecl, ArrayRef< Decl * > Decls)
bool CheckOverridingFunctionAttributes(const CXXMethodDecl *New, const CXXMethodDecl *Old)
ParsedTemplateArgument ActOnPackExpansion(const ParsedTemplateArgument &Arg, SourceLocation EllipsisLoc)
Invoked when parsing a template argument followed by an ellipsis, which creates a pack expansion...
unsigned size() const
The number of exceptions in the exception specification.
void DefineImplicitDefaultConstructor(SourceLocation CurrentLocation, CXXConstructorDecl *Constructor)
CXXConstructorDecl * LookupCopyingConstructor(CXXRecordDecl *Class, unsigned Quals)
Look up the copying constructor for the given class.
ObjCKeywordKind
Provides a namespace for Objective-C keywords which start with an '@'.
DeclContext * FindInstantiatedContext(SourceLocation Loc, DeclContext *DC, const MultiLevelTemplateArgumentList &TemplateArgs)
Finds the instantiation of the given declaration context within the current instantiation.
void CodeCompleteInitializer(Scope *S, Decl *D)
CallingConv
CallingConv - Specifies the calling convention that a function uses.
SourceLocation PointerLoc
unsigned NumSFINAEErrors
The number of SFINAE diagnostics that have been trapped.
void DefaultSynthesizeProperties(Scope *S, ObjCImplDecl *IMPDecl, ObjCInterfaceDecl *IDecl)
Default synthesizes all properties which must be synthesized in class's @implementation.
const TypoExprState & getTypoExprState(TypoExpr *TE) const
CXXDestructorDecl * LookupDestructor(CXXRecordDecl *Class)
Look for the destructor of the given class.
ExpressionEvaluationContextRecord(ExpressionEvaluationContext Context, unsigned NumCleanupObjects, bool ParentNeedsCleanups, Decl *ManglingContextDecl, bool IsDecltype)
void CodeCompleteObjCPropertySetter(Scope *S)
void ActOnFinishCXXMemberSpecification(Scope *S, SourceLocation RLoc, Decl *TagDecl, SourceLocation LBrac, SourceLocation RBrac, AttributeList *AttrList)
TypeSourceInfo * GetTypeForDeclaratorCast(Declarator &D, QualType FromTy)
ExprResult BuildQualifiedDeclarationNameExpr(CXXScopeSpec &SS, const DeclarationNameInfo &NameInfo, bool IsAddressOfOperand, TypeSourceInfo **RecoveryTSI=nullptr)
void NoteHiddenVirtualMethods(CXXMethodDecl *MD, SmallVectorImpl< CXXMethodDecl * > &OverloadedMethods)
ExprResult ActOnFinishFullExpr(Expr *Expr)
bool CheckConstexprFunctionBody(const FunctionDecl *FD, Stmt *Body)
ExprResult BuildPseudoDestructorExpr(Expr *Base, SourceLocation OpLoc, tok::TokenKind OpKind, const CXXScopeSpec &SS, TypeSourceInfo *ScopeType, SourceLocation CCLoc, SourceLocation TildeLoc, PseudoDestructorTypeStorage DestroyedType)
QualType FindCompositePointerType(SourceLocation Loc, Expr *&E1, Expr *&E2, bool *NonStandardCompositeType=nullptr)
Find a merged pointer type and convert the two expressions to it.
An abstract interface that should be implemented by external AST sources that also provide informatio...
NameClassification ClassifyName(Scope *S, CXXScopeSpec &SS, IdentifierInfo *&Name, SourceLocation NameLoc, const Token &NextToken, bool IsAddressOfOperand, std::unique_ptr< CorrectionCandidateCallback > CCC=nullptr)
Perform name lookup on the given name, classifying it based on the results of name lookup and the fol...
ExprResult CorrectDelayedTyposInExpr(ExprResult ER, llvm::function_ref< ExprResult(Expr *)> Filter)
void translateTemplateArguments(const ASTTemplateArgsPtr &In, TemplateArgumentListInfo &Out)
Translates template arguments as provided by the parser into template arguments used by semantic anal...
void CodeCompleteObjCAtExpression(Scope *S)
static StringRef getPrintable(StringRef S)
ExprResult BuildCXXNoexceptExpr(SourceLocation KeyLoc, Expr *Operand, SourceLocation RParen)
DelegatingCtorDeclsType DelegatingCtorDecls
All the delegating constructors seen so far in the file, used for cycle detection at the end of the T...
ExprResult BuildCStyleCastExpr(SourceLocation LParenLoc, TypeSourceInfo *Ty, SourceLocation RParenLoc, Expr *Op)
ExprResult ActOnParenExpr(SourceLocation L, SourceLocation R, Expr *E)
void HideUsingShadowDecl(Scope *S, UsingShadowDecl *Shadow)
FieldDecl * buildInitCaptureField(sema::LambdaScopeInfo *LSI, VarDecl *Var)
Build the implicit field for an init-capture.
void CodeCompleteTypeQualifiers(DeclSpec &DS)
std::pair< const IdentifierInfo *, uint64_t > TypeTagMagicValue
ExprResult BuildLambdaExpr(SourceLocation StartLoc, SourceLocation EndLoc, sema::LambdaScopeInfo *LSI)
Complete a lambda-expression having processed and attached the lambda body.
const QualType * data() const
The set of exceptions in the exception specification.
Decl * ActOnSkippedFunctionBody(Decl *Decl)
void AtomicPropertySetterGetterRules(ObjCImplDecl *IMPDecl, ObjCContainerDecl *IDecl)
ExprResult ParseObjCProtocolExpression(IdentifierInfo *ProtocolName, SourceLocation AtLoc, SourceLocation ProtoLoc, SourceLocation LParenLoc, SourceLocation ProtoIdLoc, SourceLocation RParenLoc)
ParseObjCProtocolExpression - Build protocol expression for @protocol.
LazyVector< TypedefNameDecl *, ExternalSemaSource,&ExternalSemaSource::ReadExtVectorDecls, 2, 2 > ExtVectorDeclsType
NamedDecl * ImplicitlyDefineFunction(SourceLocation Loc, IdentifierInfo &II, Scope *S)
void AddRangeBasedOptnone(FunctionDecl *FD)
Only called on function definitions; if there is a pragma in scope with the effect of a range-based o...
bool hasVisibleDefinition(const NamedDecl *D)
void ActOnStartOfCompoundStmt()
OMPClause * ActOnOpenMPCopyinClause(ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'copyin' clause.
bool SawTypeNullability
Whether we saw any type nullability annotations in the given file.
StringLiteral * CurInitSeg
Last section used with #pragma init_seg.
ActiveTemplateInstantiation()
void PushBlockScope(Scope *BlockScope, BlockDecl *Block)
CanThrowResult
Possible results from evaluation of a noexcept expression.
static unsigned getPrintable(unsigned I)
NameClassificationKind
Describes the result of the name lookup and resolution performed by ClassifyName().
ParsedType getDestructorType(const DeclSpec &DS, ParsedType ObjectType)
Decl * ActOnPropertyImplDecl(Scope *S, SourceLocation AtLoc, SourceLocation PropertyLoc, bool ImplKind, IdentifierInfo *PropertyId, IdentifierInfo *PropertyIvar, SourceLocation PropertyIvarLoc)
void DiagnoseDuplicateIvars(ObjCInterfaceDecl *ID, ObjCInterfaceDecl *SID)
void ActOnStartCXXInClassMemberInitializer()
Enter a new C++ default initializer scope. After calling this, the caller must call ActOnFinishCXXInC...
ExprResult ActOnDecltypeExpression(Expr *E)
void CodeCompleteObjCInstanceMessage(Scope *S, Expr *Receiver, ArrayRef< IdentifierInfo * > SelIdents, bool AtArgumentExpression, ObjCInterfaceDecl *Super=nullptr)
std::vector< NamedDecl * > DeclsInPrototypeScope
void CodeCompleteObjCAtDirective(Scope *S)
void ActOnFinishKNRParamDeclarations(Scope *S, Declarator &D, SourceLocation LocAfterDecls)
ExprResult MaybeBindToTemporary(Expr *E)
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...
ExprResult BuildCXXThrow(SourceLocation OpLoc, Expr *Ex, bool IsThrownVarInScope)
EnterExpressionEvaluationContext(Sema &Actions, Sema::ExpressionEvaluationContext NewContext, Sema::ReuseLambdaContextDecl_t, bool IsDecltype=false)
bool CheckCaseExpression(Expr *E)
bool FindAllocationOverload(SourceLocation StartLoc, SourceRange Range, DeclarationName Name, MultiExprArg Args, DeclContext *Ctx, bool AllowMissing, FunctionDecl *&Operator, bool Diagnose=true)
Find an fitting overload for the allocation function in the specified scope.
bool CheckUsingDeclQualifier(SourceLocation UsingLoc, const CXXScopeSpec &SS, const DeclarationNameInfo &NameInfo, SourceLocation NameLoc)
ExceptionSpecificationType Type
The kind of exception specification this is.
ExprResult LookupInObjCMethod(LookupResult &LookUp, Scope *S, IdentifierInfo *II, bool AllowBuiltinCreation=false)
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.
void ActOnCaseStmtBody(Stmt *CaseStmt, Stmt *SubStmt)
ActOnCaseStmtBody - This installs a statement as the body of a case.
TypeTagData(QualType Type, bool LayoutCompatible, bool MustBeNull)
bool Subst(const TemplateArgumentLoc *Args, unsigned NumArgs, TemplateArgumentListInfo &Result, const MultiLevelTemplateArgumentList &TemplateArgs)
The template argument was deduced from an array bound via template argument deduction.
bool IsValueInFlagEnum(const EnumDecl *ED, const llvm::APInt &Val, bool AllowMask) const
ExprResult CreateGenericSelectionExpr(SourceLocation KeyLoc, SourceLocation DefaultLoc, SourceLocation RParenLoc, Expr *ControllingExpr, ArrayRef< TypeSourceInfo * > Types, ArrayRef< Expr * > Exprs)
DeduceAutoResult
Result type of DeduceAutoType.
Encodes a location in the source. The SourceManager can decode this to get at the full include stack...
ExprResult ActOnConvertVectorExpr(Expr *E, ParsedType ParsedDestTy, SourceLocation BuiltinLoc, SourceLocation RParenLoc)
__builtin_convertvector(...)
void ActOnFinishDelayedMemberDeclarations(Scope *S, Decl *Record)
llvm::SmallPtrSet< Expr *, 2 > MaybeODRUseExprs
Store a list of either DeclRefExprs or MemberExprs that contain a reference to a variable (constant) ...
void Act(SourceLocation PragmaLocation, PragmaMsStackAction Action, llvm::StringRef StackSlotLabel, ValueType Value)
bool CheckForConstantInitializer(Expr *e, QualType t)
type checking declaration initializers (C99 6.7.8)
OpenMPDependClauseKind
OpenMP attributes for 'depend' clause.
void NoteAllOverloadCandidates(Expr *E, QualType DestType=QualType())
Defines enumerations for expression traits intrinsics.
SourceLocation CurrentPragmaLocation
StmtResult ActOnOpenMPTaskDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp task' after parsing of the associated statement.
bool CheckPureMethod(CXXMethodDecl *Method, SourceRange InitRange)
Mark the given method pure.
Decl * ActOnFinishLinkageSpecification(Scope *S, Decl *LinkageSpec, SourceLocation RBraceLoc)
void CheckImplementationIvars(ObjCImplementationDecl *ImpDecl, ObjCIvarDecl **Fields, unsigned nIvars, SourceLocation Loc)
bool CheckDistantExceptionSpec(QualType T)
void FindAssociatedClassesAndNamespaces(SourceLocation InstantiationLoc, ArrayRef< Expr * > Args, AssociatedNamespaceSet &AssociatedNamespaces, AssociatedClassSet &AssociatedClasses)
Find the associated classes and namespaces for argument-dependent lookup for a call with the given se...
llvm::SmallPtrSet< Expr *, 2 > SavedMaybeODRUseExprs
CastKind PrepareCastToObjCObjectPointer(ExprResult &E)
~SavePendingInstantiationsAndVTableUsesRAII()
OMPClause * ActOnOpenMPPrivateClause(ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'private' clause.
VarArgKind isValidVarArgType(const QualType &Ty)
bool CheckSpecifiedExceptionType(QualType &T, const SourceRange &Range)
static const char * getPrintable(const char *S)
Decl * BuildStaticAssertDeclaration(SourceLocation StaticAssertLoc, Expr *AssertExpr, StringLiteral *AssertMessageExpr, SourceLocation RParenLoc, bool Failed)
void checkRetainCycles(ObjCMessageExpr *msg)
Check a message send to see if it's likely to cause a retain cycle.
StmtResult ActOnOpenMPExecutableDirective(OpenMPDirectiveKind Kind, const DeclarationNameInfo &DirName, OpenMPDirectiveKind CancelRegion, ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
void DiagnoseAssignmentEnum(QualType DstType, QualType SrcType, Expr *SrcExpr)
bool IsNoReturnConversion(QualType FromType, QualType ToType, QualType &ResultTy)
Determine whether the conversion from FromType to ToType is a valid conversion that strips "noreturn"...
void ActOnPragmaMSVtorDisp(PragmaVtorDispKind Kind, SourceLocation PragmaLoc, MSVtorDispAttr::Mode Value)
Called on well formed #pragma vtordisp().
DLLExportAttr * mergeDLLExportAttr(Decl *D, SourceRange Range, unsigned AttrSpellingListIndex)
void FinalizeDeclaration(Decl *D)
void AddKnownFunctionAttributes(FunctionDecl *FD)
Adds any function attributes that we know a priori based on the declaration of this function...
static SourceRange getPrintable(const Expr *E)
void ActOnPragmaWeakID(IdentifierInfo *WeakName, SourceLocation PragmaLoc, SourceLocation WeakNameLoc)
ActOnPragmaWeakID - Called on well formed #pragma weak ident.
StmtResult ActOnReturnStmt(SourceLocation ReturnLoc, Expr *RetValExp, Scope *CurScope)
void InstantiateStaticDataMemberDefinition(SourceLocation PointOfInstantiation, VarDecl *Var, bool Recursive=false, bool DefinitionRequired=false)
Instantiate the definition of the given variable from its template.
CUDAFunctionTarget IdentifyCUDATarget(const FunctionDecl *D)
IdentifyCUDATarget - Determine the CUDA compilation target for this function.
bool checkThisInStaticMemberFunctionAttributes(CXXMethodDecl *Method)
Check whether 'this' shows up in the attributes of the given static member function.
StmtResult ActOnLabelStmt(SourceLocation IdentLoc, LabelDecl *TheDecl, SourceLocation ColonLoc, Stmt *SubStmt)
Template argument deduction failed due to inconsistent cv-qualifiers on a template parameter type tha...
void ExitDeclaratorContext(Scope *S)
TagDecl - Represents the declaration of a struct/union/class/enum.
bool IsSimplyAccessible(NamedDecl *decl, DeclContext *Ctx)
ExprResult ActOnClassMessage(Scope *S, ParsedType Receiver, Selector Sel, SourceLocation LBracLoc, ArrayRef< SourceLocation > SelectorLocs, SourceLocation RBracLoc, MultiExprArg Args)
QualType CheckTypenameType(ElaboratedTypeKeyword Keyword, SourceLocation KeywordLoc, NestedNameSpecifierLoc QualifierLoc, const IdentifierInfo &II, SourceLocation IILoc)
Build the type that describes a C++ typename specifier, e.g., "typename T::type". ...
StmtResult ActOnForEachLValueExpr(Expr *E)
ASTContext & getASTContext() const
Slot(llvm::StringRef StackSlotLabel, ValueType Value, SourceLocation PragmaLocation)
QualType CheckCompareOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, unsigned OpaqueOpc, bool isRelational)
OpenMPDirectiveKind
OpenMP directives.
void DefineImplicitDestructor(SourceLocation CurrentLocation, CXXDestructorDecl *Destructor)
ExprResult ActOnCharacterConstant(const Token &Tok, Scope *UDLScope=nullptr)
DelayedDiagnosticsState ProcessingContextState
void CheckObjCMethodOverride(ObjCMethodDecl *NewMethod, const ObjCMethodDecl *Overridden)
Check whether the given new method is a valid override of the given overridden method, and set any properties that should be inherited.
Decl * ManglingContextDecl
The declaration that provides context for lambda expressions and block literals if the normal declara...
void CodeCompleteReturn(Scope *S)
bool hasVisibleMergedDefinition(NamedDecl *Def)
void CodeCompleteObjCClassMessage(Scope *S, ParsedType Receiver, ArrayRef< IdentifierInfo * > SelIdents, bool AtArgumentExpression, bool IsSuper=false)
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.
StmtResult ActOnCapturedRegionEnd(Stmt *S)
QualType CheckShiftOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, unsigned Opc, bool IsCompAssign=false)
bool shouldDelayDiagnostics()
Determines whether diagnostics should be delayed.
QualType CheckNonTypeTemplateParameterType(QualType T, SourceLocation Loc)
Check that the type of a non-type template parameter is well-formed.
void AddTemplateConversionCandidate(FunctionTemplateDecl *FunctionTemplate, DeclAccessPair FoundDecl, CXXRecordDecl *ActingContext, Expr *From, QualType ToType, OverloadCandidateSet &CandidateSet, bool AllowObjCConversionOnExplicit)
Adds a conversion function template specialization candidate to the overload set, using template argu...
ExprResult TransformToPotentiallyEvaluated(Expr *E)
ObjCTypeParamList * actOnObjCTypeParamList(Scope *S, SourceLocation lAngleLoc, ArrayRef< Decl * > typeParams, SourceLocation rAngleLoc)
void AddBuiltinCandidate(QualType ResultTy, QualType *ParamTys, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, bool IsAssignmentOperator=false, unsigned NumContextualBoolArguments=0)
bool canDelayFunctionBody(const Declarator &D)
Determine whether we can delay parsing the body of a function or function template until it is used...
void SetDeclDefaulted(Decl *dcl, SourceLocation DefaultLoc)
ExprResult SemaBuiltinShuffleVector(CallExpr *TheCall)
SemaBuiltinShuffleVector - Handle __builtin_shufflevector.
RecordDecl * CFError
The struct behind the CFErrorRef pointer.
ExprResult BuildObjCArrayLiteral(SourceRange SR, MultiExprArg Elements)
bool hasVisibleDefinition(NamedDecl *D, NamedDecl **Suggested, bool OnlyNeedComplete=false)
Determine whether there is any declaration of D that was ever a definition (perhaps before module mer...
StmtResult ActOnOpenMPCancellationPointDirective(SourceLocation StartLoc, SourceLocation EndLoc, OpenMPDirectiveKind CancelRegion)
Called on well-formed '#pragma omp cancellation point'.
bool DeduceFunctionTypeFromReturnExpr(FunctionDecl *FD, SourceLocation ReturnLoc, Expr *&RetExpr, AutoType *AT)
ExprResult ActOnCXXNamedCast(SourceLocation OpLoc, tok::TokenKind Kind, SourceLocation LAngleBracketLoc, Declarator &D, SourceLocation RAngleBracketLoc, SourceLocation LParenLoc, Expr *E, SourceLocation RParenLoc)
ActOnCXXNamedCast - Parse {dynamic,static,reinterpret,const}_cast's.
ExprResult DefaultLvalueConversion(Expr *E)
Represents a C++ nested name specifier, such as "\::std::vector<int>::".
void CodeCompleteOperatorName(Scope *S)
bool CheckIfOverriddenFunctionIsMarkedFinal(const CXXMethodDecl *New, const CXXMethodDecl *Old)
StmtResult BuildObjCAtThrowStmt(SourceLocation AtLoc, Expr *Throw)
void CodeCompletePreprocessorDirective(bool InConditional)
QualType getElaboratedType(ElaboratedTypeKeyword Keyword, const CXXScopeSpec &SS, QualType T)
Retrieve a version of the type 'T' that is elaborated by Keyword and qualified by the nested-name-spe...
void DiagnoseUseOfUnimplementedSelectors()
bool DiagnoseMultipleUserDefinedConversion(Expr *From, QualType ToType)
ExprResult BuildMemberReferenceExpr(Expr *Base, QualType BaseType, SourceLocation OpLoc, bool IsArrow, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, NamedDecl *FirstQualifierInScope, const DeclarationNameInfo &NameInfo, const TemplateArgumentListInfo *TemplateArgs, ActOnMemberAccessExtraArgs *ExtraArgs=nullptr)
llvm::SmallPtrSet< const CXXRecordDecl *, 8 > RecordDeclSetTy
SFINAETrap(Sema &SemaRef, bool AccessCheckingSFINAE=false)
bool CheckObjCARCUnavailableWeakConversion(QualType castType, QualType ExprType)
std::string getAmbiguousPathsDisplayString(CXXBasePaths &Paths)
Builds a string representing ambiguous paths from a specific derived class to different subobjects of...
The declaration was invalid; do nothing.
StmtResult ActOnSEHExceptBlock(SourceLocation Loc, Expr *FilterExpr, Stmt *Block)
void DiagnoseAutoDeductionFailure(VarDecl *VDecl, Expr *Init)
ASTConsumer & getASTConsumer() const
static DeclarationName getPrintable(DeclarationName N)
llvm::DenseSet< Module * > & getLookupModules()
Get the set of additional modules that should be checked during name lookup. A module and its imports...
ExprResult BuildImplicitMemberExpr(const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, LookupResult &R, const TemplateArgumentListInfo *TemplateArgs, bool IsDefiniteInstance)
This is a basic class for representing single OpenMP clause.
OMPClause * ActOnOpenMPUpdateClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'update' clause.
The message is sent to 'super'.
bool MergeCompatibleFunctionDecls(FunctionDecl *New, FunctionDecl *Old, Scope *S, bool MergeTypeWithOld)
Completes the merge of two function declarations that are known to be compatible. ...
ExprResult ActOnInitList(SourceLocation LBraceLoc, MultiExprArg InitArgList, SourceLocation RBraceLoc)
bool CollectStats
Flag indicating whether or not to collect detailed statistics.
void actOnDelayedExceptionSpecification(Decl *Method, ExceptionSpecificationType EST, SourceRange SpecificationRange, ArrayRef< ParsedType > DynamicExceptions, ArrayRef< SourceRange > DynamicExceptionRanges, Expr *NoexceptExpr)
Add an exception-specification to the given member function (or member function template). The exception-specification was parsed after the method itself was declared.
ObjCIvarDecl * GetIvarBackingPropertyAccessor(const ObjCMethodDecl *Method, const ObjCPropertyDecl *&PDecl) const
TokenKind
Provides a simple uniform namespace for tokens from all C languages.
Decl * ActOnTemplatedFriendTag(Scope *S, SourceLocation FriendLoc, unsigned TagSpec, SourceLocation TagLoc, CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc, AttributeList *Attr, MultiTemplateParamsArg TempParamLists)
bool RequireNonAbstractType(SourceLocation Loc, QualType T, unsigned DiagID, const Ts &...Args)
TemplateDeductionResult DeduceTemplateArguments(ClassTemplatePartialSpecializationDecl *Partial, const TemplateArgumentList &TemplateArgs, sema::TemplateDeductionInfo &Info)
Perform template argument deduction to determine whether the given template arguments match the given...
bool SetMemberAccessSpecifier(NamedDecl *MemberDecl, NamedDecl *PrevMemberDecl, AccessSpecifier LexicalAS)
Look up any declaration with any name.
AssignConvertType CheckTransparentUnionArgumentConstraints(QualType ArgType, ExprResult &RHS)
ExprResult ActOnClassPropertyRefExpr(IdentifierInfo &receiverName, IdentifierInfo &propertyName, SourceLocation receiverNameLoc, SourceLocation propertyNameLoc)
TypeSourceInfo * SubstAutoTypeSourceInfo(TypeSourceInfo *TypeWithAuto, QualType Replacement)
Substitute Replacement for auto in TypeWithAuto.
QualType performLambdaInitCaptureInitialization(SourceLocation Loc, bool ByRef, IdentifierInfo *Id, Expr *&Init)
Perform initialization analysis of the init-capture and perform any implicit conversions such as an l...
void EmitCurrentDiagnostic(unsigned DiagID)
Cause the active diagnostic on the DiagosticsEngine to be emitted. This is closely coupled to the Sem...
QualType BuildQualifiedType(QualType T, SourceLocation Loc, Qualifiers Qs, const DeclSpec *DS=nullptr)
bool CheckMemberPointerConversion(Expr *From, QualType ToType, CastKind &Kind, CXXCastPath &BasePath, bool IgnoreBaseAccess)
SourceLocation OptimizeOffPragmaLocation
This represents the last location of a "#pragma clang optimize off" directive if such a directive has...
StmtResult ActOnFinishSwitchStmt(SourceLocation SwitchLoc, Stmt *Switch, Stmt *Body)
void DiagnoseUnimplementedProperties(Scope *S, ObjCImplDecl *IMPDecl, ObjCContainerDecl *CDecl, bool SynthesizeProperties)
Represents a C++11 virt-specifier-seq.
bool FormatStringHasSArg(const StringLiteral *FExpr)
CodeCompleteConsumer * CodeCompleter
Code-completion consumer.
unsigned NumTypos
The number of typos encountered during this expression evaluation context (i.e. the number of TypoExp...
Represents one property declaration in an Objective-C interface.
bool LookupInlineAsmField(StringRef Base, StringRef Member, unsigned &Offset, SourceLocation AsmLoc)
void SetLateTemplateParser(LateTemplateParserCB *LTP, LateTemplateParserCleanupCB *LTPCleanup, void *P)
OpaquePtr< TemplateName > TemplateTy
OMPClause * ActOnOpenMPSeqCstClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'seq_cst' clause.
void CheckExplicitlyDefaultedMemberExceptionSpec(CXXMethodDecl *MD, const FunctionProtoType *T)
ObjCProtocolDecl * LookupProtocol(IdentifierInfo *II, SourceLocation IdLoc, RedeclarationKind Redecl=NotForRedeclaration)
Find the protocol with the given name, if any.
llvm::SmallPtrSet< DeclContext *, 16 > AssociatedNamespaceSet
void RegisterTypeTagForDatatype(const IdentifierInfo *ArgumentKind, uint64_t MagicValue, QualType Type, bool LayoutCompatible, bool MustBeNull)
Register a magic integral constant to be used as a type tag.
ExprResult BuildClassMessage(TypeSourceInfo *ReceiverTypeInfo, QualType ReceiverType, SourceLocation SuperLoc, Selector Sel, ObjCMethodDecl *Method, SourceLocation LBracLoc, ArrayRef< SourceLocation > SelectorLocs, SourceLocation RBracLoc, MultiExprArg Args, bool isImplicit=false)
Build an Objective-C class message expression.
MangleNumberingContext * getCurrentMangleNumberContext(const DeclContext *DC, Decl *&ManglingContextDecl)
Compute the mangling number context for a lambda expression or block literal.
bool isLibstdcxxEagerExceptionSpecHack(const Declarator &D)
Determine if we're in a case where we need to (incorrectly) eagerly parse an exception specification ...
void MarkVTableUsed(SourceLocation Loc, CXXRecordDecl *Class, bool DefinitionRequired=false)
Note that the vtable for the given class was used at the given location.
std::unique_ptr< CXXFieldCollector > FieldCollector
FieldCollector - Collects CXXFieldDecls during parsing of C++ classes.
bool isThisOutsideMemberFunctionBody(QualType BaseType)
Determine whether the given type is the type of *this that is used outside of the body of a member fu...
static NameClassification FunctionTemplate(TemplateName Name)
PragmaMSPointersToMembersKind
bool CheckUsingDeclRedeclaration(SourceLocation UsingLoc, bool HasTypenameKeyword, const CXXScopeSpec &SS, SourceLocation NameLoc, const LookupResult &Previous)
QualType BuildReferenceType(QualType T, bool LValueRef, SourceLocation Loc, DeclarationName Entity)
Build a reference type.
void ActOnMemInitializers(Decl *ConstructorDecl, SourceLocation ColonLoc, ArrayRef< CXXCtorInitializer * > MemInits, bool AnyErrors)
ActOnMemInitializers - Handle the member initializers for a constructor.
The name is a dependent name, so the results will differ from one instantiation to the next...
void ActOnLastBitfield(SourceLocation DeclStart, SmallVectorImpl< Decl * > &AllIvarDecls)
bool hasCStrMethod(const Expr *E)
Check to see if a given expression could have '.c_str()' called on it.
bool IsBuildingRecoveryCallExpr
Flag indicating if Sema is building a recovery call expression.
sema::FunctionScopeInfo * getCurFunction() const
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...
void popObjCTypeParamList(Scope *S, ObjCTypeParamList *typeParamList)
sema::CapturedRegionScopeInfo * getCurCapturedRegion()
Retrieve the current captured region, if any.
bool RequireCompleteDeclContext(CXXScopeSpec &SS, DeclContext *DC)
Require that the context specified by SS be complete.
void ActOnFields(Scope *S, SourceLocation RecLoc, Decl *TagDecl, ArrayRef< Decl * > Fields, SourceLocation LBrac, SourceLocation RBrac, AttributeList *AttrList)
StmtResult ActOnObjCAtSynchronizedStmt(SourceLocation AtLoc, Expr *SynchExpr, Stmt *SynchBody)
Constant expression in a noptr-new-declarator.
QualType CheckLogicalOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, unsigned Opc)
ExprResult PerformOpenMPImplicitIntegerConversion(SourceLocation OpLoc, Expr *Op)
ExprResult HandleExprEvaluationContextForTypeof(Expr *E)
bool AreMultipleMethodsInGlobalPool(Selector Sel, ObjCMethodDecl *BestMethod, SourceRange R, bool receiverIdOrClass)
ExprResult ActOnCXXNew(SourceLocation StartLoc, bool UseGlobal, SourceLocation PlacementLParen, MultiExprArg PlacementArgs, SourceLocation PlacementRParen, SourceRange TypeIdParens, Declarator &D, Expr *Initializer)
ActOnCXXNew - Parsed a C++ 'new' expression.
llvm::DenseMap< ParmVarDecl *, llvm::TinyPtrVector< ParmVarDecl * > > UnparsedDefaultArgInstantiationsMap
TentativeAnalysisScope(Sema &SemaRef)
ExprResult ParseObjCSelectorExpression(Selector Sel, SourceLocation AtLoc, SourceLocation SelLoc, SourceLocation LParenLoc, SourceLocation RParenLoc, bool WarnMultipleSelectors)
ParseObjCSelectorExpression - Build selector expression for @selector.
SourceLocation getLocationOfStringLiteralByte(const StringLiteral *SL, unsigned ByteNo) const
void CodeCompletePreprocessorMacroName(bool IsDefinition)
ExprResult BuildCallToObjectOfClassType(Scope *S, Expr *Object, SourceLocation LParenLoc, MultiExprArg Args, SourceLocation RParenLoc)
QualType CXXCheckConditionalOperands(ExprResult &cond, ExprResult &lhs, ExprResult &rhs, ExprValueKind &VK, ExprObjectKind &OK, SourceLocation questionLoc)
Check the operands of ?: under C++ semantics.
ExprResult ActOnStmtExpr(SourceLocation LPLoc, Stmt *SubStmt, SourceLocation RPLoc)
SourceLocation getExprLoc() const LLVM_READONLY
void UnmarkAsLateParsedTemplate(FunctionDecl *FD)
SynthesizedFunctionScope(Sema &S, DeclContext *DC)
Decl * ActOnUsingDirective(Scope *CurScope, SourceLocation UsingLoc, SourceLocation NamespcLoc, CXXScopeSpec &SS, SourceLocation IdentLoc, IdentifierInfo *NamespcName, AttributeList *AttrList)
friend bool operator!=(const ActiveTemplateInstantiation &X, const ActiveTemplateInstantiation &Y)
QualType NSValuePointer
Pointer to NSValue type (NSValue *).
CXXSpecialMember getSpecialMember(const CXXMethodDecl *MD)
getSpecialMember - get the special member enum for a method.
ExprResult checkUnknownAnyCast(SourceRange TypeRange, QualType CastType, Expr *CastExpr, CastKind &CastKind, ExprValueKind &VK, CXXCastPath &Path)
void DiagnoseOwningPropertyGetterSynthesis(const ObjCImplementationDecl *D)
CXXDestructorDecl * DeclareImplicitDestructor(CXXRecordDecl *ClassDecl)
Declare the implicit destructor for the given class.
FunctionTemplateDecl * getMoreSpecializedTemplate(FunctionTemplateDecl *FT1, FunctionTemplateDecl *FT2, SourceLocation Loc, TemplatePartialOrderingContext TPOC, unsigned NumCallArguments1, unsigned NumCallArguments2)
Returns the more specialized function template according to the rules of function template partial or...
Defines various enumerations that describe declaration and type specifiers.
The expression in a static assertion.
AccessResult CheckAllocationAccess(SourceLocation OperatorLoc, SourceRange PlacementRange, CXXRecordDecl *NamingClass, DeclAccessPair FoundDecl, bool Diagnose=true)
Checks access to an overloaded operator new or delete.
ExprResult BuildCXXMemberCallExpr(Expr *Exp, NamedDecl *FoundDecl, CXXConversionDecl *Method, bool HadMultipleCandidates)
ExprResult BuildOverloadedArrowExpr(Scope *S, Expr *Base, SourceLocation OpLoc, bool *NoArrowOperatorFound=nullptr)
void maybeExtendBlockObject(ExprResult &E)
Do an explicit extend of the given block pointer if we're in ARC.
TypeResult ActOnTagTemplateIdType(TagUseKind TUK, TypeSpecifierType TagSpec, SourceLocation TagLoc, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, TemplateTy TemplateD, SourceLocation TemplateLoc, SourceLocation LAngleLoc, ASTTemplateArgsPtr TemplateArgsIn, SourceLocation RAngleLoc)
Parsed an elaborated-type-specifier that refers to a template-id, such as class T::template apply<U>...
OMPClause * ActOnOpenMPReductionClause(ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc, CXXScopeSpec &ReductionIdScopeSpec, const DeclarationNameInfo &ReductionId)
Called on well-formed 'reduction' clause.
Expression in a case label.
void InstantiateClassTemplateSpecializationMembers(SourceLocation PointOfInstantiation, ClassTemplateSpecializationDecl *ClassTemplateSpec, TemplateSpecializationKind TSK)
Instantiate the definitions of all of the members of the given class template specialization, which was named as part of an explicit instantiation.
MemInitResult BuildDelegatingInitializer(TypeSourceInfo *TInfo, Expr *Init, CXXRecordDecl *ClassDecl)
A class for storing results from argument-dependent lookup.
OpaquePtr< QualType > TypeTy
bool CheckPointerConversion(Expr *From, QualType ToType, CastKind &Kind, CXXCastPath &BasePath, bool IgnoreBaseAccess)
void createImplicitModuleImportForErrorRecovery(SourceLocation Loc, Module *Mod)
Create an implicit import of the given module at the given source location, for error recovery...
Decl * ActOnTemplateTemplateParameter(Scope *S, SourceLocation TmpLoc, TemplateParameterList *Params, SourceLocation EllipsisLoc, IdentifierInfo *ParamName, SourceLocation ParamNameLoc, unsigned Depth, unsigned Position, SourceLocation EqualLoc, ParsedTemplateArgument DefaultArg)
Decl * ActOnExceptionDeclarator(Scope *S, Declarator &D)
void diagnoseTypo(const TypoCorrection &Correction, const PartialDiagnostic &TypoDiag, bool ErrorRecovery=true)
void MarkMemberReferenced(MemberExpr *E)
Perform reference-marking and odr-use handling for a MemberExpr.
Base class for declarations which introduce a typedef-name.
Abstract interface for a consumer of code-completion information.
sema::LambdaScopeInfo * getCurLambda()
Retrieve the current lambda scope info, if any.
An opaque identifier used by SourceManager which refers to a source file (MemoryBuffer) along with it...
Represents a template argument.
void WarnExactTypedMethods(ObjCMethodDecl *Method, ObjCMethodDecl *MethodDecl, bool IsProtocolMethodDecl)
void ActOnReenterFunctionContext(Scope *S, Decl *D)
Push the parameters of D, which must be a function, into scope.
OMPClause * ActOnOpenMPNumThreadsClause(Expr *NumThreads, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'num_threads' clause.
ExprResult PerformCopyInitialization(const InitializedEntity &Entity, SourceLocation EqualLoc, ExprResult Init, bool TopLevelOfInitList=false, bool AllowExplicit=false)
ParserCompletionContext
Describes the context in which code completion occurs.
ParsedType ActOnDelayedDefaultTemplateArg(const IdentifierInfo &II, SourceLocation NameLoc)
For compatibility with MSVC, we delay parsing of some default template type arguments until instantia...
StmtResult ActOnOpenMPCancelDirective(SourceLocation StartLoc, SourceLocation EndLoc, OpenMPDirectiveKind CancelRegion)
Called on well-formed '#pragma omp cancel'.
void collectUnexpandedParameterPacks(TemplateArgument Arg, SmallVectorImpl< UnexpandedParameterPack > &Unexpanded)
Collect the set of unexpanded parameter packs within the given template argument. ...
DeclContextLookupResult LookupConstructors(CXXRecordDecl *Class)
Look up the constructors for the given class.
void DecomposeUnqualifiedId(const UnqualifiedId &Id, TemplateArgumentListInfo &Buffer, DeclarationNameInfo &NameInfo, const TemplateArgumentListInfo *&TemplateArgs)
TagTypeKind
The kind of a tag type.
QualType FindCompositePointerType(SourceLocation Loc, ExprResult &E1, ExprResult &E2, bool *NonStandardCompositeType=nullptr)
bool ActOnCXXNestedNameSpecifier(Scope *S, IdentifierInfo &Identifier, SourceLocation IdentifierLoc, SourceLocation CCLoc, ParsedType ObjectType, bool EnteringContext, CXXScopeSpec &SS, bool ErrorRecoveryLookup=false, bool *IsCorrectedToColon=nullptr)
The parser has parsed a nested-name-specifier 'identifier::'.
bool checkStringLiteralArgumentAttr(const AttributeList &Attr, unsigned ArgNum, StringRef &Str, SourceLocation *ArgLocation=nullptr)
Check if the argument ArgNum of Attr is a ASCII string literal. If not emit an error and return false...
Abstract base class used to perform a contextual implicit conversion from an expression to any type p...
bool RebuildTemplateParamsInCurrentInstantiation(TemplateParameterList *Params)
Rebuild the template parameters now that we know we're in a current instantiation.
void ActOnLambdaError(SourceLocation StartLoc, Scope *CurScope, bool IsInstantiation=false)
void checkUnusedDeclAttributes(Declarator &D)
llvm::DenseMap< IdentifierInfo *, SrcLocSet > IdentifierSourceLocations
LateTemplateParserCleanupCB * LateTemplateParserCleanup
ExprResult ActOnBuiltinOffsetOf(Scope *S, SourceLocation BuiltinLoc, SourceLocation TypeLoc, ParsedType ParsedArgTy, OffsetOfComponent *CompPtr, unsigned NumComponents, SourceLocation RParenLoc)
SmallVector< CXXBindTemporaryExpr *, 8 > DelayedDecltypeBinds
If we are processing a decltype type, a set of temporary binding expressions for which we have deferr...
StmtResult ActOnObjCAutoreleasePoolStmt(SourceLocation AtLoc, Stmt *Body)
CXXConstructorDecl * DeclareImplicitCopyConstructor(CXXRecordDecl *ClassDecl)
Declare the implicit copy constructor for the given class.
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...
bool SubstParmTypes(SourceLocation Loc, ParmVarDecl **Params, unsigned NumParams, const MultiLevelTemplateArgumentList &TemplateArgs, SmallVectorImpl< QualType > &ParamTypes, SmallVectorImpl< ParmVarDecl * > *OutParams=nullptr)
Substitute the given template arguments into the given set of parameters, producing the set of parame...
Don't merge availability attributes at all.
ParmVarDecl * BuildParmVarDeclForTypedef(DeclContext *DC, SourceLocation Loc, QualType T)
Synthesizes a variable for a parameter arising from a typedef.
ExprResult BuildObjCStringLiteral(SourceLocation AtLoc, StringLiteral *S)
void DiagnoseUnusedBackingIvarInAccessor(Scope *S, const ObjCImplementationDecl *ImplD)
ObjCContainerKind getObjCContainerKind() const
void recordUseOfEvaluatedWeak(const ExprT *E, bool IsRead=true)
bool IsInvalidUnlessNestedName(Scope *S, CXXScopeSpec &SS, IdentifierInfo &Identifier, SourceLocation IdentifierLoc, SourceLocation ColonLoc, ParsedType ObjectType, bool EnteringContext)
void diagnoseNullResettableSynthesizedSetters(const ObjCImplDecl *impDecl)
Diagnose any null-resettable synthesized setters.
ExprResult BuildDependentDeclRefExpr(const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, const DeclarationNameInfo &NameInfo, const TemplateArgumentListInfo *TemplateArgs)
ObjCMethodDecl * NSNumberLiteralMethods[NSAPI::NumNSNumberLiteralMethods]
The Objective-C NSNumber methods used to create NSNumber literals.
ExprResult BuildExpressionTrait(ExpressionTrait OET, SourceLocation KWLoc, Expr *Queried, SourceLocation RParen)
ExprResult ActOnUnaryOp(Scope *S, SourceLocation OpLoc, tok::TokenKind Op, Expr *Input)
OMPClause * ActOnOpenMPLinearClause(ArrayRef< Expr * > VarList, Expr *Step, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc)
Called on well-formed 'linear' clause.
Represents a delete expression for memory deallocation and destructor calls, e.g. "delete[] pArray"...
void AddAlignmentAttributesForRecord(RecordDecl *RD)
bool CheckFunctionReturnType(QualType T, SourceLocation Loc)
void InstantiateVariableInitializer(VarDecl *Var, VarDecl *OldVar, const MultiLevelTemplateArgumentList &TemplateArgs)
Instantiate the initializer of a variable.
The base class of all kinds of template declarations (e.g., class, function, etc.).
bool GetFormatNSStringIdx(const FormatAttr *Format, unsigned &Idx)
void EnterDeclaratorContext(Scope *S, DeclContext *DC)
A template instantiation that is currently in progress.
Expr * recreateSyntacticForm(PseudoObjectExpr *E)
bool IsFloatingPointPromotion(QualType FromType, QualType ToType)
OverloadedOperatorKind
Enumeration specifying the different kinds of C++ overloaded operators.
void deduceClosureReturnType(sema::CapturingScopeInfo &CSI)
Deduce a block or lambda's return type based on the return statements present in the body...
QualType GetSignedVectorType(QualType V)
void DeclApplyPragmaWeak(Scope *S, NamedDecl *ND, WeakInfo &W)
const internal::VariadicAllOfMatcher< Type > type
Matches Types in the clang AST.
ExprResult checkPseudoObjectAssignment(Scope *S, SourceLocation OpLoc, BinaryOperatorKind Opcode, Expr *LHS, Expr *RHS)
ExprResult ImpCastExprToType(Expr *E, QualType Type, CastKind CK, ExprValueKind VK=VK_RValue, const CXXCastPath *BasePath=nullptr, CheckedConversionKind CCK=CCK_ImplicitConversion)
void ActOnEnumBody(SourceLocation EnumLoc, SourceLocation LBraceLoc, SourceLocation RBraceLoc, Decl *EnumDecl, ArrayRef< Decl * > Elements, Scope *S, AttributeList *Attr)
void ActOnCapturedRegionError()
void CheckConflictingOverridingMethod(ObjCMethodDecl *Method, ObjCMethodDecl *Overridden, bool IsProtocolMethodDecl)
void ProcessPragmaWeak(Scope *S, Decl *D)
bool RequireLiteralType(SourceLocation Loc, QualType T, unsigned DiagID, const Ts &...Args)
void ActOnTagFinishDefinition(Scope *S, Decl *TagDecl, SourceLocation RBraceLoc)
NamedDecl * DeclClonePragmaWeak(NamedDecl *ND, IdentifierInfo *II, SourceLocation Loc)
Reads an AST files chain containing the contents of a translation unit.
ImplicitExceptionSpecification ComputeDefaultedCopyAssignmentExceptionSpec(CXXMethodDecl *MD)
Determine what sort of exception specification a defautled copy assignment operator of a class will h...
ObjCLiteralKind CheckLiteralKind(Expr *FromE)
void CodeCompleteTag(Scope *S, unsigned TagSpec)
bool BuildCXXNestedNameSpecifier(Scope *S, IdentifierInfo &Identifier, SourceLocation IdentifierLoc, SourceLocation CCLoc, QualType ObjectType, bool EnteringContext, CXXScopeSpec &SS, NamedDecl *ScopeLookupResult, bool ErrorRecoveryLookup, bool *IsCorrectedToColon=nullptr)
Build a new nested-name-specifier for "identifier::", as described by ActOnCXXNestedNameSpecifier.
void ActOnParamDefaultArgument(Decl *param, SourceLocation EqualLoc, Expr *defarg)
void RecordParsingTemplateParameterDepth(unsigned Depth)
This is used to inform Sema what the current TemplateParameterDepth is during Parsing. Currently it is used to pass on the depth when parsing generic lambda 'auto' parameters.
void HandleFunctionTypeMismatch(PartialDiagnostic &PDiag, QualType FromType, QualType ToType)
StmtResult ActOnExprStmtError()
Decl * ActOnStartClassInterface(Scope *S, SourceLocation AtInterfaceLoc, IdentifierInfo *ClassName, SourceLocation ClassLoc, ObjCTypeParamList *typeParamList, IdentifierInfo *SuperName, SourceLocation SuperLoc, ArrayRef< ParsedType > SuperTypeArgs, SourceRange SuperTypeArgsRange, Decl *const *ProtoRefs, unsigned NumProtoRefs, const SourceLocation *ProtoLocs, SourceLocation EndProtoLoc, AttributeList *AttrList)
void ActOnModuleBegin(SourceLocation DirectiveLoc, Module *Mod)
The parsed has entered a submodule.
static NameClassification VarTemplate(TemplateName Name)
bool checkMSInheritanceAttrOnDefinition(CXXRecordDecl *RD, SourceRange Range, bool BestCase, MSInheritanceAttr::Spelling SemanticSpelling)
ExprResult ActOnAsTypeExpr(Expr *E, ParsedType ParsedDestTy, SourceLocation BuiltinLoc, SourceLocation RParenLoc)
__builtin_astype(...)
bool DiagRuntimeBehavior(SourceLocation Loc, const Stmt *Statement, const PartialDiagnostic &PD)
Conditionally issue a diagnostic based on the current evaluation context.
std::string getFixItZeroInitializerForType(QualType T, SourceLocation Loc) const
Get a string to suggest for zero-initialization of a type.
OMPClause * ActOnOpenMPSimpleClause(OpenMPClauseKind Kind, unsigned Argument, SourceLocation ArgumentLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
void clearDelayedTypo(TypoExpr *TE)
Clears the state of the given TypoExpr.
void makeMergedDefinitionVisible(NamedDecl *ND, SourceLocation Loc)
Make a merged definition of an existing hidden definition ND visible at the specified location...
LateInstantiatedAttribute(const Attr *A, LocalInstantiationScope *S, Decl *D)
void CheckCompatibleReinterpretCast(QualType SrcType, QualType DestType, bool IsDereference, SourceRange Range)
QualType BuildPointerType(QualType T, SourceLocation Loc, DeclarationName Entity)
Build a pointer type.
EnterExpressionEvaluationContext(Sema &Actions, Sema::ExpressionEvaluationContext NewContext, Decl *LambdaContextDecl=nullptr, bool IsDecltype=false)
SectionAttr * mergeSectionAttr(Decl *D, SourceRange Range, StringRef Name, unsigned AttrSpellingListIndex)
llvm::SmallSet< SourceLocation, 2 > SrcLocSet
void ActOnOpenMPRegionStart(OpenMPDirectiveKind DKind, Scope *CurScope)
Initialization of captured region for OpenMP region.
A non-depnedent component of the parameter did not match the corresponding component of the argument...
bool CheckARCMethodDecl(ObjCMethodDecl *method)
Check a method declaration for compatibility with the Objective-C ARC conventions.
bool GlobalNewDeleteDeclared
StmtResult ActOnIndirectGotoStmt(SourceLocation GotoLoc, SourceLocation StarLoc, Expr *DestExp)
bool SubstExprs(Expr **Exprs, unsigned NumExprs, bool IsCall, const MultiLevelTemplateArgumentList &TemplateArgs, SmallVectorImpl< Expr * > &Outputs)
Substitute the given template arguments into a list of expressions, expanding pack expansions if requ...
bool CheckUnaryExprOrTypeTraitOperand(Expr *E, UnaryExprOrTypeTrait ExprKind)
Check the constraints on expression operands to unary type expression and type traits.
bool InstantiateClass(SourceLocation PointOfInstantiation, CXXRecordDecl *Instantiation, CXXRecordDecl *Pattern, const MultiLevelTemplateArgumentList &TemplateArgs, TemplateSpecializationKind TSK, bool Complain=true)
Instantiate the definition of a class from a given pattern.
bool IsBlockPointerConversion(QualType FromType, QualType ToType, QualType &ConvertedType)
ImplicitExceptionSpecification ComputeDefaultedDefaultCtorExceptionSpec(SourceLocation Loc, CXXMethodDecl *MD)
Determine what sort of exception specification a defaulted copy constructor of a class will have...
void handleTagNumbering(const TagDecl *Tag, Scope *TagScope)
bool tryToRecoverWithCall(ExprResult &E, const PartialDiagnostic &PD, bool ForceComplain=false, bool(*IsPlausibleResult)(QualType)=nullptr)
Try to recover by turning the given expression into a call. Returns true if recovery was attempted or...
void PushDeclContext(Scope *S, DeclContext *DC)
Set the current declaration context until it gets popped.
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.
VisibilityAttr * mergeVisibilityAttr(Decl *D, SourceRange Range, VisibilityAttr::VisibilityType Vis, unsigned AttrSpellingListIndex)
The lookup found an overload set of literal operator templates, which expect the characters of the sp...
StmtResult ActOnOpenMPTaskgroupDirective(Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp taskgroup'.
bool IsMemberPointerConversion(Expr *From, QualType FromType, QualType ToType, bool InOverloadResolution, QualType &ConvertedType)
ExprResult BuildCXXFunctionalCastExpr(TypeSourceInfo *TInfo, SourceLocation LParenLoc, Expr *CastExpr, SourceLocation RParenLoc)
bool CheckOverloadedOperatorDeclaration(FunctionDecl *FnDecl)
bool isSimpleTypeSpecifier(tok::TokenKind Kind) const
Determine whether the token kind starts a simple-type-specifier.
TemplateSpecializationKind
Describes the kind of template specialization that a particular template specialization declaration r...
sema::CompoundScopeInfo & getCurCompoundScope() const
IdentifierResolver IdResolver
static CastKind ScalarTypeToBooleanCastKind(QualType ScalarTy)
TypeResult ActOnTypenameType(Scope *S, SourceLocation TypenameLoc, const CXXScopeSpec &SS, const IdentifierInfo &II, SourceLocation IdLoc)
Called when the parser has parsed a C++ typename specifier, e.g., "typename T::type".
ExprResult ActOnMemberAccessExpr(Scope *S, Expr *Base, SourceLocation OpLoc, tok::TokenKind OpKind, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, UnqualifiedId &Member, Decl *ObjCImpDecl)
void ActOnStartCXXMemberDeclarations(Scope *S, Decl *TagDecl, SourceLocation FinalLoc, bool IsFinalSpelledSealed, SourceLocation LBraceLoc)
ExprResult DefaultFunctionArrayConversion(Expr *E)
DefaultFunctionArrayConversion (C99 6.3.2.1p3, C99 6.3.2.1p4).
void CheckCastAlign(Expr *Op, QualType T, SourceRange TRange)
void MergeTypedefNameDecl(TypedefNameDecl *New, LookupResult &OldDecls)
ExprResult ActOnPredefinedExpr(SourceLocation Loc, tok::TokenKind Kind)
MemInitResult BuildBaseInitializer(QualType BaseType, TypeSourceInfo *BaseTInfo, Expr *Init, CXXRecordDecl *ClassDecl, SourceLocation EllipsisLoc)
ParmVarDecl * CheckParameter(DeclContext *DC, SourceLocation StartLoc, SourceLocation NameLoc, IdentifierInfo *Name, QualType T, TypeSourceInfo *TSInfo, StorageClass SC)
Abstract interface for a module loader.
NamedDecl * getCurFunctionOrMethodDecl()
bool ActOnSuperScopeSpecifier(SourceLocation SuperLoc, SourceLocation ColonColonLoc, CXXScopeSpec &SS)
The parser has parsed a '__super' nested-name-specifier.
ExprResult BuildEmptyCXXFoldExpr(SourceLocation EllipsisLoc, BinaryOperatorKind Operator)
ExprResult ActOnConstantExpression(ExprResult Res)
ExprResult SemaConvertVectorExpr(Expr *E, TypeSourceInfo *TInfo, SourceLocation BuiltinLoc, SourceLocation RParenLoc)
SemaConvertVectorExpr - Handle __builtin_convertvector.
OMPClause * ActOnOpenMPSingleExprWithArgClause(OpenMPClauseKind Kind, unsigned Argument, Expr *Expr, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ArgumentLoc, SourceLocation CommaLoc, SourceLocation EndLoc)
void InstantiateFunctionDefinition(SourceLocation PointOfInstantiation, FunctionDecl *Function, bool Recursive=false, bool DefinitionRequired=false)
Instantiate the definition of the given function from its template.
#pragma vtordisp(push, mode)
CXXConstructorDecl * DeclareImplicitDefaultConstructor(CXXRecordDecl *ClassDecl)
Declare the implicit default constructor for the given class.
void CodeCompleteNamespaceAliasDecl(Scope *S)
llvm::MapVector< FieldDecl *, DeleteLocs > DeleteExprs
A dependently-generated diagnostic.
void ActOnPragmaMSComment(PragmaMSCommentKind Kind, StringRef Arg)
ExprResult checkPseudoObjectRValue(Expr *E)
void CodeCompleteUsingDirective(Scope *S)
ExprResult BuildInstanceMessage(Expr *Receiver, QualType ReceiverType, SourceLocation SuperLoc, Selector Sel, ObjCMethodDecl *Method, SourceLocation LBracLoc, ArrayRef< SourceLocation > SelectorLocs, SourceLocation RBracLoc, MultiExprArg Args, bool isImplicit=false)
Build an Objective-C instance message expression.
ExprResult IgnoredValueConversions(Expr *E)
void LookupOverloadedOperatorName(OverloadedOperatorKind Op, Scope *S, QualType T1, QualType T2, UnresolvedSetImpl &Functions)
AvailabilityMergeKind
Describes the kind of merge to perform for availability attributes (including "deprecated", "unavailable", and "availability").
NamedDecl * ActOnTypedefDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous)
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.
bool IsOpenMPCapturedVar(VarDecl *VD)
Check if the specified variable is used in a private clause in Checks if the specified variable is us...
Encapsulates the data about a macro definition (e.g. its tokens).
OnOffSwitch
Defines the possible values of an on-off-switch (C99 6.10.6p2).
ObjCMethodDecl * LookupInstanceMethodInGlobalPool(Selector Sel, SourceRange R, bool receiverIdOrClass=false)
IdentifierInfo * getNSErrorIdent()
Retrieve the identifier "NSError".
TypeResult actOnObjCProtocolQualifierType(SourceLocation lAngleLoc, ArrayRef< Decl * > protocols, ArrayRef< SourceLocation > protocolLocs, SourceLocation rAngleLoc)
StmtResult ActOnMSDependentExistsStmt(SourceLocation KeywordLoc, bool IsIfExists, CXXScopeSpec &SS, UnqualifiedId &Name, Stmt *Nested)
OMPClause * ActOnOpenMPAlignedClause(ArrayRef< Expr * > VarList, Expr *Alignment, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc)
Called on well-formed 'aligned' clause.
bool isCurrentClassName(const IdentifierInfo &II, Scope *S, const CXXScopeSpec *SS=nullptr)
StmtResult ActOnFinishFullStmt(Stmt *Stmt)
void DiagnoseUnusedParameters(ParmVarDecl *const *Begin, ParmVarDecl *const *End)
Diagnose any unused parameters in the given sequence of ParmVarDecl pointers.
StmtResult ActOnCaseStmt(SourceLocation CaseLoc, Expr *LHSVal, SourceLocation DotDotDotLoc, Expr *RHSVal, SourceLocation ColonLoc)
ExprResult getExpression() const
ExprResult CreateOverloadedArraySubscriptExpr(SourceLocation LLoc, SourceLocation RLoc, Expr *Base, Expr *Idx)
ExprResult CheckCXXBooleanCondition(Expr *CondExpr)
CheckCXXBooleanCondition - Returns true if conversion to bool is invalid.
bool IsPointerConversion(Expr *From, QualType FromType, QualType ToType, bool InOverloadResolution, QualType &ConvertedType, bool &IncompatibleObjC)
ExprResult BuildObjCEncodeExpression(SourceLocation AtLoc, TypeSourceInfo *EncodedTypeInfo, SourceLocation RParenLoc)
DeclarationName VAListTagName
void ActOnStartOfLambdaDefinition(LambdaIntroducer &Intro, Declarator &ParamInfo, Scope *CurScope)
void ActOnPragmaMSPointersToMembers(LangOptions::PragmaMSPointersToMembersKind Kind, SourceLocation PragmaLoc)
SourceManager & getSourceManager() const
bool CheckLiteralOperatorDeclaration(FunctionDecl *FnDecl)
The lookup is a reference to this name that is not for the purpose of redeclaring the name...
void ActOnTagDefinitionError(Scope *S, Decl *TagDecl)
The template argument was specified in the code or was instantiated with some deduced template argume...
ExprResult BuildCXXFoldExpr(SourceLocation LParenLoc, Expr *LHS, BinaryOperatorKind Operator, SourceLocation EllipsisLoc, Expr *RHS, SourceLocation RParenLoc)
ExprResult BuildLiteralOperatorCall(LookupResult &R, DeclarationNameInfo &SuffixInfo, ArrayRef< Expr * > Args, SourceLocation LitEndLoc, TemplateArgumentListInfo *ExplicitTemplateArgs=nullptr)
ExternalSemaSource * getExternalSource() const
ArraySubscriptExpr - [C99 6.5.2.1] Array Subscripting.
PrintingPolicy getPrintingPolicy() const
Retrieve a suitable printing policy.
CheckTemplateArgumentKind
Specifies the context in which a particular template argument is being checked.
bool CheckExceptionSpecSubset(const PartialDiagnostic &DiagID, const PartialDiagnostic &NoteID, const FunctionProtoType *Superset, SourceLocation SuperLoc, const FunctionProtoType *Subset, SourceLocation SubLoc)
bool ConvertArgumentsForCall(CallExpr *Call, Expr *Fn, FunctionDecl *FDecl, const FunctionProtoType *Proto, ArrayRef< Expr * > Args, SourceLocation RParenLoc, bool ExecConfig=false)
void add(const sema::DelayedDiagnostic &diag)
Adds a delayed diagnostic.
LocalInstantiationScope * Scope
bool ProcessAccessDeclAttributeList(AccessSpecDecl *ASDecl, const AttributeList *AttrList)
Represents a C++ base or member initializer.
void PushExpressionEvaluationContext(ExpressionEvaluationContext NewContext, Decl *LambdaContextDecl=nullptr, bool IsDecltype=false)
void RestoreNestedNameSpecifierAnnotation(void *Annotation, SourceRange AnnotationRange, CXXScopeSpec &SS)
Given an annotation pointer for a nested-name-specifier, restore the nested-name-specifier structure...
void ImplMethodsVsClassMethods(Scope *S, ObjCImplDecl *IMPDecl, ObjCContainerDecl *IDecl, bool IncompleteImpl=false)
ExprResult ActOnCXXBoolLiteral(SourceLocation OpLoc, tok::TokenKind Kind)
ActOnCXXBoolLiteral - Parse {true,false} literals.
ExprResult CheckExtVectorCast(SourceRange R, QualType DestTy, Expr *CastExpr, CastKind &Kind)
bool CheckDerivedToBaseConversion(QualType Derived, QualType Base, SourceLocation Loc, SourceRange Range, CXXCastPath *BasePath=nullptr, bool IgnoreAccess=false)
void CodeCompleteObjCSelector(Scope *S, ArrayRef< IdentifierInfo * > SelIdents)
bool isDeclInScope(NamedDecl *D, DeclContext *Ctx, Scope *S=nullptr, bool AllowInlineNamespace=false)
ExprResult BuildObjCBoxedExpr(SourceRange SR, Expr *ValueExpr)
FunctionDecl * getCurFunctionDecl()
EnumConstantDecl * CheckEnumConstant(EnumDecl *Enum, EnumConstantDecl *LastEnumConst, SourceLocation IdLoc, IdentifierInfo *Id, Expr *val)
QualType CheckPointerToMemberOperands(ExprResult &LHS, ExprResult &RHS, ExprValueKind &VK, SourceLocation OpLoc, bool isIndirect)
static Scope * getScopeForDeclContext(Scope *S, DeclContext *DC)
ExprResult ActOnCXXTypeConstructExpr(ParsedType TypeRep, SourceLocation LParenLoc, MultiExprArg Exprs, SourceLocation RParenLoc)
ExprResult HandleExprPropertyRefExpr(const ObjCObjectPointerType *OPT, Expr *BaseExpr, SourceLocation OpLoc, DeclarationName MemberName, SourceLocation MemberLoc, SourceLocation SuperLoc, QualType SuperType, bool Super)
void diagnoseMissingImport(SourceLocation Loc, NamedDecl *Decl, bool NeedDefinition, bool Recover=true)
Diagnose that the specified declaration needs to be visible but isn't, and suggest a module import th...
NamedDecl * ActOnCXXMemberDeclarator(Scope *S, AccessSpecifier AS, Declarator &D, MultiTemplateParamsArg TemplateParameterLists, Expr *BitfieldWidth, const VirtSpecifiers &VS, InClassInitStyle InitStyle)
void CheckForFunctionRedefinition(FunctionDecl *FD, const FunctionDecl *EffectiveDefinition=nullptr)
UnparsedDefaultArgInstantiationsMap UnparsedDefaultArgInstantiations
A mapping from parameters with unparsed default arguments to the set of instantiations of each parame...
TemplateParameterList * MatchTemplateParametersToScopeSpecifier(SourceLocation DeclStartLoc, SourceLocation DeclLoc, const CXXScopeSpec &SS, TemplateIdAnnotation *TemplateId, ArrayRef< TemplateParameterList * > ParamLists, bool IsFriend, bool &IsExplicitSpecialization, bool &Invalid)
Match the given template parameter lists to the given scope specifier, returning the template paramet...
void CodeCompleteObjCForCollection(Scope *S, DeclGroupPtrTy IterationVar)
OpenMPScheduleClauseKind
OpenMP attributes for 'schedule' clause.
QualType BuildDecltypeType(Expr *E, SourceLocation Loc, bool AsUnevaluated=true)
bool isImplicitlyDeleted(FunctionDecl *FD)
Determine whether the given function is an implicitly-deleted special member function.
VarDecl * BuildObjCExceptionDecl(TypeSourceInfo *TInfo, QualType ExceptionType, SourceLocation StartLoc, SourceLocation IdLoc, IdentifierInfo *Id, bool Invalid=false)
Build a type-check a new Objective-C exception variable declaration.
ForRangeStatus BuildForRangeBeginEndCall(Scope *S, SourceLocation Loc, SourceLocation RangeLoc, VarDecl *Decl, BeginEndFunction BEF, const DeclarationNameInfo &NameInfo, LookupResult &MemberLookup, OverloadCandidateSet *CandidateSet, Expr *Range, ExprResult *CallExpr)
SmallVector< ExpressionEvaluationContextRecord, 8 > ExprEvalContexts
A stack of expression evaluation contexts.
AccessResult CheckMemberOperatorAccess(SourceLocation Loc, Expr *ObjectExpr, Expr *ArgExpr, DeclAccessPair FoundDecl)
TypeSourceInfo * RebuildTypeInCurrentInstantiation(TypeSourceInfo *T, SourceLocation Loc, DeclarationName Name)
Rebuilds a type within the context of the current instantiation.
bool checkObjCBridgeRelatedComponents(SourceLocation Loc, QualType DestType, QualType SrcType, ObjCInterfaceDecl *&RelatedClass, ObjCMethodDecl *&ClassMethod, ObjCMethodDecl *&InstanceMethod, TypedefNameDecl *&TDNDecl, bool CfToNs)
DeclGroupPtrTy FinalizeDeclaratorGroup(Scope *S, const DeclSpec &DS, ArrayRef< Decl * > Group)
void CodeCompleteObjCAtStatement(Scope *S)
void CheckShadow(Scope *S, VarDecl *D, const LookupResult &R)
Diagnose variable or built-in function shadowing. Implements -Wshadow.
void ActOnPragmaRedefineExtname(IdentifierInfo *WeakName, IdentifierInfo *AliasName, SourceLocation PragmaLoc, SourceLocation WeakNameLoc, SourceLocation AliasNameLoc)
ExprResult CreateBuiltinUnaryOp(SourceLocation OpLoc, UnaryOperatorKind Opc, Expr *InputExpr)
static NameClassification Error()
DeclResult ActOnExplicitInstantiation(Scope *S, SourceLocation ExternLoc, SourceLocation TemplateLoc, unsigned TagSpec, SourceLocation KWLoc, const CXXScopeSpec &SS, TemplateTy Template, SourceLocation TemplateNameLoc, SourceLocation LAngleLoc, ASTTemplateArgsPtr TemplateArgs, SourceLocation RAngleLoc, AttributeList *Attr)
TemplateName getTemplateName() const
ExprResult ParseObjCEncodeExpression(SourceLocation AtLoc, SourceLocation EncodeLoc, SourceLocation LParenLoc, ParsedType Ty, SourceLocation RParenLoc)
ExprResult ActOnCXXTypeid(SourceLocation OpLoc, SourceLocation LParenLoc, bool isType, void *TyOrExpr, SourceLocation RParenLoc)
ActOnCXXTypeid - Parse typeid( something ).
ExceptionSpecificationType
The various types of exception specifications that exist in C++11.
void ActOnCXXForRangeDecl(Decl *D)
OpenMPDefaultClauseKind
OpenMP attributes for 'default' clause.
friend class ArgumentPackSubstitutionRAII
Decl * BuildAnonymousStructOrUnion(Scope *S, DeclSpec &DS, AccessSpecifier AS, RecordDecl *Record, const PrintingPolicy &Policy)
Deduction failed; that's all we know.
ExprResult CorrectDelayedTyposInExpr(ExprResult ER, VarDecl *InitDecl=nullptr, llvm::function_ref< ExprResult(Expr *)> Filter=[](Expr *E) -> ExprResult{return E;})
ExprResult BuildOverloadedCallExpr(Scope *S, Expr *Fn, UnresolvedLookupExpr *ULE, SourceLocation LParenLoc, MultiExprArg Args, SourceLocation RParenLoc, Expr *ExecConfig, bool AllowTypoCorrection=true)
static NameClassification Unknown()
ObjCInterfaceDecl * NSArrayDecl
The declaration of the Objective-C NSArray class.
~ArgumentPackSubstitutionIndexRAII()
DeclGroupPtrTy ActOnOpenMPThreadprivateDirective(SourceLocation Loc, ArrayRef< Expr * > VarList)
Called on well-formed '#pragma omp threadprivate'.
StmtResult ActOnCXXForRangeIdentifier(Scope *S, SourceLocation IdentLoc, IdentifierInfo *Ident, ParsedAttributes &Attrs, SourceLocation AttrEnd)
void SubstExceptionSpec(FunctionDecl *New, const FunctionProtoType *Proto, const MultiLevelTemplateArgumentList &Args)
ExprResult BuildBuiltinOffsetOf(SourceLocation BuiltinLoc, TypeSourceInfo *TInfo, OffsetOfComponent *CompPtr, unsigned NumComponents, SourceLocation RParenLoc)
__builtin_offsetof(type, a.b[123][456].c)
FPContractStateRAII(Sema &S)
SmallVector< BlockDecl *, 8 > ExprCleanupObjects
DeclResult ActOnModuleImport(SourceLocation AtLoc, SourceLocation ImportLoc, ModuleIdPath Path)
The parser has processed a module import declaration.
ExprResult BuildCXXConstructExpr(SourceLocation ConstructLoc, QualType DeclInitType, CXXConstructorDecl *Constructor, MultiExprArg Exprs, bool HadMultipleCandidates, bool IsListInitialization, bool IsStdInitListInitialization, bool RequiresZeroInit, unsigned ConstructKind, SourceRange ParenRange)
static SourceRange getPrintable(SourceLocation L)
Represents a base class of a C++ class.
bool isUnevaluated() const
void CodeCompleteObjCPassingType(Scope *S, ObjCDeclSpec &DS, bool IsParameter)
bool isUnexpandedParameterPackPermitted()
Determine whether it's possible for an unexpanded parameter pack to be valid in this location...
static QualType GetTypeFromParser(ParsedType Ty, TypeSourceInfo **TInfo=nullptr)
void checkTargetAttr(SourceLocation LiteralLoc, StringRef Str)
void checkClassLevelDLLAttribute(CXXRecordDecl *Class)
Check class-level dllimport/dllexport attribute.
PragmaStack< StringLiteral * > ConstSegStack
OMPThreadPrivateDecl * CheckOMPThreadPrivateDecl(SourceLocation Loc, ArrayRef< Expr * > VarList)
Builds a new OpenMPThreadPrivateDecl and checks its correctness.
void DiagnoseSentinelCalls(NamedDecl *D, SourceLocation Loc, ArrayRef< Expr * > Args)
ArrayRef< QualType > Exceptions
Explicitly-specified list of exception types.
ProcessingContextState ParsingClassState
void * SkippedDefinitionContext
QualType InvalidOperands(SourceLocation Loc, ExprResult &LHS, ExprResult &RHS)
type checking binary operators (subroutines of CreateBuiltinBinOp).
ExprResult ActOnIdExpression(Scope *S, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, UnqualifiedId &Id, bool HasTrailingLParen, bool IsAddressOfOperand, std::unique_ptr< CorrectionCandidateCallback > CCC=nullptr, bool IsInlineAsmIdentifier=false, Token *KeywordReplacement=nullptr)
NamedDecl * HandleDeclarator(Scope *S, Declarator &D, MultiTemplateParamsArg TemplateParameterLists)
QualType QIDNSCopying
id<NSCopying> type.
bool LookupQualifiedName(LookupResult &R, DeclContext *LookupCtx, bool InUnqualifiedLookup=false)
Perform qualified name lookup into a given context.
bool ActOnCXXEnterDeclaratorScope(Scope *S, CXXScopeSpec &SS)
void ActOnTranslationUnitScope(Scope *S)
Scope * getScopeForContext(DeclContext *Ctx)
Determines the active Scope associated with the given declaration context.
Decl * ParsedFreeStandingDeclSpec(Scope *S, AccessSpecifier AS, DeclSpec &DS)
ObjCInterfaceDecl * getObjCInterfaceDecl(IdentifierInfo *&Id, SourceLocation IdLoc, bool TypoCorrection=false)
Look for an Objective-C class in the translation unit.
A template argument list.
bool CheckRegparmAttr(const AttributeList &attr, unsigned &value)
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...
const DeclContext * getCurObjCLexicalContext() const
bool CheckParamExceptionSpec(const PartialDiagnostic &NoteID, const FunctionProtoType *Target, SourceLocation TargetLoc, const FunctionProtoType *Source, SourceLocation SourceLoc)
ExprResult PerformMemberExprBaseConversion(Expr *Base, bool IsArrow)
Perform conversions on the LHS of a member access expression.
Reading or writing from this object requires a barrier call.
Expr * NoexceptExpr
Noexcept expression, if this is EST_ComputedNoexcept.
void PushNamespaceVisibilityAttr(const VisibilityAttr *Attr, SourceLocation Loc)
void ActOnParamDefaultArgumentError(Decl *param, SourceLocation EqualLoc)
ExprResult CreateUnaryExprOrTypeTraitExpr(TypeSourceInfo *TInfo, SourceLocation OpLoc, UnaryExprOrTypeTrait ExprKind, SourceRange R)
Build a sizeof or alignof expression given a type operand.
ExprResult SubstExpr(Expr *E, const MultiLevelTemplateArgumentList &TemplateArgs)
const internal::VariadicDynCastAllOfMatcher< Stmt, CastExpr > castExpr
Matches any cast nodes of Clang's AST.
void DefineImplicitLambdaToBlockPointerConversion(SourceLocation CurrentLoc, CXXConversionDecl *Conv)
Define the "body" of the conversion from a lambda object to a block pointer.
CCEKind
Contexts in which a converted constant expression is required.
ExprResult DefaultVariadicArgumentPromotion(Expr *E, VariadicCallType CT, FunctionDecl *FDecl)
OpaquePtr< DeclGroupRef > DeclGroupPtrTy
Expr * MaybeCreateExprWithCleanups(Expr *SubExpr)
ExprResult BuildDeclRefExpr(ValueDecl *D, QualType Ty, ExprValueKind VK, SourceLocation Loc, const CXXScopeSpec *SS=nullptr)
ExprResult PerformMoveOrCopyInitialization(const InitializedEntity &Entity, const VarDecl *NRVOCandidate, QualType ResultType, Expr *Value, bool AllowNRVO=true)
Perform the initialization of a potentially-movable value, which is the result of return value...
TemplateNameKind ActOnDependentTemplateName(Scope *S, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, UnqualifiedId &Name, ParsedType ObjectType, bool EnteringContext, TemplateTy &Template)
Form a dependent template name.
bool FunctionParamTypesAreEqual(const FunctionProtoType *OldType, const FunctionProtoType *NewType, unsigned *ArgPos=nullptr)
void MarkBaseAndMemberDestructorsReferenced(SourceLocation Loc, CXXRecordDecl *Record)
void DiagnoseEmptyStmtBody(SourceLocation StmtLoc, const Stmt *Body, unsigned DiagID)
bool DiagnoseUnexpandedParameterPack(SourceLocation Loc, TypeSourceInfo *T, UnexpandedParameterPackContext UPPC)
If the given type contains an unexpanded parameter pack, diagnose the error.
void CheckOverrideControl(NamedDecl *D)
CheckOverrideControl - Check C++11 override control semantics.
ExprResult CorrectDelayedTyposInExpr(Expr *E, llvm::function_ref< ExprResult(Expr *)> Filter)
NamedDecl * Template
The template (or partial specialization) in which we are performing the instantiation, for substitutions of prior template arguments.
Data structure used to record current or nested expression evaluation contexts.
void * VisContext
VisContext - Manages the stack for #pragma GCC visibility.
StmtResult ActOnOpenMPParallelForSimdDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, llvm::DenseMap< VarDecl *, Expr * > &VarsWithImplicitDSA)
Called on well-formed '#pragma omp parallel for simd' after parsing of the associated statement...
Describes the sequence of initializations required to initialize a given object or reference with a s...
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)
void AddOverloadCandidate(FunctionDecl *Function, DeclAccessPair FoundDecl, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, bool SuppressUserConversions=false, bool PartialOverloading=false, bool AllowExplicit=false)
void ProcessDeclAttributes(Scope *S, Decl *D, const Declarator &PD)
StmtResult ActOnCapScopeReturnStmt(SourceLocation ReturnLoc, Expr *RetValExp)
bool isNonTypeNestedNameSpecifier(Scope *S, CXXScopeSpec &SS, SourceLocation IdLoc, IdentifierInfo &II, ParsedType ObjectType)
Represents a C++ struct/union/class.
Compatible - the types are compatible according to the standard.
ExprResult ActOnInstanceMessage(Scope *S, Expr *Receiver, Selector Sel, SourceLocation LBracLoc, ArrayRef< SourceLocation > SelectorLocs, SourceLocation RBracLoc, MultiExprArg Args)
void diagnoseIgnoredQualifiers(unsigned DiagID, unsigned Quals, SourceLocation FallbackLoc, SourceLocation ConstQualLoc=SourceLocation(), SourceLocation VolatileQualLoc=SourceLocation(), SourceLocation RestrictQualLoc=SourceLocation(), SourceLocation AtomicQualLoc=SourceLocation())
void ActOnPureSpecifier(Decl *D, SourceLocation PureSpecLoc)
Decl * D
The template function declaration to be late parsed.
void MergeVarDecl(VarDecl *New, LookupResult &Previous)
void CodeCompleteObjCMethodDeclSelector(Scope *S, bool IsInstanceMethod, bool AtParameterName, ParsedType ReturnType, ArrayRef< IdentifierInfo * > SelIdents)
ExprResult VerifyBitField(SourceLocation FieldLoc, IdentifierInfo *FieldName, QualType FieldTy, bool IsMsStruct, Expr *BitWidth, bool *ZeroWidth=nullptr)
StmtResult ActOnOpenMPTaskwaitDirective(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp taskwait'.
void CodeCompletePostfixExpression(Scope *S, ExprResult LHS)
Optional< sema::TemplateDeductionInfo * > isSFINAEContext() const
Determines whether we are currently in a context where template argument substitution failures are no...
bool MatchTwoMethodDeclarations(const ObjCMethodDecl *Method, const ObjCMethodDecl *PrevMethod, MethodMatchStrategy strategy=MMS_strict)
void CheckExplicitlyDefaultedSpecialMember(CXXMethodDecl *MD)
VarTemplateSpecializationDecl * CompleteVarTemplateSpecializationDecl(VarTemplateSpecializationDecl *VarSpec, VarDecl *PatternDecl, const MultiLevelTemplateArgumentList &TemplateArgs)
Instantiates a variable template specialization by completing it with appropriate type information an...
The current context is "potentially evaluated" in C++11 terms, but the expression is evaluated at com...
void DiagnoseReturnInConstructorExceptionHandler(CXXTryStmt *TryBlock)
void PopParsingClass(ParsingClassState state)
FunctionDecl * FindUsualDeallocationFunction(SourceLocation StartLoc, bool CanProvideSize, DeclarationName Name)
void ActOnParamUnparsedDefaultArgument(Decl *param, SourceLocation EqualLoc, SourceLocation ArgLoc)
StmtResult ActOnCXXForRangeStmt(SourceLocation ForLoc, Stmt *LoopVar, SourceLocation ColonLoc, Expr *Collection, SourceLocation RParenLoc, BuildForRangeKind Kind)
bool CheckObjCDeclScope(Decl *D)
LangOptions::PragmaMSPointersToMembersKind MSPointerToMemberRepresentationMethod
Controls member pointer representation format under the MS ABI.
ExprResult CorrectDelayedTyposInExpr(Expr *E, VarDecl *InitDecl=nullptr, llvm::function_ref< ExprResult(Expr *)> Filter=[](Expr *E) -> ExprResult{return E;})
Process any TypoExprs in the given Expr and its children, generating diagnostics as appropriate and r...
NamedDecl * FindInstantiatedDecl(SourceLocation Loc, NamedDecl *D, const MultiLevelTemplateArgumentList &TemplateArgs)
Find the instantiation of the given declaration within the current instantiation. ...
ExprResult BuildQualifiedTemplateIdExpr(CXXScopeSpec &SS, SourceLocation TemplateKWLoc, const DeclarationNameInfo &NameInfo, const TemplateArgumentListInfo *TemplateArgs)
Decl * ActOnStartOfFunctionTemplateDef(Scope *FnBodyScope, MultiTemplateParamsArg TemplateParameterLists, Declarator &D)
bool isLaxVectorConversion(QualType srcType, QualType destType)
Is this a legal conversion between two known vector types?
StmtResult ActOnOpenMPForSimdDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, llvm::DenseMap< VarDecl *, Expr * > &VarsWithImplicitDSA)
Called on well-formed '#pragma omp for simd' after parsing of the associated statement.
void AddSurrogateCandidate(CXXConversionDecl *Conversion, DeclAccessPair FoundDecl, CXXRecordDecl *ActingContext, const FunctionProtoType *Proto, Expr *Object, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet)
ObjCPropertyDecl * CreatePropertyDecl(Scope *S, ObjCContainerDecl *CDecl, SourceLocation AtLoc, SourceLocation LParenLoc, FieldDeclarator &FD, Selector GetterSel, Selector SetterSel, const bool isAssign, const bool isReadWrite, const unsigned Attributes, const unsigned AttributesAsWritten, QualType T, TypeSourceInfo *TSI, tok::ObjCKeywordKind MethodImplKind, DeclContext *lexicalDC=nullptr)
bool CheckAllocatedType(QualType AllocType, SourceLocation Loc, SourceRange R)
Checks that a type is suitable as the allocated type in a new-expression.
bool NeedToCaptureVariable(VarDecl *Var, SourceLocation Loc)
Checks if the variable must be captured.
Selector RespondsToSelectorSel
will hold 'respondsToSelector:'
TPOC
The context in which partial ordering of function templates occurs.
AccessResult CheckUnresolvedLookupAccess(UnresolvedLookupExpr *E, DeclAccessPair FoundDecl)
void DeclareGlobalAllocationFunction(DeclarationName Name, QualType Return, QualType Param1, QualType Param2=QualType(), bool addRestrictAttr=false)
QualType CheckMultiplyDivideOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign, bool IsDivide)
AccessResult CheckBaseClassAccess(SourceLocation AccessLoc, QualType Base, QualType Derived, const CXXBasePath &Path, unsigned DiagID, bool ForceCheck=false, bool ForceUnprivileged=false)
AccessResult CheckMemberAccess(SourceLocation UseLoc, CXXRecordDecl *NamingClass, DeclAccessPair Found)
Checks access to a member.
void AddLaunchBoundsAttr(SourceRange AttrRange, Decl *D, Expr *MaxThreads, Expr *MinBlocks, unsigned SpellingListIndex)
DeclContext * CurContext
CurContext - This is the current declaration context of parsing.
bool CheckParmsForFunctionDef(ParmVarDecl *const *Param, ParmVarDecl *const *ParamEnd, bool CheckParameterNames)
Helpers for dealing with blocks and functions.
void MaybeSuggestAddingStaticToDecl(const FunctionDecl *D)
TranslationUnitKind
Describes the kind of translation unit being processed.
void ActOnPopScope(SourceLocation Loc, Scope *S)
Scope actions.
Declaration of a class template.
TypoExpr * CorrectTypoDelayed(const DeclarationNameInfo &Typo, Sema::LookupNameKind LookupKind, Scope *S, CXXScopeSpec *SS, std::unique_ptr< CorrectionCandidateCallback > CCC, TypoDiagnosticGenerator TDG, TypoRecoveryCallback TRC, CorrectTypoKind Mode, DeclContext *MemberContext=nullptr, bool EnteringContext=false, const ObjCObjectPointerType *OPT=nullptr)
Try to "correct" a typo in the source code by finding visible declarations whose names are similar to...
ARCConversionResult CheckObjCARCConversion(SourceRange castRange, QualType castType, Expr *&op, CheckedConversionKind CCK, bool DiagnoseCFAudited=false, BinaryOperatorKind Opc=BO_PtrMemD)
Checks for invalid conversions and casts between retainable pointers and other pointer kinds...
Writes an AST file containing the contents of a translation unit.
IdentifierInfo * getNullabilityKeyword(NullabilityKind nullability)
Retrieve the keyword associated.
Decl * ActOnMethodDeclaration(Scope *S, SourceLocation BeginLoc, SourceLocation EndLoc, tok::TokenKind MethodType, ObjCDeclSpec &ReturnQT, ParsedType ReturnType, ArrayRef< SourceLocation > SelectorLocs, Selector Sel, ObjCArgInfo *ArgInfo, DeclaratorChunk::ParamInfo *CParamInfo, unsigned CNumArgs, AttributeList *AttrList, tok::ObjCKeywordKind MethodImplKind, bool isVariadic, bool MethodDefinition)
void NoteOverloadCandidate(FunctionDecl *Fn, QualType DestType=QualType())
bool CheckOverridingFunctionReturnType(const CXXMethodDecl *New, const CXXMethodDecl *Old)
bool tryExprAsCall(Expr &E, QualType &ZeroArgCallReturnTy, UnresolvedSetImpl &NonTemplateOverloads)
Figure out if an expression could be turned into a call.
void GatherGlobalCodeCompletions(CodeCompletionAllocator &Allocator, CodeCompletionTUInfo &CCTUInfo, SmallVectorImpl< CodeCompletionResult > &Results)
DeclResult ActOnVarTemplateSpecialization(Scope *S, Declarator &D, TypeSourceInfo *DI, SourceLocation TemplateKWLoc, TemplateParameterList *TemplateParams, StorageClass SC, bool IsPartialSpecialization)
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...
void DiagnosePropertyMismatch(ObjCPropertyDecl *Property, ObjCPropertyDecl *SuperProperty, const IdentifierInfo *Name, bool OverridingProtocolProperty)
ExprResult BuildInstanceMessageImplicit(Expr *Receiver, QualType ReceiverType, SourceLocation Loc, Selector Sel, ObjCMethodDecl *Method, MultiExprArg Args)
QualType CheckVectorOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign, bool AllowBothBool, bool AllowBoolConversion)
type checking for vector binary operators.
StmtResult FinishCXXForRangeStmt(Stmt *ForRange, Stmt *Body)
void UpdateMarkingForLValueToRValue(Expr *E)
Represents a complete lambda introducer.
a linked list of methods with the same selector name but different signatures.
AvailabilityResult getCurContextAvailability() const
std::pair< ObjCMethodList, ObjCMethodList > GlobalMethods
OMPClause * ActOnOpenMPIfClause(Expr *Condition, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'if' clause.
void CollectIvarsToConstructOrDestruct(ObjCInterfaceDecl *OI, SmallVectorImpl< ObjCIvarDecl * > &Ivars)
Decl * SubstDecl(Decl *D, DeclContext *Owner, const MultiLevelTemplateArgumentList &TemplateArgs)
ClassTemplatePartialSpecializationDecl * getMoreSpecializedPartialSpecialization(ClassTemplatePartialSpecializationDecl *PS1, ClassTemplatePartialSpecializationDecl *PS2, SourceLocation Loc)
Returns the more specialized class template partial specialization according to the rules of partial ...
The translation unit is a complete translation unit.
QualType getMessageSendResultType(QualType ReceiverType, ObjCMethodDecl *Method, bool isClassMessage, bool isSuperMessage)
Determine the result of a message send expression based on the type of the receiver, the method expected to receive the message, and the form of the message send.
void DiagnoseSizeOfParametersAndReturnValue(ParmVarDecl *const *Begin, ParmVarDecl *const *End, QualType ReturnTy, NamedDecl *D)
Diagnose whether the size of parameters or return value of a function or obj-c method definition is p...
ExprResult PerformObjectMemberConversion(Expr *From, NestedNameSpecifier *Qualifier, NamedDecl *FoundDecl, NamedDecl *Member)
Cast a base object to a member's actual type.
FriendDecl * CheckFriendTypeDecl(SourceLocation LocStart, SourceLocation FriendLoc, TypeSourceInfo *TSInfo)
Perform semantic analysis of the given friend type declaration.
StmtResult ActOnMSAsmStmt(SourceLocation AsmLoc, SourceLocation LBraceLoc, ArrayRef< Token > AsmToks, StringRef AsmString, unsigned NumOutputs, unsigned NumInputs, ArrayRef< StringRef > Constraints, ArrayRef< StringRef > Clobbers, ArrayRef< Expr * > Exprs, SourceLocation EndLoc)
MemInitResult ActOnMemInitializer(Decl *ConstructorD, Scope *S, CXXScopeSpec &SS, IdentifierInfo *MemberOrBase, ParsedType TemplateTypeTy, const DeclSpec &DS, SourceLocation IdLoc, SourceLocation LParenLoc, ArrayRef< Expr * > Args, SourceLocation RParenLoc, SourceLocation EllipsisLoc)
Handle a C++ member initializer using parentheses syntax.
bool DiagnosePropertyAccessorMismatch(ObjCPropertyDecl *PD, ObjCMethodDecl *Getter, SourceLocation Loc)
ExprResult ActOnObjCAtSynchronizedOperand(SourceLocation atLoc, Expr *operand)
void EmitRelatedResultTypeNote(const Expr *E)
If the given expression involves a message send to a method with a related result type...
~SavePendingLocalImplicitInstantiationsRAII()
ExprResult CheckConvertedConstantExpression(Expr *From, QualType T, llvm::APSInt &Value, CCEKind CCE)
bool makeUnavailableInSystemHeader(SourceLocation loc, StringRef message)
void PrintStats() const
Print out statistics about the semantic analysis.
void ActOnComment(SourceRange Comment)
bool IsQualificationConversion(QualType FromType, QualType ToType, bool CStyle, bool &ObjCLifetimeConversion)
void LookupTemplateName(LookupResult &R, Scope *S, CXXScopeSpec &SS, QualType ObjectType, bool EnteringContext, bool &MemberOfUnknownSpecialization)
bool checkSectionName(SourceLocation LiteralLoc, StringRef Str)
OMPClause * ActOnOpenMPCopyprivateClause(ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'copyprivate' clause.
FullExprArg MakeFullExpr(Expr *Arg, SourceLocation CC)
void DiagnoseSelfMove(const Expr *LHSExpr, const Expr *RHSExpr, SourceLocation OpLoc)
Warn if a value is moved to itself.
void ActOnPragmaVisibility(const IdentifierInfo *VisType, SourceLocation PragmaLoc)
ActOnPragmaVisibility - Called on well formed #pragma GCC visibility... .
ImplicitExceptionSpecification ComputeDefaultedMoveAssignmentExceptionSpec(CXXMethodDecl *MD)
Determine what sort of exception specification a defaulted move assignment operator of a class will h...
A reference to a declared variable, function, enum, etc. [C99 6.5.1p2].
void CheckConversionDeclarator(Declarator &D, QualType &R, StorageClass &SC)
static SourceRange getPrintable(SourceRange R)
Code completion occurs within the condition of an if, while, switch, or for statement.
virtual ~ContextualImplicitConverter()
ExprResult BuildVAArgExpr(SourceLocation BuiltinLoc, Expr *E, TypeSourceInfo *TInfo, SourceLocation RPLoc)
Optional< unsigned > getNumArgumentsInExpansion(QualType T, const MultiLevelTemplateArgumentList &TemplateArgs)
Determine the number of arguments in the given pack expansion type.
void AddOverloadedCallCandidates(UnresolvedLookupExpr *ULE, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, bool PartialOverloading=false)
Add the overload candidates named by callee and/or found by argument dependent lookup to the given ov...
void DiagnoseHiddenVirtualMethods(CXXMethodDecl *MD)
Diagnose methods which overload virtual methods in a base class without overriding any...
void ActOnOpenMPLoopInitialization(SourceLocation ForLoc, Stmt *Init)
Check if the current region is an OpenMP loop region and if it is, mark loop control variable...
CXXMethodDecl * DeclareImplicitCopyAssignment(CXXRecordDecl *ClassDecl)
Declare the implicit copy assignment operator for the given class.
The current expression and its subexpressions occur within an unevaluated operand (C++11 [expr]p7)...
CXXConstructorDecl * LookupDefaultConstructor(CXXRecordDecl *Class)
Look up the default constructor for the given class.
ExprResult BuildCXXDefaultInitExpr(SourceLocation Loc, FieldDecl *Field)
NamedDecl * findLocallyScopedExternCDecl(DeclarationName Name)
Look for a locally scoped extern "C" declaration by the given name.
void MarkFunctionReferenced(SourceLocation Loc, FunctionDecl *Func, bool OdrUse=true)
Mark a function referenced, and check whether it is odr-used (C++ [basic.def.odr]p2, C99 6.9p3)
AvailabilityAttr * mergeAvailabilityAttr(NamedDecl *D, SourceRange Range, IdentifierInfo *Platform, VersionTuple Introduced, VersionTuple Deprecated, VersionTuple Obsoleted, bool IsUnavailable, StringRef Message, bool Override, unsigned AttrSpellingListIndex)
Attribute merging methods. Return true if a new attribute was added.
void ActOnObjCContainerFinishDefinition()
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
void CodeCompleteObjCImplementationDecl(Scope *S)
ExprResult ActOnStringLiteral(ArrayRef< Token > StringToks, Scope *UDLScope=nullptr)
CapturedRegionKind
The different kinds of captured statement.
OMPClause * ActOnOpenMPVarListClause(OpenMPClauseKind Kind, ArrayRef< Expr * > Vars, Expr *TailExpr, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc, CXXScopeSpec &ReductionIdScopeSpec, const DeclarationNameInfo &ReductionId, OpenMPDependClauseKind DepKind, SourceLocation DepLoc)
Contains a late templated function. Will be parsed at the end of the translation unit, used by Sema & Parser.
void checkUnsafeExprAssigns(SourceLocation Loc, Expr *LHS, Expr *RHS)
bool CheckEnumRedeclaration(SourceLocation EnumLoc, bool IsScoped, QualType EnumUnderlyingTy, const EnumDecl *Prev)
static int getPrintable(int I)
SkippedDefinitionContext ActOnTagStartSkippedDefinition(Scope *S, Decl *TD)
Invoked when we enter a tag definition that we're skipping.
class clang::Sema::DelayedDiagnostics DelayedDiagnostics
bool CheckDestructor(CXXDestructorDecl *Destructor)
bool checkUnsafeAssigns(SourceLocation Loc, QualType LHS, Expr *RHS)
A collection of diagnostics which were delayed.
void InstantiateVariableDefinition(SourceLocation PointOfInstantiation, VarDecl *Var, bool Recursive=false, bool DefinitionRequired=false)
DeduceAutoResult DeduceAutoType(TypeSourceInfo *AutoType, Expr *&Initializer, QualType &Result)
void ActOnModuleEnd(SourceLocation DirectiveLoc, Module *Mod)
The parser has left a submodule.
InstantiationKind
The kind of template instantiation we are performing.
AccessResult CheckAddressOfMemberAccess(Expr *OvlExpr, DeclAccessPair FoundDecl)
bool isInvalid() const
Determines whether we have exceeded the maximum recursive template instantiations.
A trivial tuple used to represent a source range.
bool CompleteConstructorCall(CXXConstructorDecl *Constructor, MultiExprArg ArgsPtr, SourceLocation Loc, SmallVectorImpl< Expr * > &ConvertedArgs, bool AllowExplicit=false, bool IsListInitialization=false)
Given a constructor and the set of arguments provided for the constructor, convert the arguments and ...
bool ShouldDeleteSpecialMember(CXXMethodDecl *MD, CXXSpecialMember CSM, bool Diagnose=false)
Determine if a special member function should have a deleted definition when it is defaulted...
TypoCorrection CorrectTypo(const DeclarationNameInfo &Typo, Sema::LookupNameKind LookupKind, Scope *S, CXXScopeSpec *SS, std::unique_ptr< CorrectionCandidateCallback > CCC, CorrectTypoKind Mode, DeclContext *MemberContext=nullptr, bool EnteringContext=false, const ObjCObjectPointerType *OPT=nullptr, bool RecordFailure=true)
Try to "correct" a typo in the source code by finding visible declarations whose names are similar to...
AlwaysInlineAttr * mergeAlwaysInlineAttr(Decl *D, SourceRange Range, IdentifierInfo *Ident, unsigned AttrSpellingListIndex)
void DeclareInheritingConstructors(CXXRecordDecl *ClassDecl)
Declare all inheriting constructors for the given class.
virtual void diagnose(Sema &S, SourceLocation Loc, QualType T)=0
void PushCapturedRegionScope(Scope *RegionScope, CapturedDecl *CD, RecordDecl *RD, CapturedRegionKind K)
ExprResult BuildVectorLiteral(SourceLocation LParenLoc, SourceLocation RParenLoc, Expr *E, TypeSourceInfo *TInfo)
Build an altivec or OpenCL literal.
bool ResolveAndFixSingleFunctionTemplateSpecialization(ExprResult &SrcExpr, bool DoFunctionPointerConverion=false, bool Complain=false, const SourceRange &OpRangeForComplaining=SourceRange(), QualType DestTypeForComplaining=QualType(), unsigned DiagIDForComplaining=0)
ExprResult BuildObjCSubscriptExpression(SourceLocation RB, Expr *BaseExpr, Expr *IndexExpr, ObjCMethodDecl *getterMethod, ObjCMethodDecl *setterMethod)
bool hasExplicitCallingConv(QualType &T)
void DiagnoseAlwaysNonNullPointer(Expr *E, Expr::NullPointerConstantKind NullType, bool IsEqual, SourceRange Range)
Diagnose pointers that are always non-null.
Decl * ActOnStartCategoryImplementation(SourceLocation AtCatImplLoc, IdentifierInfo *ClassName, SourceLocation ClassLoc, IdentifierInfo *CatName, SourceLocation CatLoc)
void MarkUsedTemplateParameters(const TemplateArgumentList &TemplateArgs, bool OnlyDeduced, unsigned Depth, llvm::SmallBitVector &Used)
Mark which template parameters can be deduced from a given template argument list.
bool CheckCallReturnType(QualType ReturnType, SourceLocation Loc, CallExpr *CE, FunctionDecl *FD)
bool CheckCXXThisCapture(SourceLocation Loc, bool Explicit=false, bool BuildAndDiagnose=true, const unsigned *const FunctionScopeIndexToStopAt=nullptr)
Make sure the value of 'this' is actually available in the current context, if it is a potentially ev...
void AddMethodCandidate(DeclAccessPair FoundDecl, QualType ObjectType, Expr::Classification ObjectClassification, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, bool SuppressUserConversion=false)
OMPClause * ActOnOpenMPCollapseClause(Expr *NumForLoops, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'collapse' clause.
ExprResult BuildBinOp(Scope *S, SourceLocation OpLoc, BinaryOperatorKind Opc, Expr *LHSExpr, Expr *RHSExpr)
QualType NSStringPointer
Pointer to NSString type (NSString *).
FullExprArg MakeFullDiscardedValueExpr(Expr *Arg)
Represents C++ using-directive.
void DiagnoseAbstractType(const CXXRecordDecl *RD)
SmallVector< std::pair< const CXXMethodDecl *, const CXXMethodDecl * >, 2 > DelayedExceptionSpecChecks
All the overriding functions seen during a class definition that had their exception spec checks dela...
The template argument was deduced via template argument deduction.
PragmaStack(const ValueType &Value)
DeclResult actOnObjCTypeParam(Scope *S, ObjCTypeParamVariance variance, SourceLocation varianceLoc, unsigned index, IdentifierInfo *paramName, SourceLocation paramLoc, SourceLocation colonLoc, ParsedType typeBound)
Describes an entity that is being initialized.
static QualType getPrintable(QualType T)
SpecialMemberOverloadResult(const llvm::FoldingSetNodeID &ID)
Decl * getObjCDeclContext() const
void AddMsStructLayoutForRecord(RecordDecl *RD)
AddMsStructLayoutForRecord - Adds ms_struct layout attribute to record.
StmtResult ActOnOpenMPRegionEnd(StmtResult S, ArrayRef< OMPClause * > Clauses)
End of OpenMP region.
void mergeObjCMethodDecls(ObjCMethodDecl *New, ObjCMethodDecl *Old)
The type of an arbitrary declaration.
NamespaceDecl * getStdNamespace() const
bool CheckEquivalentExceptionSpec(FunctionDecl *Old, FunctionDecl *New)
ExprResult ActOnSizeofParameterPackExpr(Scope *S, SourceLocation OpLoc, IdentifierInfo &Name, SourceLocation NameLoc, SourceLocation RParenLoc)
Called when an expression computing the size of a parameter pack is parsed.
void CodeCompleteAfterIf(Scope *S)
Decl * ActOnProperty(Scope *S, SourceLocation AtLoc, SourceLocation LParenLoc, FieldDeclarator &FD, ObjCDeclSpec &ODS, Selector GetterSel, Selector SetterSel, bool *OverridingProperty, tok::ObjCKeywordKind MethodImplKind, DeclContext *lexicalDC=nullptr)
ExprResult BuildCXXTypeId(QualType TypeInfoType, SourceLocation TypeidLoc, TypeSourceInfo *Operand, SourceLocation RParenLoc)
Build a C++ typeid expression with a type operand.
SourceLocation ColonLoc
Location of ':'.
SmallVector< Slot, 2 > Stack
brief A function argument from which we performed template argument
void EmitAvailabilityWarning(AvailabilityDiagnostic AD, NamedDecl *D, StringRef Message, SourceLocation Loc, const ObjCInterfaceDecl *UnknownObjCClass, const ObjCPropertyDecl *ObjCProperty, bool ObjCPropertyAccess)
ParsedType getType() const
void AddImplicitlyDeclaredMembersToClass(CXXRecordDecl *ClassDecl)
void CheckCategoryVsClassMethodMatches(ObjCCategoryImplDecl *CatIMP)
This represents '#pragma omp threadprivate ...' directive. For example, in the following, both 'a' and 'A::b' are threadprivate:
void SetIvarInitializers(ObjCImplementationDecl *ObjCImplementation)
The explicitly-specified template arguments were not valid template arguments for the given template...
The lookup resulted in an error.
DeclarationNameInfo GetNameForDeclarator(Declarator &D)
SmallVector< std::pair< CXXMethodDecl *, const FunctionProtoType * >, 2 > DelayedDefaultedMemberExceptionSpecs
All the members seen during a class definition which were both explicitly defaulted and had explicitl...
This class handles loading and caching of source files into memory.
Preprocessor & getPreprocessor() const
The symbol does not exist.
Declaration of a template function.
Code completion occurs in a parenthesized expression, which might also be a type cast.
void CodeCompleteInPreprocessorConditionalExclusion(Scope *S)
bool IsInsideALocalClassWithinATemplateFunction()
MSPropertyDecl * HandleMSProperty(Scope *S, RecordDecl *TagD, SourceLocation DeclStart, Declarator &D, Expr *BitfieldWidth, InClassInitStyle InitStyle, AccessSpecifier AS, AttributeList *MSPropertyAttr)
bool SetDelegatingInitializer(CXXConstructorDecl *Constructor, CXXCtorInitializer *Initializer)
void PushFunctionScope()
Enter a new function scope.
void DiagnoseAbsenceOfOverrideControl(NamedDecl *D)
void CodeCompleteObjCProtocolDecl(Scope *S)
NullPointerConstantKind
Enumeration used to describe the kind of Null pointer constant returned from isNullPointerConstant()...
bool FindAllocationFunctions(SourceLocation StartLoc, SourceRange Range, bool UseGlobal, QualType AllocType, bool IsArray, MultiExprArg PlaceArgs, FunctionDecl *&OperatorNew, FunctionDecl *&OperatorDelete)
void CodeCompleteObjCProtocolReferences(IdentifierLocPair *Protocols, unsigned NumProtocols)
OMPClause * ActOnOpenMPSingleExprClause(OpenMPClauseKind Kind, Expr *Expr, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
NamedDeclSetType UnusedPrivateFields
Set containing all declared private fields that are not used.
Attr - This represents one attribute.
Decl * ActOnCompatibilityAlias(SourceLocation AtCompatibilityAliasLoc, IdentifierInfo *AliasName, SourceLocation AliasLocation, IdentifierInfo *ClassName, SourceLocation ClassLocation)
QualType UsualArithmeticConversions(ExprResult &LHS, ExprResult &RHS, bool IsCompAssign=false)
Represents a shadow declaration introduced into a scope by a (resolved) using declaration.
ExprResult ActOnAddrLabel(SourceLocation OpLoc, SourceLocation LabLoc, LabelDecl *TheDecl)
ActOnAddrLabel - Parse the GNU address of label extension: "&&foo".
TypeSourceInfo * GetTypeForDeclarator(Declarator &D, Scope *S)
void ActOnPragmaOptimize(bool On, SourceLocation PragmaLoc)
Called on well formed #pragma clang optimize.
QualType CheckAddressOfOperand(ExprResult &Operand, SourceLocation OpLoc)
void AddCFAuditedAttribute(Decl *D)
QualType BuildTypeofExprType(Expr *E, SourceLocation Loc)
StmtResult ActOnSEHTryBlock(bool IsCXXTry, SourceLocation TryLoc, Stmt *TryBlock, Stmt *Handler)
ObjCMethodDecl * DictionaryWithObjectsMethod
The declaration of the dictionaryWithObjects:forKeys:count: method.
void ActOnBlockError(SourceLocation CaretLoc, Scope *CurScope)
Helper class that creates diagnostics with optional template instantiation stacks.
Decl * ActOnDeclarator(Scope *S, Declarator &D)
Engages in a tight little dance with the lexer to efficiently preprocess tokens.
Decl * ActOnConversionDeclarator(CXXConversionDecl *Conversion)
~TentativeAnalysisScope()
TypeSourceInfo * SubstType(TypeSourceInfo *T, const MultiLevelTemplateArgumentList &TemplateArgs, SourceLocation Loc, DeclarationName Entity)
Perform substitution on the type T with a given set of template arguments.
void FilterLookupForScope(LookupResult &R, DeclContext *Ctx, Scope *S, bool ConsiderLinkage, bool AllowInlineNamespace)
bool isHidden() const
Determine whether this declaration is hidden from name lookup.
Decl * ActOnStartCategoryInterface(SourceLocation AtInterfaceLoc, IdentifierInfo *ClassName, SourceLocation ClassLoc, ObjCTypeParamList *typeParamList, IdentifierInfo *CategoryName, SourceLocation CategoryLoc, Decl *const *ProtoRefs, unsigned NumProtoRefs, const SourceLocation *ProtoLocs, SourceLocation EndProtoLoc)
llvm::DenseMap< ParmVarDecl *, SourceLocation > UnparsedDefaultArgLocs
Decl * ActOnStartNamespaceDef(Scope *S, SourceLocation InlineLoc, SourceLocation NamespaceLoc, SourceLocation IdentLoc, IdentifierInfo *Ident, SourceLocation LBrace, AttributeList *AttrList)
StmtResult ActOnOpenMPParallelForDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, llvm::DenseMap< VarDecl *, Expr * > &VarsWithImplicitDSA)
Called on well-formed '#pragma omp parallel for' after parsing of the associated statement.
NamedDecl * ActOnFriendFunctionDecl(Scope *S, Declarator &D, MultiTemplateParamsArg TemplateParams)
unsigned ActOnReenterTemplateScope(Scope *S, Decl *Template)
VariadicCallType getVariadicCallType(FunctionDecl *FDecl, const FunctionProtoType *Proto, Expr *Fn)
StmtResult ActOnWhileStmt(SourceLocation WhileLoc, FullExprArg Cond, Decl *CondVar, Stmt *Body)
void DiagnoseUnusedNestedTypedefs(const RecordDecl *D)
SourceLocation CurInitSegLoc