38 return !Bases.count(
Base->getCanonicalDecl());
40 return BaseIsNotInSet(
Record) &&
Record->forallBases(BaseIsNotInSet);
97 assert(!R.empty() && (*R.begin())->isCXXClassMember());
101 bool couldInstantiateToStatic =
false;
104 if (
auto *MD = dyn_cast<CXXMethodDecl>(DC)) {
105 if (MD->isImplicitObjectMemberFunction()) {
106 isStaticOrExplicitContext =
false;
110 couldInstantiateToStatic = MD->getDependentSpecializationInfo();
114 if (R.isUnresolvableResult()) {
115 if (couldInstantiateToStatic)
122 bool hasNonInstance =
false;
123 bool isField =
false;
127 D = D->getUnderlyingDecl();
129 if (D->isCXXInstanceMember()) {
134 Classes.insert(R->getCanonicalDecl());
136 hasNonInstance =
true;
144 if (couldInstantiateToStatic)
157 assert(!AbstractInstanceResult);
179 if (isStaticOrExplicitContext) {
183 return AbstractInstanceResult ? AbstractInstanceResult
188 if (
auto *MD = dyn_cast<CXXMethodDecl>(DC))
189 contextClass = MD->
getParent()->getCanonicalDecl();
190 else if (
auto *RD = dyn_cast<CXXRecordDecl>(DC))
193 return AbstractInstanceResult ? AbstractInstanceResult
202 if (R.getNamingClass() &&
204 R.getNamingClass()->getCanonicalDecl()) {
209 Classes.insert(R.getNamingClass()->getCanonicalDecl());
217 AbstractInstanceResult ? AbstractInstanceResult :
236 CXXMethodDecl *Method = dyn_cast<CXXMethodDecl>(FunctionLevelDC);
240 bool InStaticMethod = Method && Method->isStatic();
241 bool InExplicitObjectMethod =
242 Method && Method->isExplicitObjectMemberFunction();
245 std::string Replacement;
246 if (InExplicitObjectMethod) {
250 Replacement.append(
".");
253 if (IsField && InStaticMethod)
255 SemaRef.
Diag(Loc, diag::err_invalid_member_use_in_method)
256 << Range << nameInfo.
getName() << 0;
257 else if (IsField && InExplicitObjectMethod) {
258 auto Diag = SemaRef.
Diag(Loc, diag::err_invalid_member_use_in_method)
259 << Range << nameInfo.
getName() << 1;
260 if (!Replacement.empty())
262 }
else if (ContextClass && RepClass && SS.
isEmpty() &&
263 !InExplicitObjectMethod && !InStaticMethod &&
264 !RepClass->
Equals(ContextClass) &&
268 SemaRef.
Diag(Loc, diag::err_nested_non_static_member_use)
269 << IsField << RepClass << nameInfo.
getName() << ContextClass << Range;
271 SemaRef.
Diag(Loc, diag::err_invalid_non_static_member_use)
272 << nameInfo.
getName() << Range;
273 else if (!InExplicitObjectMethod)
274 SemaRef.
Diag(Loc, diag::err_member_call_without_object)
277 if (
const auto *Tpl = dyn_cast<FunctionTemplateDecl>(Rep))
278 Rep = Tpl->getTemplatedDecl();
280 auto Diag = SemaRef.
Diag(Loc, diag::err_member_call_without_object)
281 << Range << Callee->isExplicitObjectMemberFunction();
282 if (!Replacement.empty())
289 bool IsAddressOfOperand) {
292 else if (R.empty() || !R.begin()->isCXXClassMember())
294 else if (!IsAddressOfOperand)
298 else if (R.isOverloadedResult())
300 else if (R.isUnresolvableResult())
315 SS, TemplateKWLoc, R, TemplateArgs,
318 Diag(R.getNameLoc(), diag::warn_cxx98_compat_non_static_member_use)
319 << R.getLookupNameInfo().getName();
325 if (TemplateArgs || TemplateKWLoc.
isValid())
331 R.suppressDiagnostics();
334 TemplateKWLoc, R.getLookupNameInfo(),
false,
335 TemplateArgs, R.begin(), R.end(),
true,
341 R.getLookupNameInfo());
345 llvm_unreachable(
"unexpected instance member access kind");
367 return (len >= 1 && len <= 4) || len == 8 || len == 16;
391 bool HalvingSwizzle =
false;
395 bool HexSwizzle = (*compStr ==
's' || *compStr ==
'S') && compStr[1];
397 bool HasRepeated =
false;
398 bool HasIndex[16] = {};
404 if (!strcmp(compStr,
"hi") || !strcmp(compStr,
"lo") ||
405 !strcmp(compStr,
"even") || !strcmp(compStr,
"odd")) {
406 HalvingSwizzle =
true;
407 }
else if (!HexSwizzle &&
409 bool HasRGBA =
IsRGBA(*compStr);
412 if (HasRGBA !=
IsRGBA(*compStr))
414 if (HasIndex[Idx]) HasRepeated =
true;
415 HasIndex[Idx] =
true;
420 if (HasRGBA || (*compStr &&
IsRGBA(*compStr))) {
423 const char *DiagBegin = HasRGBA ? CompName->
getNameStart() : compStr;
424 S.
Diag(OpLoc, diag::ext_opencl_ext_vector_type_rgba_selector)
425 << StringRef(DiagBegin, 1) <<
SourceRange(CompLoc);
429 if (HexSwizzle) compStr++;
431 if (HasIndex[Idx]) HasRepeated =
true;
432 HasIndex[Idx] =
true;
437 if (!HalvingSwizzle && *compStr) {
441 char Fmt[3] = {
'\'', *compStr,
'\''};
443 diag::err_ext_vector_component_name_illegal)
450 if (!HalvingSwizzle) {
458 S.
Diag(OpLoc, diag::err_ext_vector_component_exceeds_length)
468 unsigned SwizzleLength = CompName->
getLength();
474 S.
Diag(OpLoc, diag::err_opencl_ext_vector_component_invalid_length)
485 unsigned CompSize = HalvingSwizzle ? (vecType->
getNumElements() + 1) / 2
499 for (Sema::ExtVectorDeclsType::iterator
503 if ((*I)->getUnderlyingType() == VT)
522 for (
const auto *I : PDecl->
protocols()) {
535 Decl *GDecl =
nullptr;
536 for (
const auto *I : QIdTy->
quals()) {
550 for (
const auto *I : QIdTy->
quals()) {
581 assert(BaseExpr &&
"cannot happen with implicit member accesses");
582 Diag(OpLoc, diag::err_typecheck_member_reference_struct_union)
590 (TemplateArgs && llvm::any_of(TemplateArgs->
arguments(),
592 return Arg.getArgument().isDependent();
598 Context, BaseExpr, BaseType, IsArrow, OpLoc,
600 NameInfo, TemplateArgs);
617 SemaRef.
Diag(nameInfo.
getLoc(), diag::err_qualified_member_of_unrelated)
618 << SS.
getRange() << rep << BaseType;
630 assert(BaseType->isDependentType());
637 if (!BaseExpr && !(*I)->isCXXInstanceMember())
652 R.getRepresentativeDecl(),
653 R.getLookupNameInfo());
666 OpLoc, RTy, diag::err_typecheck_incomplete_tag, BaseRange))
672 if (HasTemplateArgs || TemplateKWLoc.
isValid())
674 nullptr, SS, ObjectType,
675 false, TemplateKWLoc);
684 Decl *ObjCImpDecl,
bool HasTemplateArgs,
700 SS, TemplateArgs !=
nullptr, TemplateKWLoc))
709 TemplateArgs !=
nullptr, TemplateKWLoc);
722 BaseType =
Base->getType();
731 OpLoc, IsArrow, SS, TemplateKWLoc,
732 FirstQualifierInScope, R, TemplateArgs, S,
741 Expr *baseObjectExpr,
756 assert(!baseObjectExpr &&
"anonymous struct/union is static data member?");
764 baseObjectExpr = result.
get();
767 assert((baseVariable || baseObjectExpr) &&
768 "referencing anonymous struct/union without a base variable or "
773 Expr *result = baseObjectExpr;
790 SS, field, foundDecl, memberNameInfo)
809 (FI == FEnd ? SS : EmptySS), field,
810 fakeFoundDecl, memberNameInfo)
836 assert((!IsArrow ||
Base->isPRValue()) &&
837 "-> base must be a pointer prvalue");
840 Member, FoundDecl, MemberNameInfo, TemplateArgs, Ty,
880 bool SuppressQualifierCheck,
882 assert(!SS.
isInvalid() &&
"nested-name-specifier cannot be invalid");
886 if (R.wasNotFoundInCurrentInstantiation() ||
887 (R.getLookupName().getCXXOverloadedOperator() == OO_Equal &&
891 TemplateKWLoc, FirstQualifierInScope,
892 R.getLookupNameInfo(), TemplateArgs);
896 assert(BaseType->isPointerType());
899 R.setBaseObjectType(BaseType);
904 "dependent lookup context that isn't the current instantiation?");
917 if (S && BaseExpr && FD &&
921 Diag(MemberLoc, diag::warn_cdtor_function_try_handler_mem_expr)
926 if (ExtraArgs && !IsArrow && BaseExpr && !BaseExpr->
isTypeDependent()) {
929 bool MayBePseudoDestructor =
false;
931 tok::arrow, ObjectType,
932 MayBePseudoDestructor);
936 ExtraArgs->
S, RetryExpr.
get(), OpLoc, tok::arrow, TempSS,
949 Diag(OpLoc, diag::err_no_member_overloaded_arrow)
952 Diag(R.getNameLoc(), diag::err_no_member)
967 if ((SS.
isSet() || !BaseExpr ||
970 !SuppressQualifierCheck &&
976 if (R.isOverloadedResult() || R.isUnresolvableResult()) {
979 R.suppressDiagnostics();
983 BaseExpr, BaseExprType,
986 TemplateKWLoc, MemberNameInfo,
987 TemplateArgs, R.begin(), R.end());
992 assert(R.isSingleResult());
994 NamedDecl *MemberDecl = R.getFoundDecl();
1010 if (TemplateArgs || TemplateKWLoc.
isValid())
1014 FoundDecl, TemplateArgs);
1027 auto ConvertBaseExprToDiscardedValue = [&] {
1029 "Static member / member enumerator outside of C++");
1035 BaseExpr = Converted.
get();
1038 auto ConvertBaseExprToGLValue = [&] {
1044 BaseExpr = Converted.
get();
1052 if (
FieldDecl *FD = dyn_cast<FieldDecl>(MemberDecl)) {
1053 if (ConvertBaseExprToGLValue())
1070 if (ConvertBaseExprToGLValue())
1075 FoundDecl, BaseExpr,
1080 if (
VarDecl *Var = dyn_cast<VarDecl>(MemberDecl)) {
1081 if (ConvertBaseExprToDiscardedValue())
1086 MemberNameInfo, Var->getType().getNonReferenceType(),
1090 if (
CXXMethodDecl *MemberFn = dyn_cast<CXXMethodDecl>(MemberDecl)) {
1093 if (MemberFn->isInstance()) {
1096 if (MemberFn->isImplicitObjectMemberFunction() &&
1097 ConvertBaseExprToGLValue())
1101 if (ConvertBaseExprToDiscardedValue())
1104 type = MemberFn->getType();
1109 MemberFn, FoundDecl,
false,
1115 if (ConvertBaseExprToDiscardedValue())
1119 TemplateKWLoc,
Enum, FoundDecl,
false,
1123 if (
VarTemplateDecl *VarTempl = dyn_cast<VarTemplateDecl>(MemberDecl)) {
1124 if (ConvertBaseExprToDiscardedValue())
1126 if (!TemplateArgs) {
1128 SS, TemplateKWLoc.
isValid(), VarTempl, MemberLoc);
1134 *TemplateArgs,
false);
1141 BaseExpr, BaseExpr->
getType(), IsArrow, OpLoc, SS, TemplateKWLoc,
1142 FirstQualifierInScope, MemberNameInfo, TemplateArgs);
1157 Diag(MemberLoc, diag::err_typecheck_member_reference_type)
1158 << MemberName << BaseType <<
int(IsArrow);
1160 Diag(MemberLoc, diag::err_typecheck_member_reference_unknown)
1161 << MemberName << BaseType <<
int(IsArrow);
1165 R.suppressDiagnostics();
1178 if (!opty)
return false;
1183 if (ty->isObjCId()) {
1185 }
else if (ty->isObjCClass()) {
1202 return T->isRecordType();
1206 return PT->getPointeeType()->isRecordType();
1212 if (IsArrow && !
Base->getType()->isFunctionType())
1231 Decl *ObjCImpDecl,
bool HasTemplateArgs,
1233 assert(BaseExpr.
get() &&
"no base expression");
1251 BaseType = Ptr->getPointeeType();
1254 BaseType = Ptr->getPointeeType();
1255 else if (BaseType->isFunctionType())
1257 else if (BaseType->isDependentType())
1259 else if (BaseType->isRecordType()) {
1268 S.
Diag(OpLoc, diag::err_typecheck_member_reference_suggestion)
1274 S.
Diag(MemberLoc, diag::err_typecheck_member_reference_arrow)
1285 if (
const auto *ATy = BaseType->getAs<
AtomicType>()) {
1287 S.
PDiag(diag::warn_atomic_member_access));
1288 BaseType = ATy->getValueType().getUnqualifiedType();
1291 CK_AtomicToNonAtomic, BaseExpr.
get(),
nullptr,
1296 if (BaseType->getAsRecordDecl()) {
1298 SS, HasTemplateArgs, TemplateKWLoc))
1306 }
else if (BaseType->isDependentType()) {
1307 R.setNotFoundInCurrentInstantiation();
1329 (OTy->isObjCId() || OTy->isObjCClass()))
1334 if (OTy->isObjCId() &&
Member->isStr(
"isa"))
1339 ObjCImpDecl, HasTemplateArgs, TemplateKWLoc);
1344 diag::err_typecheck_incomplete_tag,
1361 S.
PDiag(diag::err_typecheck_member_reference_ivar_suggest)
1365 assert(!ClassDeclared);
1368 if (
auto *Category = dyn_cast<ObjCCategoryDecl>(D))
1369 D = Category->getClassInterface();
1371 if (
auto *Implementation = dyn_cast<ObjCImplementationDecl>(D))
1372 ClassDeclared = Implementation->getClassInterface();
1373 else if (
auto *
Interface = dyn_cast<ObjCInterfaceDecl>(D))
1376 assert(ClassDeclared &&
"cannot query interface");
1381 S.
Diag(MemberLoc, diag::err_property_found_suggest)
1387 S.
Diag(MemberLoc, diag::err_typecheck_member_reference_ivar)
1394 assert(ClassDeclared);
1409 ClassOfMethodDecl = MD->getClassInterface();
1418 dyn_cast<ObjCImplementationDecl>(ObjCImpDecl))
1419 ClassOfMethodDecl = IMPD->getClassInterface();
1421 dyn_cast<ObjCCategoryImplDecl>(ObjCImpDecl))
1422 ClassOfMethodDecl = CatImplClass->getClassInterface();
1428 S.
Diag(MemberLoc, diag::err_private_ivar_access)
1432 S.
Diag(MemberLoc, diag::err_protected_ivar_access)
1440 if (UO->getOpcode() == UO_Deref)
1443 if (
DeclRefExpr *DE = dyn_cast<DeclRefExpr>(BaseExp))
1445 S.
Diag(DE->getLocation(), diag::err_arc_weak_ivar_access);
1453 !S.
ObjC().IvarBacksCurrentMethodAccessor(IDecl, MD, IV));
1456 S.
Diag(MemberLoc, diag::warn_direct_ivar_access) << IV->
getDeclName();
1465 !S.
Diags.
isIgnored(diag::warn_arc_repeated_use_of_weak, MemberLoc))
1494 if (OT->isObjCId()) {
1518 SMD = dyn_cast<ObjCMethodDecl>(SDecl);
1529 ObjCImpDecl, HasTemplateArgs, TemplateKWLoc);
1531 return ExprError(S.
Diag(MemberLoc, diag::err_property_not_found)
1532 << MemberName << BaseType);
1536 if (OT->isObjCClass()) {
1542 ObjCImpDecl, HasTemplateArgs, TemplateKWLoc);
1576 if (Getter || Setter) {
1584 ObjCImpDecl, HasTemplateArgs, TemplateKWLoc);
1586 return ExprError(S.
Diag(MemberLoc, diag::err_property_not_found)
1587 << MemberName << BaseType);
1596 if (BaseType->isPackedVectorBoolType(S.
Context)) {
1600 S.
Diag(R.getNameLoc(), diag::err_ext_vector_component_name_illegal)
1607 if (BaseType->isExtVectorType()) {
1623 if (S.
getLangOpts().HLSL && BaseType->isConstantMatrixType()) {
1640 if (IsArrow && BaseType->isSpecificBuiltinType(BuiltinType::ObjCSel) &&
1645 ObjCImpDecl, HasTemplateArgs, TemplateKWLoc);
1659 if (!IsArrow && Ptr->getPointeeType()->isRecordType() &&
1661 S.
Diag(OpLoc, diag::err_typecheck_member_reference_suggestion)
1671 ObjCImpDecl, HasTemplateArgs, TemplateKWLoc);
1678 BaseExpr, S.
PDiag(diag::err_member_reference_needs_call),
1685 ObjCImpDecl, HasTemplateArgs, TemplateKWLoc);
1690 if (S.
getLangOpts().HLSL && BaseType->isScalarType()) {
1695 HasTemplateArgs, TemplateKWLoc);
1698 S.
Diag(OpLoc, diag::err_typecheck_member_reference_struct_union)
1713 diag::ext_ms_explicit_constructor_call);
1721 NameInfo, TemplateArgs);
1723 bool IsArrow = (OpKind == tok::arrow);
1726 return ExprError(
Diag(OpLoc, diag::err_hlsl_operator_unsupported) << 2);
1738 Base,
Base->getType(), OpLoc, IsArrow, SS, TemplateKWLoc,
1739 FirstQualifierInScope, NameInfo, TemplateArgs, S, &ExtraArgs);
1743 CheckMemberAccessOfNoDeref(ME);
1748 if (!
HLSL().ActOnResourceMemberAccessExpr(ME))
1756void Sema::CheckMemberAccessOfNoDeref(
const MemberExpr *E) {
1776 CheckAddressOfNoDeref(E->
getBase());
1779 if (
const auto *Ptr = dyn_cast<PointerType>(
1781 if (Ptr->getPointeeType()->hasAttr(attr::NoDeref))
1808 QualType MemberType = Field->getType();
1816 Qualifiers BaseQuals = BaseType.getQualifiers();
1832 Context.getCanonicalType(MemberType).getQualifiers();
1836 Qualifiers Combined = BaseQuals + MemberQuals;
1837 if (Combined != MemberQuals)
1838 MemberType =
Context.getQualifiedType(MemberType, Combined);
1844 if (BaseType->hasAttr(attr::NoDeref))
1846 Context.getAttributedType(attr::NoDeref, MemberType, MemberType);
1849 auto isDefaultedSpecialMember = [
this](
const DeclContext *Ctx) {
1863 if (
Base.isInvalid())
1871 if (
auto *PrivateCopy =
OpenMP().isOpenMPCapturedDecl(Field)) {
1873 MemberNameInfo.
getLoc());
1880 false, MemberNameInfo, MemberType,
VK, OK);
1888 bool IsKnownInstance,
const Scope *S) {
1889 assert(!R.empty() && !R.isAmbiguous());
1896 assert(!ThisTy.
isNull() &&
"didn't correctly pre-flight capture of 'this'");
1898 Expr *baseExpr =
nullptr;
1899 if (IsKnownInstance) {
1910 nullptr, R, TemplateArgs, S);
Defines the C++ Decl subclasses, other than those for templates (found in DeclTemplate....
Defines the C++ template declaration subclasses.
Defines the clang::Expr interface and subclasses for C++ expressions.
static DiagnosticBuilder Diag(DiagnosticsEngine *Diags, const LangOptions &Features, FullSourceLoc TokLoc, const char *TokBegin, const char *TokRangeBegin, const char *TokRangeEnd, unsigned DiagID)
Produce a diagnostic highlighting some portion of a literal.
llvm::MachO::Record Record
Defines the clang::Preprocessor interface.
static bool ShouldTryAgainWithRedefinitionType(Sema &S, ExprResult &base)
Given that normal member access failed on the given expression, and given that the expression's type ...
static bool LookupMemberExprInRecord(Sema &SemaRef, LookupResult &R, Expr *BaseExpr, QualType RTy, SourceLocation OpLoc, bool IsArrow, CXXScopeSpec &SS, bool HasTemplateArgs, SourceLocation TemplateKWLoc)
static bool isPointerToRecordType(QualType T)
static Decl * FindGetterSetterNameDeclFromProtocolList(const ObjCProtocolDecl *PDecl, IdentifierInfo *Member, const Selector &Sel, ASTContext &Context)
@ IMA_Mixed_Unrelated
The reference may be to an instance member, but it is invalid if so, because the context is from an u...
@ IMA_Mixed
The reference may be an implicit instance member access.
@ IMA_Error_Unrelated
All possible referrents are instance members of an unrelated class.
@ IMA_Unresolved
The reference may be to an unresolved using declaration.
@ IMA_Abstract
The reference is a contextually-permitted abstract member reference.
@ IMA_Mixed_StaticOrExplicitContext
The reference may be to an instance member, but it might be invalid if so, because the context is not...
@ IMA_Instance
The reference is definitely an implicit instance member access.
@ IMA_Error_StaticOrExplicitContext
All possible referrents are instance members and the current context is not an instance method.
@ IMA_Unresolved_StaticOrExplicitContext
The reference may be to an unresolved using declaration and the context is not an instance method.
@ IMA_Dependent
Whether the context is static is dependent on the enclosing template (i.e.
@ IMA_Field_Uneval_Context
@ IMA_Static
The reference is definitely not an instance member access.
static bool isProvablyNotDerivedFrom(Sema &SemaRef, CXXRecordDecl *Record, const BaseSet &Bases)
Determines if the given class is provably not derived from all of the prospective base classes.
static void diagnoseInstanceReference(Sema &SemaRef, const CXXScopeSpec &SS, NamedDecl *Rep, const DeclarationNameInfo &nameInfo)
Diagnose a reference to a field with no object available.
static bool isRecordType(QualType T)
static QualType CheckExtVectorComponent(Sema &S, QualType baseType, ExprValueKind &VK, SourceLocation OpLoc, const IdentifierInfo *CompName, SourceLocation CompLoc)
Check an ext-vector component access expression.
llvm::SmallPtrSet< const CXXRecordDecl *, 4 > BaseSet
static Decl * FindGetterSetterNameDecl(const ObjCObjectPointerType *QIdTy, IdentifierInfo *Member, const Selector &Sel, ASTContext &Context)
static void DiagnoseQualifiedMemberReference(Sema &SemaRef, Expr *BaseExpr, QualType BaseType, const CXXScopeSpec &SS, NamedDecl *rep, const DeclarationNameInfo &nameInfo)
We know that the given qualified member reference points only to declarations which do not belong to ...
static bool IsValidOpenCLComponentSwizzleLength(unsigned len)
static ExprResult BuildMSPropertyRefExpr(Sema &S, Expr *BaseExpr, bool IsArrow, const CXXScopeSpec &SS, MSPropertyDecl *PD, const DeclarationNameInfo &NameInfo)
static bool IsRGBA(char c)
Determine whether input char is from rgba component set.
static IMAKind ClassifyImplicitMemberAccess(Sema &SemaRef, const LookupResult &R)
The given lookup names class member(s) and is not being used for an address-of-member expression.
static ExprResult LookupMemberExpr(Sema &S, LookupResult &R, ExprResult &BaseExpr, bool &IsArrow, SourceLocation OpLoc, CXXScopeSpec &SS, Decl *ObjCImpDecl, bool HasTemplateArgs, SourceLocation TemplateKWLoc)
Look up the given member of the given non-type-dependent expression.
static bool IsInFnTryBlockHandler(const Scope *S)
Determine if the given scope is within a function-try-block handler.
This file declares semantic analysis for HLSL constructs.
This file declares semantic analysis for Objective-C.
This file declares semantic analysis for OpenMP constructs and clauses.
static QualType getPointeeType(const MemRegion *R)
C Language Family Type Representation.
__device__ __2f16 float c
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
static CanQualType getCanonicalType(QualType T)
Return the canonical (structural) type corresponding to the specified potentially non-canonical type ...
QualType getObjCClassType() const
Represents the Objective-C Class type.
QualType getObjCSelRedefinitionType() const
Retrieve the type that 'SEL' has been defined to, which may be different from the built-in 'SEL' if '...
QualType getPointerType(QualType T) const
Return the uniqued reference to the type for a pointer to the specified type.
CanQualType PseudoObjectTy
QualType getQualifiedType(SplitQualType split) const
Un-split a SplitQualType.
QualType getTypedefType(ElaboratedTypeKeyword Keyword, NestedNameSpecifier Qualifier, const TypedefNameDecl *Decl, QualType UnderlyingType=QualType(), std::optional< bool > TypeMatchesDeclOrNone=std::nullopt) const
Return the unique reference to the type for the specified typedef-name decl.
QualType getObjCClassRedefinitionType() const
Retrieve the type that Class has been defined to, which may be different from the built-in Class if C...
QualType getObjCIdRedefinitionType() const
Retrieve the type that id has been defined to, which may be different from the built-in id if id has ...
QualType getExtVectorType(QualType VectorType, unsigned NumElts) const
Return the unique reference to an extended vector type of the specified element type and size.
static bool hasSameUnqualifiedType(QualType T1, QualType T2)
Determine whether the given types are equivalent after cvr-qualifiers have been removed.
static CXXDependentScopeMemberExpr * Create(const ASTContext &Ctx, Expr *Base, QualType BaseType, bool IsArrow, SourceLocation OperatorLoc, NestedNameSpecifierLoc QualifierLoc, SourceLocation TemplateKWLoc, NamedDecl *FirstQualifierFoundInScope, DeclarationNameInfo MemberNameInfo, const TemplateArgumentListInfo *TemplateArgs)
Represents a static or instance method of a struct/union/class.
Represents a C++ struct/union/class.
bool isProvablyNotDerivedFrom(const CXXRecordDecl *Base) const
Determine whether this class is provably not derived from the type Base.
CXXRecordDecl * getCanonicalDecl() override
Retrieves the "canonical" declaration of the given declaration.
Represents a C++ nested-name-specifier or a global scope specifier.
SourceRange getRange() const
bool isSet() const
Deprecated.
NestedNameSpecifier getScopeRep() const
Retrieve the representation of the nested-name-specifier.
NestedNameSpecifierLoc getWithLocInContext(ASTContext &Context) const
Retrieve a nested-name-specifier with location information, copied into the given AST context.
bool isInvalid() const
An error occurred during parsing of the scope specifier.
bool isEmpty() const
No scope specifier.
Qualifiers getQualifiers() const
Retrieve all qualifiers.
A POD class for pairing a NamedDecl* with an access specifier.
static DeclAccessPair make(NamedDecl *D, AccessSpecifier AS)
DeclContext - This is used only as base class of specific decl types that can act as declaration cont...
DeclContext * getParent()
getParent - Returns the containing DeclContext.
bool Equals(const DeclContext *DC) const
Determine whether this declaration context is equivalent to the declaration context DC.
bool Encloses(const DeclContext *DC) const
Determine whether this declaration context semantically encloses the declaration context DC.
DeclContext * getNonTransparentContext()
Simple template class for restricting typo correction candidates to ones having a single Decl* of the...
A reference to a declared variable, function, enum, etc.
Decl - This represents one declaration (or definition), e.g.
bool isInvalidDecl() const
SourceLocation getLocation() const
DeclContext * getDeclContext()
AccessSpecifier getAccess() const
The name of a declaration.
IdentifierInfo * getAsIdentifierInfo() const
Retrieve the IdentifierInfo * stored in this declaration name, or null if this declaration name isn't...
bool isDependentName() const
Determines whether the name itself is dependent, e.g., because it involves a C++ type that is itself ...
std::string getAsString() const
Retrieve the human-readable string for this name.
NameKind getNameKind() const
Determine what kind of name this is.
bool isEmpty() const
Evaluates true when this declaration name is empty.
bool isIgnored(unsigned DiagID, SourceLocation Loc) const
Determine whether the diagnostic is known to be ignored.
An instance of this object exists for each enum constant that is defined.
This represents one expression.
Expr * IgnoreParenCasts() LLVM_READONLY
Skip past any parentheses and casts which might surround this expression until reaching a fixed point...
ExprValueKind getValueKind() const
getValueKind - The value kind that this expression produces.
bool isTypeDependent() const
Determines whether the type of this expression depends on.
Expr * IgnoreParenImpCasts() LLVM_READONLY
Skip past any parentheses and implicit casts which might surround this expression until reaching a fi...
ExprObjectKind getObjectKind() const
getObjectKind - The object kind that this expression produces.
Expr * IgnoreImpCasts() LLVM_READONLY
Skip past any implicit casts which might surround this expression until reaching a fixed point.
ExtVectorElementExpr - This represents access to specific elements of a vector, and may occur on the ...
ExtVectorType - Extended vector type.
bool isAccessorWithinNumElements(char c, bool isNumericAccessor) const
static int getNumericAccessorIdx(char c)
static int getPointAccessorIdx(char c)
Represents difference between two FPOptions values.
Represents a member of a struct/union/class.
static FixItHint CreateReplacement(CharSourceRange RemoveRange, StringRef Code)
Create a code modification hint that replaces the given source range with the given code string.
static FixItHint CreateRemoval(CharSourceRange RemoveRange)
Create a code modification hint that removes the given source range.
static FixItHint CreateInsertion(SourceLocation InsertionLoc, StringRef Code, bool BeforePreviousInsertions=false)
Create a code modification hint that inserts the given code string at a specific location.
Represents a prototype with parameter type info, e.g.
One of these records is kept for each identifier that is lexed.
unsigned getLength() const
Efficiently return the length of this identifier info.
const char * getNameStart() const
Return the beginning of the actual null-terminated string for this identifier.
static ImplicitCastExpr * Create(const ASTContext &Context, QualType T, CastKind Kind, Expr *Operand, const CXXCastPath *BasePath, ExprValueKind Cat, FPOptionsOverride FPO)
Represents a field injected from an anonymous union/struct into the parent scope.
chain_iterator chain_end() const
chain_iterator chain_begin() const
VarDecl * getVarDecl() const
ArrayRef< NamedDecl * >::const_iterator chain_iterator
unsigned getOpenCLCompatibleVersion() const
Return the OpenCL version that kernel language is compatible with.
iterator begin(Source *source, bool LocalOnly=false)
Represents the results of name lookup.
UnresolvedSetImpl::iterator iterator
An instance of this class represents the declaration of a property member.
A member reference to an MSPropertyDecl.
MemberExpr - [C99 6.5.2.3] Structure and Union Members.
void setHadMultipleCandidates(bool V=true)
Sets the flag telling whether this expression refers to a method that was resolved from an overloaded...
static MemberExpr * Create(const ASTContext &C, Expr *Base, bool IsArrow, SourceLocation OperatorLoc, NestedNameSpecifierLoc QualifierLoc, SourceLocation TemplateKWLoc, ValueDecl *MemberDecl, DeclAccessPair FoundDecl, DeclarationNameInfo MemberNameInfo, const TemplateArgumentListInfo *TemplateArgs, QualType T, ExprValueKind VK, ExprObjectKind OK, NonOdrUseReason NOUR)
This represents a decl that may have a name.
NamedDecl * getUnderlyingDecl()
Looks through UsingDecls and ObjCCompatibleAliasDecls for the underlying named decl.
DeclarationName getDeclName() const
Get the actual, stored name of the declaration, which may be a special name.
bool isCXXInstanceMember() const
Determine whether the given declaration is an instance member of a C++ class.
A C++ nested-name-specifier augmented with source location information.
bool isDependent() const
Whether this nested name specifier refers to a dependent type or not.
ObjCCategoryImplDecl - An object of this class encapsulates a category @implementation declaration.
ObjCPropertyDecl * FindPropertyDeclaration(const IdentifierInfo *PropertyId, ObjCPropertyQueryKind QueryKind) const
FindPropertyDeclaration - Finds declaration of the property given its name in 'PropertyId' and return...
ObjCMethodDecl * getInstanceMethod(Selector Sel, bool AllowHidden=false) const
ObjCImplementationDecl - Represents a class definition - this is where method definitions are specifi...
Represents an ObjC class declaration.
ObjCMethodDecl * lookupClassMethod(Selector Sel) const
Lookup a class method for a given selector.
ObjCIvarDecl * lookupInstanceVariable(IdentifierInfo *IVarName, ObjCInterfaceDecl *&ClassDeclared)
ObjCMethodDecl * lookupPrivateMethod(const Selector &Sel, bool Instance=true) const
Lookup a method in the classes implementation hierarchy.
bool isSuperClassOf(const ObjCInterfaceDecl *I) const
isSuperClassOf - Return true if this class is the specified class or is a super class of the specifie...
ObjCIsaExpr - Represent X->isa and X.isa when X is an ObjC 'id' type.
ObjCIvarDecl - Represents an ObjC instance variable.
AccessControl getAccessControl() const
QualType getUsageType(QualType objectType) const
Retrieve the type of this instance variable when viewed as a member of a specific object type.
ObjCIvarRefExpr - A reference to an ObjC instance variable.
ObjCMethodDecl - Represents an instance or class method declaration.
ObjCInterfaceDecl * getClassInterface()
Represents a pointer to an Objective C object.
const ObjCObjectType * getObjectType() const
Gets the type pointed to by this ObjC pointer.
Represents one property declaration in an Objective-C interface.
ObjCPropertyRefExpr - A dot-syntax expression to access an ObjC property.
Represents an Objective-C protocol declaration.
protocol_range protocols() const
PointerType - C99 6.7.5.1 - Pointer Declarators.
QualType getPointeeType() const
IdentifierTable & getIdentifierTable()
SelectorTable & getSelectorTable()
A (possibly-)qualified type.
QualType getDesugaredType(const ASTContext &Context) const
Return the specified type with any "sugar" removed from the type.
bool isNull() const
Return true if this QualType doesn't point to a type yet.
Qualifiers getQualifiers() const
Retrieve the set of qualifiers applied to this type.
Qualifiers::ObjCLifetime getObjCLifetime() const
Returns lifetime attribute of this type.
QualType getNonReferenceType() const
If Type is a reference type (e.g., const int&), returns the type that the reference refers to ("const...
The collection of all-type qualifiers we support.
@ OCL_Weak
Reading or writing from this object requires a barrier call.
bool hasAddressSpace() const
void removeAddressSpace()
Base for LValueReferenceType and RValueReferenceType.
Scope - A scope is a transient data structure that is used while parsing the program.
const Scope * getFnParent() const
getFnParent - Return the closest scope that is a function body.
unsigned getFlags() const
getFlags - Return the flags for this scope.
bool isFnTryCatchScope() const
Determine whether this scope is a function-level C++ try or catch scope.
const Scope * getParent() const
getParent - Return the scope that this is nested in.
@ TryScope
This is the scope of a C++ try statement.
static Selector constructSetterSelector(IdentifierTable &Idents, SelectorTable &SelTable, const IdentifierInfo *Name)
Return the default setter selector for the given identifier.
Selector getNullarySelector(const IdentifierInfo *ID)
Smart pointer class that efficiently represents Objective-C method names.
PartialDiagnostic PDiag(unsigned DiagID=0)
Build a partial diagnostic.
SemaDiagnosticBuilder Diag(SourceLocation Loc, unsigned DiagID)
Emit a diagnostic.
QualType checkMatrixComponent(Sema &S, QualType baseType, ExprValueKind &VK, SourceLocation OpLoc, const IdentifierInfo *CompName, SourceLocation CompLoc)
ExprResult HandleExprPropertyRefExpr(const ObjCObjectPointerType *OPT, Expr *BaseExpr, SourceLocation OpLoc, DeclarationName MemberName, SourceLocation MemberLoc, SourceLocation SuperLoc, QualType SuperType, bool Super)
HandleExprPropertyRefExpr - Handle foo.bar where foo is a pointer to an objective C interface.
ExprResult getOpenMPCapturedExpr(VarDecl *Capture, ExprValueKind VK, ExprObjectKind OK, SourceLocation Loc)
bool isSpecialMember() const
RAII class used to determine whether SFINAE has trapped any errors that occur during template argumen...
bool hasErrorOccurred() const
Determine whether any SFINAE errors have been trapped.
Sema - This implements semantic analysis and AST building for C.
QualType getCurrentThisType()
Try to retrieve the type of the 'this' pointer.
Scope * getCurScope() const
Retrieve the parser's current scope.
DefaultedFunctionKind getDefaultedFunctionKind(const FunctionDecl *FD)
Determine the kind of defaulting that would be done for a given function.
ExprResult BuildMemberReferenceExpr(Expr *Base, QualType BaseType, SourceLocation OpLoc, bool IsArrow, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, NamedDecl *FirstQualifierInScope, const DeclarationNameInfo &NameInfo, const TemplateArgumentListInfo *TemplateArgs, const Scope *S, ActOnMemberAccessExtraArgs *ExtraArgs=nullptr)
ExprResult IgnoredValueConversions(Expr *E)
IgnoredValueConversions - Given that an expression's result is syntactically ignored,...
@ LookupMemberName
Member name lookup, which finds the names of class/struct/union members.
bool LookupTemplateName(LookupResult &R, Scope *S, CXXScopeSpec &SS, QualType ObjectType, bool EnteringContext, RequiredTemplateKind RequiredTemplate=SourceLocation(), AssumedTemplateKind *ATK=nullptr, bool AllowTypoCorrection=true)
void DecomposeUnqualifiedId(const UnqualifiedId &Id, TemplateArgumentListInfo &Buffer, DeclarationNameInfo &NameInfo, const TemplateArgumentListInfo *&TemplateArgs)
Decomposes the given name into a DeclarationNameInfo, its location, and possibly a list of template a...
ExprResult ActOnStartCXXMemberReference(Scope *S, Expr *Base, SourceLocation OpLoc, tok::TokenKind OpKind, ParsedType &ObjectType, bool &MayBePseudoDestructor)
ExtVectorDeclsType ExtVectorDecls
ExtVectorDecls - This is a list all the extended vector types.
FunctionDecl * getCurFunctionDecl(bool AllowLambda=false) const
Returns a pointer to the innermost enclosing function, or nullptr if the current context is not insid...
bool DiagnoseUseOfDecl(NamedDecl *D, ArrayRef< SourceLocation > Locs, const ObjCInterfaceDecl *UnknownObjCClass=nullptr, bool ObjCPropertyAccess=false, bool AvoidPartialAvailabilityChecks=false, ObjCInterfaceDecl *ClassReceiver=nullptr, bool SkipTrailingRequiresClause=false)
Determine whether the use of this declaration is valid, and emit any corresponding diagnostics.
ExprResult PerformMemberExprBaseConversion(Expr *Base, bool IsArrow)
Perform conversions on the LHS of a member access expression.
ExprResult MaybeConvertParenListExprToParenExpr(Scope *S, Expr *ME)
This is not an AltiVec-style cast or or C++ direct-initialization, so turn the ParenListExpr into a s...
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.
ExprResult DefaultFunctionArrayLvalueConversion(Expr *E, bool Diagnose=true)
ExprResult BuildTemplateIdExpr(const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, LookupResult &R, bool RequiresADL, const TemplateArgumentListInfo *TemplateArgs)
ExprResult ImpCastExprToType(Expr *E, QualType Type, CastKind CK, ExprValueKind VK=VK_PRValue, const CXXCastPath *BasePath=nullptr, CheckedConversionKind CCK=CheckedConversionKind::Implicit)
ImpCastExprToType - If Expr is not of type 'Type', insert an implicit cast.
ObjCMethodDecl * getCurMethodDecl()
getCurMethodDecl - If inside of a method body, this returns a pointer to the method decl for the meth...
const LangOptions & getLangOpts() const
TypoCorrection CorrectTypo(const DeclarationNameInfo &Typo, Sema::LookupNameKind LookupKind, Scope *S, CXXScopeSpec *SS, 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...
const FunctionProtoType * ResolveExceptionSpec(SourceLocation Loc, const FunctionProtoType *FPT)
NonOdrUseReason getNonOdrUseReasonInCurrentContext(ValueDecl *D)
If D cannot be odr-used in the current expression evaluation context, return a reason explaining why.
bool LookupParsedName(LookupResult &R, Scope *S, CXXScopeSpec *SS, QualType ObjectType, 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...
bool isPotentialImplicitMemberAccess(const CXXScopeSpec &SS, LookupResult &R, bool IsAddressOfOperand)
Check whether an expression might be an implicit class member access.
NamedDecl * FindFirstQualifierInScope(Scope *S, NestedNameSpecifier NNS)
If the given nested-name-specifier begins with a bare identifier (e.g., Base::), perform name lookup ...
ExprResult TemporaryMaterializationConversion(Expr *E)
If E is a prvalue denoting an unmaterialized temporary, materialize it as an xvalue.
NamedDeclSetType UnusedPrivateFields
Set containing all declared private fields that are not used.
sema::FunctionScopeInfo * getCurFunction() const
Expr * BuildCXXThisExpr(SourceLocation Loc, QualType Type, bool IsImplicit)
Build a CXXThisExpr and mark it referenced in the current context.
ExprResult ActOnMemberAccessExpr(Scope *S, Expr *Base, SourceLocation OpLoc, tok::TokenKind OpKind, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, UnqualifiedId &Member, Decl *ObjCImpDecl)
The main callback when the parser finds something like expression .
ExprResult BuildImplicitMemberExpr(const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, LookupResult &R, const TemplateArgumentListInfo *TemplateArgs, bool IsDefiniteInstance, const Scope *S)
Builds an implicit member access expression.
ExprResult DefaultLvalueConversion(Expr *E)
ExprResult BuildDeclarationNameExpr(const CXXScopeSpec &SS, LookupResult &R, bool NeedsADL, bool AcceptInvalidDecl=false)
DeclContext * CurContext
CurContext - This is the current declaration context of parsing.
bool isUnevaluatedContext() const
Determines whether we are currently in a context that is not evaluated as per C++ [expr] p5.
DeclContext * getFunctionLevelDeclContext(bool AllowLambda=false) const
If AllowLambda is true, treat lambda as function.
ExprResult CheckPlaceholderExpr(Expr *E)
Check for operands with placeholder types and complain if found.
QualType CXXThisTypeOverride
When non-NULL, the C++ 'this' expression is allowed despite the current context not being a non-stati...
ExprResult BuildFieldReferenceExpr(Expr *BaseExpr, bool IsArrow, SourceLocation OpLoc, const CXXScopeSpec &SS, FieldDecl *Field, DeclAccessPair FoundDecl, const DeclarationNameInfo &MemberNameInfo)
ExprResult ActOnDependentMemberExpr(Expr *Base, QualType BaseType, bool IsArrow, SourceLocation OpLoc, const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, NamedDecl *FirstQualifierInScope, const DeclarationNameInfo &NameInfo, const TemplateArgumentListInfo *TemplateArgs)
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...
ExprResult BuildPossibleImplicitMemberExpr(const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, LookupResult &R, const TemplateArgumentListInfo *TemplateArgs, const Scope *S)
Builds an expression which might be an implicit member expression.
DeclContext * computeDeclContext(QualType T)
Compute the DeclContext that is associated with the given type.
bool DiagRuntimeBehavior(SourceLocation Loc, const Stmt *Statement, const PartialDiagnostic &PD)
Conditionally issue a diagnostic based on the current evaluation context.
ExprResult BuildAnonymousStructUnionMemberReference(const CXXScopeSpec &SS, SourceLocation nameLoc, IndirectFieldDecl *indirectField, DeclAccessPair FoundDecl=DeclAccessPair::make(nullptr, AS_none), Expr *baseObjectExpr=nullptr, SourceLocation opLoc=SourceLocation())
ExternalSemaSource * getExternalSource() const
bool isSFINAEContext() const
@ UnevaluatedAbstract
The current expression occurs within an unevaluated operand that unconditionally permits abstract ref...
@ UnevaluatedList
The current expression occurs within a braced-init-list within an unevaluated operand.
@ ConstantEvaluated
The current context is "potentially evaluated" in C++11 terms, but the expression is evaluated at com...
@ DiscardedStatement
The current expression occurs within a discarded statement.
@ PotentiallyEvaluated
The current expression is potentially evaluated at run time, which means that code may be generated t...
@ Unevaluated
The current expression and its subexpressions occur within an unevaluated operand (C++11 [expr]p7),...
@ ImmediateFunctionContext
In addition of being constant evaluated, the current expression occurs in an immediate function conte...
@ PotentiallyEvaluatedIfUsed
The current expression is potentially evaluated, but any declarations referenced inside that expressi...
void diagnoseTypo(const TypoCorrection &Correction, const PartialDiagnostic &TypoDiag, bool ErrorRecovery=true)
bool RequireCompleteType(SourceLocation Loc, QualType T, CompleteTypeKind Kind, TypeDiagnoser &Diagnoser)
Ensure that the type T is a complete type.
ExprResult PerformObjectMemberConversion(Expr *From, NestedNameSpecifier Qualifier, NamedDecl *FoundDecl, NamedDecl *Member)
Cast a base object to a member's actual type.
SmallVector< ExpressionEvaluationContextRecord, 8 > ExprEvalContexts
A stack of expression evaluation contexts.
bool isDependentScopeSpecifier(const CXXScopeSpec &SS)
DeclResult CheckVarTemplateId(VarTemplateDecl *Template, SourceLocation TemplateLoc, SourceLocation TemplateNameLoc, const TemplateArgumentListInfo &TemplateArgs, bool SetWrittenArgs)
Get the specialization of the given variable template corresponding to the specified argument list,...
DiagnosticsEngine & Diags
ExprResult DefaultFunctionArrayConversion(Expr *E, bool Diagnose=true)
DefaultFunctionArrayConversion (C99 6.3.2.1p3, C99 6.3.2.1p4).
void diagnoseMissingTemplateArguments(TemplateName Name, SourceLocation Loc)
MemberExpr * BuildMemberExpr(Expr *Base, bool IsArrow, SourceLocation OpLoc, NestedNameSpecifierLoc NNS, SourceLocation TemplateKWLoc, ValueDecl *Member, DeclAccessPair FoundDecl, bool HadMultipleCandidates, const DeclarationNameInfo &MemberNameInfo, QualType Ty, ExprValueKind VK, ExprObjectKind OK, const TemplateArgumentListInfo *TemplateArgs=nullptr)
void MarkMemberReferenced(MemberExpr *E)
Perform reference-marking and odr-use handling for a MemberExpr.
bool CheckQualifiedMemberReference(Expr *BaseExpr, QualType BaseType, const CXXScopeSpec &SS, const LookupResult &R)
Encodes a location in the source.
bool isValid() const
Return true if this is a valid SourceLocation object.
SourceLocation getLocWithOffset(IntTy Offset) const
Return a source location with the specified offset from this SourceLocation.
A trivial tuple used to represent a source range.
SourceLocation getBegin() const
SourceRange getSourceRange() const LLVM_READONLY
SourceLocation tokens are not useful in isolation - they are low level value objects created/interpre...
A convenient class for passing around template argument information.
ArrayRef< TemplateArgumentLoc > arguments() const
Location wrapper for a TemplateArgument.
bool isPointerType() const
bool isObjCSelType() const
const T * castAs() const
Member-template castAs<specific type>.
QualType getPointeeType() const
If this is a pointer, ObjC object pointer, or block pointer, this returns the respective pointee.
bool isDependentType() const
Whether this type is a dependent type, meaning that its definition somehow depends on a template para...
bool isHLSLResourceRecord() const
const T * getAs() const
Member-template getAs<specific type>'.
bool isRecordType() const
bool isHLSLResourceRecordArray() const
Simple class containing the result of Sema::CorrectTypo.
UnaryOperator - This represents the unary-expression's (except sizeof and alignof),...
Represents a C++ unqualified-id that has been parsed.
SourceRange getSourceRange() const LLVM_READONLY
Return the source range that covers this unqualified-id.
UnqualifiedIdKind getKind() const
Determine what kind of name we have.
static UnresolvedLookupExpr * Create(const ASTContext &Context, CXXRecordDecl *NamingClass, NestedNameSpecifierLoc QualifierLoc, const DeclarationNameInfo &NameInfo, bool RequiresADL, UnresolvedSetIterator Begin, UnresolvedSetIterator End, bool KnownDependent, bool KnownInstantiationDependent)
Represents a C++ member access expression for which lookup produced a set of overloaded functions.
static UnresolvedMemberExpr * Create(const ASTContext &Context, bool HasUnresolvedUsing, Expr *Base, QualType BaseType, bool IsArrow, SourceLocation OperatorLoc, NestedNameSpecifierLoc QualifierLoc, SourceLocation TemplateKWLoc, const DeclarationNameInfo &MemberNameInfo, const TemplateArgumentListInfo *TemplateArgs, UnresolvedSetIterator Begin, UnresolvedSetIterator End)
Represent the declaration of a variable (in which case it is an lvalue) a function (in which case it ...
Represents a variable declaration or definition.
void setTemplateSpecializationKind(TemplateSpecializationKind TSK, SourceLocation PointOfInstantiation=SourceLocation())
For a static data member that was instantiated from a static data member of a class template,...
TemplateSpecializationKind getTemplateSpecializationKind() const
If this variable is an instantiation of a variable template or a static data member of a class templa...
Declaration of a variable template.
unsigned getNumElements() const
QualType getElementType() const
void recordUseOfWeak(const ExprT *E, bool IsRead=true)
Record that a weak object was accessed.
const internal::VariadicAllOfMatcher< Type > type
Matches Types in the clang AST.
TokenKind
Provides a simple uniform namespace for tokens from all C languages.
The JSON file list parser is used to communicate input to InstallAPI.
bool isa(CodeGen::Address addr)
bool isUnresolvedExceptionSpec(ExceptionSpecificationType ESpecType)
ExprObjectKind
A further classification of the kind of object referenced by an l-value or x-value.
@ OK_ObjCProperty
An Objective-C property is a logical field of an Objective-C object which is read and written via Obj...
@ OK_Ordinary
An ordinary object is located at an address in memory.
@ OK_BitField
A bitfield object is a bitfield on a C or C++ record.
@ IK_ConstructorName
A constructor name.
ActionResult< Decl * > DeclResult
ObjCMethodFamily
A family of Objective-C methods.
@ Result
The result type of a method or function.
ActionResult< CXXBaseSpecifier * > BaseResult
ExprValueKind
The categorization of expression values, currently following the C++11 scheme.
@ VK_PRValue
A pr-value expression (in the C++11 taxonomy) produces a temporary value.
@ VK_LValue
An l-value expression is a reference to an object with independent storage.
bool declaresSameEntity(const Decl *D1, const Decl *D2)
Determine whether two declarations declare the same entity.
@ TSK_ImplicitInstantiation
This template specialization was implicitly instantiated from a template.
U cast(CodeGen::Address addr)
OpaquePtr< QualType > ParsedType
An opaque type for threading parsed type information through the parser.
@ Interface
The "__interface" keyword introduces the elaborated-type-specifier.
@ None
No keyword precedes the qualified type name.
@ Enum
The "enum" keyword introduces the elaborated-type-specifier.
ActionResult< Expr * > ExprResult
DeclarationNameInfo - A collector data type for bundling together a DeclarationName and the correspon...
SourceLocation getLoc() const
getLoc - Returns the main location of the declaration name.
DeclarationName getName() const
getName - Returns the embedded declaration name.
SourceRange getSourceRange() const LLVM_READONLY
getSourceRange - The range of the declaration name.