25 using namespace clang;
28 typedef llvm::SmallPtrSet<const CXXRecordDecl*, 4>
BaseSet;
35 return !Bases.count(
Base->getCanonicalDecl());
37 return BaseIsNotInSet(Record) && Record->
forallBases(BaseIsNotInSet);
90 assert(!R.
empty() && (*R.
begin())->isCXXClassMember());
95 (!isa<CXXMethodDecl>(DC) || cast<CXXMethodDecl>(DC)->isStatic());
101 bool hasNonInstance =
false;
102 bool isField =
false;
106 D = D->getUnderlyingDecl();
108 if (D->isCXXInstanceMember()) {
109 isField |= isa<FieldDecl>(D) || isa<MSPropertyDecl>(D) ||
110 isa<IndirectFieldDecl>(D);
113 Classes.insert(R->getCanonicalDecl());
115 hasNonInstance =
true;
133 assert(!AbstractInstanceResult);
154 if (isStaticContext) {
158 return AbstractInstanceResult ? AbstractInstanceResult
164 contextClass = MD->
getParent()->getCanonicalDecl();
166 contextClass = cast<CXXRecordDecl>(DC);
174 if (R.getNamingClass() &&
181 Classes.insert(R.getNamingClass()->getCanonicalDecl());
189 AbstractInstanceResult ? AbstractInstanceResult :
212 bool InStaticMethod = Method && Method->
isStatic();
213 bool IsField = isa<FieldDecl>(Rep) || isa<IndirectFieldDecl>(Rep);
215 if (IsField && InStaticMethod)
217 SemaRef.
Diag(Loc, diag::err_invalid_member_use_in_static_method)
218 << Range << nameInfo.
getName();
219 else if (ContextClass && RepClass && SS.
isEmpty() && !InStaticMethod &&
220 !RepClass->
Equals(ContextClass) && RepClass->
Encloses(ContextClass))
223 SemaRef.
Diag(Loc, diag::err_nested_non_static_member_use)
224 << IsField << RepClass << nameInfo.
getName() << ContextClass << Range;
226 SemaRef.
Diag(Loc, diag::err_invalid_non_static_member_use)
227 << nameInfo.
getName() << Range;
229 SemaRef.
Diag(Loc, diag::err_member_call_without_object)
242 return BuildImplicitMemberExpr(SS, TemplateKWLoc, R, TemplateArgs,
true, S);
247 return BuildImplicitMemberExpr(SS, TemplateKWLoc, R, TemplateArgs,
false,
251 Diag(R.
getNameLoc(), diag::warn_cxx98_compat_non_static_member_use)
258 if (TemplateArgs || TemplateKWLoc.
isValid())
259 return BuildTemplateIdExpr(SS, TemplateKWLoc, R,
false, TemplateArgs);
260 return BuildDeclarationNameExpr(SS, R,
false);
269 llvm_unreachable(
"unexpected instance member access kind");
291 return (len >= 1 && len <= 4) || len == 8 || len == 16;
315 bool HalvingSwizzle =
false;
319 bool HexSwizzle = (*compStr ==
's' || *compStr ==
'S') && compStr[1];
321 bool HasRepeated =
false;
322 bool HasIndex[16] = {};
328 if (!strcmp(compStr,
"hi") || !strcmp(compStr,
"lo") ||
329 !strcmp(compStr,
"even") || !strcmp(compStr,
"odd")) {
330 HalvingSwizzle =
true;
331 }
else if (!HexSwizzle &&
333 bool HasRGBA =
IsRGBA(*compStr);
336 if (HasRGBA !=
IsRGBA(*compStr))
338 if (HasIndex[Idx]) HasRepeated =
true;
339 HasIndex[Idx] =
true;
344 if (HasRGBA || (*compStr &&
IsRGBA(*compStr))) {
346 const char *DiagBegin = HasRGBA ? CompName->
getNameStart() : compStr;
347 S.
Diag(OpLoc, diag::ext_opencl_ext_vector_type_rgba_selector)
348 << StringRef(DiagBegin, 1)
353 if (HexSwizzle) compStr++;
355 if (HasIndex[Idx]) HasRepeated =
true;
356 HasIndex[Idx] =
true;
361 if (!HalvingSwizzle && *compStr) {
364 S.
Diag(OpLoc, diag::err_ext_vector_component_name_illegal)
371 if (!HalvingSwizzle) {
379 S.
Diag(OpLoc, diag::err_ext_vector_component_exceeds_length)
389 unsigned SwizzleLength = CompName->
getLength();
395 S.
Diag(OpLoc, diag::err_opencl_ext_vector_component_invalid_length)
406 unsigned CompSize = HalvingSwizzle ? (vecType->
getNumElements() + 1) / 2
419 for (Sema::ExtVectorDeclsType::iterator
423 if ((*I)->getUnderlyingType() == VT)
441 for (
const auto *I : PDecl->
protocols()) {
454 Decl *GDecl =
nullptr;
455 for (
const auto *I : QIdTy->
quals()) {
469 for (
const auto *I : QIdTy->
quals()) {
498 if (PT && (!getLangOpts().ObjC ||
500 assert(BaseExpr &&
"cannot happen with implicit member accesses");
501 Diag(OpLoc, diag::err_typecheck_member_reference_struct_union)
509 isDependentScopeSpecifier(SS));
514 Context, BaseExpr, BaseType, IsArrow, OpLoc,
516 NameInfo, TemplateArgs);
533 SemaRef.
Diag(nameInfo.
getLoc(), diag::err_qualified_member_of_unrelated)
534 << SS.
getRange() << rep << BaseType;
554 cast_or_null<CXXRecordDecl>(computeDeclContext(BaseType));
565 if (!BaseExpr && !(*I)->isCXXInstanceMember())
595 explicit RecordMemberExprValidatorCCC(
const RecordType *RTy)
599 WantTypeSpecifiers =
false;
600 WantExpressionKeywords =
false;
601 WantCXXNamedCasts =
false;
602 WantFunctionLikeCasts =
false;
603 WantRemainingKeywords =
false;
606 bool ValidateCandidate(
const TypoCorrection &candidate)
override {
610 if (!ND || !(isa<ValueDecl>(ND) || isa<FunctionTemplateDecl>(ND)))
614 if (Record->containsDecl(ND))
617 if (
const CXXRecordDecl *RD = dyn_cast<CXXRecordDecl>(Record)) {
619 for (
const auto &BS : RD->bases()) {
621 dyn_cast_or_null<RecordType>(BS.getType().getTypePtrOrNull())) {
622 if (BSTy->getDecl()->containsDecl(ND))
631 std::unique_ptr<CorrectionCandidateCallback> clone()
override {
632 return std::make_unique<RecordMemberExprValidatorCCC>(*this);
652 diag::err_typecheck_incomplete_tag,
656 if (HasTemplateArgs || TemplateKWLoc.
isValid()) {
677 assert(DC &&
"Cannot handle non-computable dependent contexts in lookup");
679 if (!isa<TypeDecl>(DC)) {
703 RecordMemberExprValidatorCCC CCC(RTy);
708 assert(!TC.isKeyword() &&
709 "Got a keyword as a correction for a member!");
710 bool DroppedSpecifier =
711 TC.WillReplaceSpecifier() &&
714 << Typo << DC << DroppedSpecifier
717 SemaRef.
Diag(TypoLoc, diag::err_no_member) << Typo << DC << BaseRange;
721 LookupResult R(Q.SemaRef, Q.NameInfo, Q.LookupKind, Q.Redecl);
730 nullptr, R,
nullptr,
nullptr);
740 Decl *ObjCImpDecl,
bool HasTemplateArgs,
754 (SS.
isSet() && isDependentScopeSpecifier(SS)))
755 return ActOnDependentMemberExpr(Base, BaseType,
757 SS, TemplateKWLoc, FirstQualifierInScope,
758 NameInfo, TemplateArgs);
769 SS, TemplateArgs !=
nullptr, TemplateKWLoc, TE))
780 TemplateArgs !=
nullptr, TemplateKWLoc);
784 Base = BaseResult.
get();
796 return BuildMemberReferenceExpr(Base, BaseType,
797 OpLoc, IsArrow, SS, TemplateKWLoc,
798 FirstQualifierInScope, R, TemplateArgs, S,
807 Expr *baseObjectExpr,
822 assert(!baseObjectExpr &&
"anonymous struct/union is static data member?");
827 = BuildDeclarationNameExpr(EmptySS, baseNameInfo, baseVariable);
830 baseObjectExpr = result.
get();
833 assert((baseVariable || baseObjectExpr) &&
834 "referencing anonymous struct/union without a base variable or " 839 Expr *result = baseObjectExpr;
855 BuildFieldReferenceExpr(result, baseObjectIsPointer,
SourceLocation(),
856 SS, field, foundDecl, memberNameInfo)
866 FieldDecl *field = cast<FieldDecl>(*FI++);
875 (FI == FEnd ? SS : EmptySS), field,
876 fakeFoundDecl, memberNameInfo)
904 return BuildMemberExpr(Base, IsArrow, OpLoc, NNS, TemplateKWLoc, Member,
905 FoundDecl, HadMultipleCandidates, MemberNameInfo, Ty,
906 VK, OK, TemplateArgs);
915 assert((!IsArrow || Base->
isRValue()) &&
"-> base must be a pointer rvalue");
918 Member, FoundDecl, MemberNameInfo, TemplateArgs, Ty,
919 VK, OK, getNonOdrUseReasonInCurrentContext(Member));
921 MarkMemberReferenced(E);
929 if (
auto *NewFPT = ResolveExceptionSpec(MemberNameInfo.
getLoc(), FPT))
955 diagnoseMissingTemplateArguments(
TemplateName(VarTempl),
960 DeclResult VDecl = CheckVarTemplateId(VarTempl, TemplateKWLoc,
961 MemberNameInfo.
getLoc(), *TemplateArgs);
980 bool SuppressQualifierCheck,
991 if (!IsArrow && BaseExpr && BaseExpr->
isRValue()) {
992 ExprResult Converted = TemporaryMaterializationConversion(BaseExpr);
995 BaseExpr = Converted.
get();
1009 const auto *FD = getCurFunctionDecl();
1010 if (S && BaseExpr && FD &&
1011 (isa<CXXDestructorDecl>(FD) || isa<CXXConstructorDecl>(FD)) &&
1014 Diag(MemberLoc, diag::warn_cdtor_function_try_handler_mem_expr)
1015 << isa<CXXDestructorDecl>(FD);
1020 ? computeDeclContext(SS,
false)
1025 if (!IsArrow && BaseExpr) {
1028 bool MayBePseudoDestructor =
false;
1029 RetryExpr = ActOnStartCXXMemberReference(getCurScope(), BaseExpr,
1030 OpLoc, tok::arrow, ObjectType,
1031 MayBePseudoDestructor);
1034 RetryExpr = ActOnMemberAccessExpr(
1035 ExtraArgs->
S, RetryExpr.
get(), OpLoc, tok::arrow, TempSS,
1042 Diag(OpLoc, diag::err_no_member_overloaded_arrow)
1061 if ((SS.
isSet() || !BaseExpr ||
1062 (isa<CXXThisExpr>(BaseExpr) &&
1063 cast<CXXThisExpr>(BaseExpr)->isImplicit())) &&
1064 !SuppressQualifierCheck &&
1065 CheckQualifiedMemberReference(BaseExpr, BaseType, SS, R))
1077 BaseExpr, BaseExprType,
1080 TemplateKWLoc, MemberNameInfo,
1106 assert((!TemplateArgs || isa<VarTemplateDecl>(MemberDecl)) &&
1107 "How did we get template arguments here sans a variable template");
1108 if (isa<VarTemplateDecl>(MemberDecl)) {
1109 MemberDecl = getVarTemplateSpecialization(
1110 cast<VarTemplateDecl>(MemberDecl), TemplateArgs,
1116 FoundDecl, TemplateArgs);
1121 BaseExpr = BuildCXXThisExpr(Loc, BaseExprType,
true);
1125 if (DiagnoseUseOfDecl(MemberDecl, MemberLoc))
1128 if (
FieldDecl *FD = dyn_cast<FieldDecl>(MemberDecl))
1129 return BuildFieldReferenceExpr(BaseExpr, IsArrow, OpLoc, SS, FD, FoundDecl,
1139 return BuildAnonymousStructUnionMemberReference(SS, MemberLoc, FD,
1140 FoundDecl, BaseExpr,
1143 if (
VarDecl *Var = dyn_cast<VarDecl>(MemberDecl)) {
1144 return BuildMemberExpr(BaseExpr, IsArrow, OpLoc, &SS, TemplateKWLoc, Var,
1146 MemberNameInfo, Var->getType().getNonReferenceType(),
1150 if (
CXXMethodDecl *MemberFn = dyn_cast<CXXMethodDecl>(MemberDecl)) {
1153 if (MemberFn->isInstance()) {
1158 type = MemberFn->getType();
1161 return BuildMemberExpr(BaseExpr, IsArrow, OpLoc, &SS, TemplateKWLoc,
1162 MemberFn, FoundDecl,
false,
1165 assert(!isa<FunctionDecl>(MemberDecl) &&
"member function not C++ method?");
1168 return BuildMemberExpr(BaseExpr, IsArrow, OpLoc, &SS, TemplateKWLoc, Enum,
1170 MemberNameInfo, Enum->getType(),
VK_RValue,
1173 if (
VarTemplateDecl *VarTempl = dyn_cast<VarTemplateDecl>(MemberDecl)) {
1174 if (
VarDecl *Var = getVarTemplateSpecialization(
1175 VarTempl, TemplateArgs, MemberNameInfo, TemplateKWLoc))
1176 return BuildMemberExpr(
1177 BaseExpr, IsArrow, OpLoc, &SS, TemplateKWLoc, Var, FoundDecl,
1178 false, MemberNameInfo,
1184 if (isa<TypeDecl>(MemberDecl))
1185 Diag(MemberLoc, diag::err_typecheck_member_reference_type)
1186 << MemberName << BaseType << int(IsArrow);
1188 Diag(MemberLoc, diag::err_typecheck_member_reference_unknown)
1189 << MemberName << BaseType << int(IsArrow);
1206 if (!opty)
return false;
1234 return PT->getPointeeType()->isRecordType();
1242 return DefaultFunctionArrayLvalueConversion(Base);
1244 return CheckPlaceholderExpr(Base);
1260 Decl *ObjCImpDecl,
bool HasTemplateArgs,
1262 assert(BaseExpr.
get() &&
"no base expression");
1266 if (BaseExpr.isInvalid())
1269 QualType BaseType = BaseExpr.get()->getType();
1294 S.
Diag(OpLoc, diag::err_typecheck_member_reference_suggestion)
1295 << BaseType << int(IsArrow) << BaseExpr.get()->getSourceRange()
1302 S.
Diag(MemberLoc, diag::err_typecheck_member_reference_arrow)
1303 << BaseType << BaseExpr.get()->getSourceRange();
1312 HasTemplateArgs, TemplateKWLoc, TE))
1340 (OTy->isObjCId() || OTy->isObjCClass()))
1345 if (OTy->isObjCId() && Member->
isStr(
"isa"))
1350 ObjCImpDecl, HasTemplateArgs, TemplateKWLoc);
1355 diag::err_typecheck_incomplete_tag,
1372 S.
PDiag(diag::err_typecheck_member_reference_ivar_suggest)
1376 assert(!ClassDeclared);
1379 if (
auto *
Category = dyn_cast<ObjCCategoryDecl>(D))
1382 if (
auto *Implementation = dyn_cast<ObjCImplementationDecl>(D))
1383 ClassDeclared = Implementation->getClassInterface();
1384 else if (
auto *Interface = dyn_cast<ObjCInterfaceDecl>(D))
1385 ClassDeclared = Interface;
1387 assert(ClassDeclared &&
"cannot query interface");
1392 S.
Diag(MemberLoc, diag::err_property_found_suggest)
1393 << Member << BaseExpr.get()->getType()
1398 S.
Diag(MemberLoc, diag::err_typecheck_member_reference_ivar)
1400 << BaseExpr.get()->getSourceRange();
1405 assert(ClassDeclared);
1420 ClassOfMethodDecl = MD->getClassInterface();
1429 dyn_cast<ObjCImplementationDecl>(ObjCImpDecl))
1430 ClassOfMethodDecl = IMPD->getClassInterface();
1432 dyn_cast<ObjCCategoryImplDecl>(ObjCImpDecl))
1433 ClassOfMethodDecl = CatImplClass->getClassInterface();
1439 S.
Diag(MemberLoc, diag::err_private_ivar_access)
1443 S.
Diag(MemberLoc, diag::err_protected_ivar_access)
1451 if (UO->getOpcode() == UO_Deref)
1454 if (
DeclRefExpr *DE = dyn_cast<DeclRefExpr>(BaseExp))
1456 S.
Diag(DE->getLocation(), diag::err_arc_weak_ivar_access);
1468 S.
Diag(MemberLoc, diag::warn_direct_ivar_access) << IV->
getDeclName();
1472 IV, IV->
getUsageType(BaseType), MemberLoc, OpLoc, BaseExpr.get(),
1477 !S.
Diags.
isIgnored(diag::warn_arc_repeated_use_of_weak, MemberLoc))
1495 if (BaseExpr.isInvalid())
1499 BaseExpr.get()->getType()));
1530 SMD = dyn_cast<ObjCMethodDecl>(SDecl);
1541 ObjCImpDecl, HasTemplateArgs, TemplateKWLoc);
1543 return ExprError(S.
Diag(MemberLoc, diag::err_property_not_found)
1544 << MemberName << BaseType);
1554 ObjCImpDecl, HasTemplateArgs, TemplateKWLoc);
1588 if (Getter || Setter) {
1596 ObjCImpDecl, HasTemplateArgs, TemplateKWLoc);
1598 return ExprError(S.
Diag(MemberLoc, diag::err_property_not_found)
1599 << MemberName << BaseType);
1617 VK = POE->getSyntacticForm()->getValueKind();
1619 VK = BaseExpr.get()->getValueKind();
1641 ObjCImpDecl, HasTemplateArgs, TemplateKWLoc);
1655 if (!IsArrow && Ptr->getPointeeType()->isRecordType() &&
1657 S.
Diag(OpLoc, diag::err_typecheck_member_reference_suggestion)
1658 << BaseType << int(IsArrow) << BaseExpr.get()->getSourceRange()
1664 ObjCImpDecl, HasTemplateArgs, TemplateKWLoc);
1671 BaseExpr, S.
PDiag(diag::err_member_reference_needs_call),
1674 if (BaseExpr.isInvalid())
1678 ObjCImpDecl, HasTemplateArgs, TemplateKWLoc);
1681 S.
Diag(OpLoc, diag::err_typecheck_member_reference_struct_union)
1682 << BaseType << BaseExpr.get()->getSourceRange() << MemberLoc;
1703 Decl *ObjCImpDecl) {
1708 if (getLangOpts().MicrosoftExt &&
1711 diag::ext_ms_explicit_constructor_call);
1718 DecomposeUnqualifiedId(Id, TemplateArgsBuffer,
1719 NameInfo, TemplateArgs);
1722 bool IsArrow = (OpKind == tok::arrow);
1725 = (!SS.
isSet() ? nullptr : FindFirstQualifierInScope(S, SS.
getScopeRep()));
1728 ExprResult Result = MaybeConvertParenListExprToParenExpr(S, Base);
1730 Base = Result.
get();
1733 isDependentScopeSpecifier(SS)) {
1734 return ActOnDependentMemberExpr(Base, Base->
getType(), IsArrow, OpLoc, SS,
1735 TemplateKWLoc, FirstQualifierInScope,
1736 NameInfo, TemplateArgs);
1741 Base, Base->
getType(), OpLoc, IsArrow, SS, TemplateKWLoc,
1742 FirstQualifierInScope, NameInfo, TemplateArgs, S, &ExtraArgs);
1745 CheckMemberAccessOfNoDeref(cast<MemberExpr>(Res.
get()));
1750 void Sema::CheckMemberAccessOfNoDeref(
const MemberExpr *E) {
1755 if (isa<ArrayType>(ResultTy))
1759 if (
const auto *Ptr = dyn_cast<PointerType>(
1761 if (Ptr->getPointeeType()->hasAttr(attr::NoDeref))
1762 ExprEvalContexts.back().PossibleDerefs.insert(E);
1810 Qualifiers Combined = BaseQuals + MemberQuals;
1811 if (Combined != MemberQuals)
1816 if (!(CurMethod && CurMethod->isDefaulted()))
1817 UnusedPrivateFields.remove(Field);
1826 if (getLangOpts().OpenMP && IsArrow &&
1827 !CurContext->isDependentContext() &&
1828 isa<CXXThisExpr>(Base.
get()->IgnoreParenImpCasts())) {
1829 if (
auto *PrivateCopy = isOpenMPCapturedDecl(Field)) {
1830 return getOpenMPCapturedExpr(PrivateCopy, VK, OK,
1831 MemberNameInfo.
getLoc());
1835 return BuildMemberExpr(Base.
get(), IsArrow, OpLoc, &SS,
1837 false, MemberNameInfo,
1838 MemberType, VK, OK);
1850 bool IsKnownInstance,
const Scope *S) {
1858 QualType ThisTy = getCurrentThisType();
1859 assert(!ThisTy.
isNull() &&
"didn't correctly pre-flight capture of 'this'");
1861 Expr *baseExpr =
nullptr;
1862 if (IsKnownInstance) {
1866 baseExpr = BuildCXXThisExpr(loc, ThisTy,
true);
1869 return BuildMemberReferenceExpr(baseExpr, ThisTy,
1874 R, TemplateArgs, S);
ObjCPropertyRefExpr - A dot-syntax expression to access an ObjC property.
SourceLocation getLoc() const
getLoc - Returns the main location of the declaration name.
const internal::VariadicAllOfMatcher< Type > type
Matches Types in the clang AST.
This is the scope of a C++ try statement.
static const Decl * getCanonicalDecl(const Decl *D)
static DiagnosticBuilder Diag(DiagnosticsEngine *Diags, const LangOptions &Features, FullSourceLoc TokLoc, const char *TokBegin, const char *TokRangeBegin, const char *TokRangeEnd, unsigned DiagID)
Produce a diagnostic highlighting some portion of a literal.
ExtVectorDeclsType ExtVectorDecls
ExtVectorDecls - This is a list all the extended vector types.
ExternalSemaSource * getExternalSource() const
Smart pointer class that efficiently represents Objective-C method names.
SelectorTable & getSelectorTable()
PointerType - C99 6.7.5.1 - Pointer Declarators.
QualType getPointeeType() const
A (possibly-)qualified type.
Simple class containing the result of Sema::CorrectTypo.
ObjCInterfaceDecl * getClassInterface()
bool IvarBacksCurrentMethodAccessor(ObjCInterfaceDecl *IFace, ObjCMethodDecl *Method, ObjCIvarDecl *IV)
IvarBacksCurrentMethodAccessor - This routine returns 'true' if 'IV' is an ivar synthesized for 'Meth...
The reference may be to an instance member, but it might be invalid if so, because the context is not...
SourceRange getSourceRange() const LLVM_READONLY
Return the source range that covers this unqualified-id.
DeclContext * getFunctionLevelDeclContext()
static void diagnoseInstanceReference(Sema &SemaRef, const CXXScopeSpec &SS, NamedDecl *Rep, const DeclarationNameInfo &nameInfo)
Diagnose a reference to a field with no object available.
QualType getDesugaredType(const ASTContext &Context) const
Return the specified type with any "sugar" removed from the type.
VarDecl * getVarDecl() const
void setLookupName(DeclarationName Name)
Sets the name to look up.
QualType CXXThisTypeOverride
When non-NULL, the C++ 'this' expression is allowed despite the current context not being a non-stati...
QualType getPointeeType() const
If this is a pointer, ObjC object pointer, or block pointer, this returns the respective pointee...
An instance of this object exists for each enum constant that is defined.
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)
bool isRecordType() const
bool isEmpty() const
No scope specifier.
QualType getQualifiedType(SplitQualType split) const
Un-split a SplitQualType.
SemaDiagnosticBuilder Diag(SourceLocation Loc, unsigned DiagID)
Emit a diagnostic.
Decl - This represents one declaration (or definition), e.g.
bool isExtVectorType() const
bool LookupTemplateName(LookupResult &R, Scope *S, CXXScopeSpec &SS, QualType ObjectType, bool EnteringContext, bool &MemberOfUnknownSpecialization, SourceLocation TemplateKWLoc=SourceLocation(), AssumedTemplateKind *ATK=nullptr)
Defines the C++ template declaration subclasses.
VarDecl * getVarTemplateSpecialization(VarTemplateDecl *VarTempl, const TemplateArgumentListInfo *TemplateArgs, const DeclarationNameInfo &MemberNameInfo, SourceLocation TemplateKWLoc)
The reference is definitely an implicit instance member access.
SourceLocation getBeginLoc() const
getBeginLoc - Retrieve the location of the first token.
Declaration of a variable template.
RedeclarationKind
Specifies whether (or how) name lookup is being performed for a redeclaration (vs.
static bool IsInFnTryBlockHandler(const Scope *S)
Determine if the given scope is within a function-try-block handler.
LLVM_ATTRIBUTE_REINITIALIZES void clear()
Clears out any current state.
const DeclAccessPair & getPair() const
This file provides some common utility functions for processing Lambda related AST Constructs...
Represents a variable declaration or definition.
PartialDiagnostic PDiag(unsigned DiagID=0)
Build a partial diagnostic.
DeclarationName getLookupName() const
Gets the name to look up.
ObjCIsaExpr - Represent X->isa and X.isa when X is an ObjC 'id' type.
DiagnosticsEngine & Diags
const T * getAs() const
Member-template getAs<specific type>'.
DeclContext * computeDeclContext(QualType T)
Compute the DeclContext that is associated with the given type.
ObjCMethodDecl - Represents an instance or class method declaration.
NamedDecl * getUnderlyingDecl()
Looks through UsingDecls and ObjCCompatibleAliasDecls for the underlying named decl.
bool isInvalidDecl() const
QualType getObjCClassType() const
Represents the Objective-C Class type.
void setBegin(SourceLocation b)
protocol_range protocols() const
Defines the clang::Expr interface and subclasses for C++ expressions.
iterator begin(Source *source, bool LocalOnly=false)
The collection of all-type qualifiers we support.
Qualifiers getQualifiers() const
Retrieve all qualifiers.
Represents a struct/union/class.
DeclarationName getDeclName() const
Get the actual, stored name of the declaration, which may be a special name.
bool Encloses(const DeclContext *DC) const
Determine whether this declaration context encloses the declaration context DC.
One of these records is kept for each identifier that is lexed.
bool isStr(const char(&Str)[StrLen]) const
Return true if this is the identifier for the specified string.
Represents a class type in Objective C.
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.
bool CheckQualifiedMemberReference(Expr *BaseExpr, QualType BaseType, const CXXScopeSpec &SS, const LookupResult &R)
ObjCMethodFamily
A family of Objective-C methods.
Base class for callback objects used by Sema::CorrectTypo to check the validity of a potential typo c...
Represents a member of a struct/union/class.
The current expression is potentially evaluated at run time, which means that code may be generated t...
The reference may be to an unresolved using declaration and the context is not an instance method...
const DeclarationNameInfo & getLookupNameInfo() const
Gets the name info to look up.
The iterator over UnresolvedSets.
static bool ShouldTryAgainWithRedefinitionType(Sema &S, ExprResult &base)
Given that normal member access failed on the given expression, and given that the expression's type ...
bool isSpecificBuiltinType(unsigned K) const
Test for a particular builtin type.
bool Equals(const DeclContext *DC) const
Determine whether this declaration context is equivalent to the declaration context DC...
Represents a C++ member access expression for which lookup produced a set of overloaded functions...
static int getPointAccessorIdx(char c)
bool isObjCSelType() const
ExtVectorElementExpr - This represents access to specific elements of a vector, and may occur on the ...
ExprResult DefaultFunctionArrayConversion(Expr *E, bool Diagnose=true)
DefaultFunctionArrayConversion (C99 6.3.2.1p3, C99 6.3.2.1p4).
An r-value expression (a pr-value in the C++11 taxonomy) produces a temporary value.
bool isDependentName() const
Determines whether the name itself is dependent, e.g., because it involves a C++ type that is itself ...
static Selector constructSetterSelector(IdentifierTable &Idents, SelectorTable &SelTable, const IdentifierInfo *Name)
Return the default setter selector for the given identifier.
Represents a C++ unqualified-id that has been parsed.
bool isBitField() const
Determines whether this field is a bitfield.
Selector getNullarySelector(IdentifierInfo *ID)
void resolveKind()
Resolves the result kind of the lookup, possibly hiding decls.
Represents the results of name lookup.
static DeclAccessPair make(NamedDecl *D, AccessSpecifier AS)
ObjCMethodDecl * getCurMethodDecl()
getCurMethodDecl - If inside of a method body, this returns a pointer to the method decl for the meth...
A convenient class for passing around template argument information.
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...
bool hasAddressSpace() const
ExprValueKind getValueKind() const
getValueKind - The value kind that this expression produces.
ExprResult BuildAnonymousStructUnionMemberReference(const CXXScopeSpec &SS, SourceLocation nameLoc, IndirectFieldDecl *indirectField, DeclAccessPair FoundDecl=DeclAccessPair::make(nullptr, AS_none), Expr *baseObjectExpr=nullptr, SourceLocation opLoc=SourceLocation())
static bool isRecordType(QualType T)
TemplateSpecializationKind getTemplateSpecializationKind() const
If this variable is an instantiation of a variable template or a static data member of a class templa...
The reference is a contextually-permitted abstract member reference.
CanQualType PseudoObjectTy
QualType getObjCClassRedefinitionType() const
Retrieve the type that Class has been defined to, which may be different from the built-in Class if C...
Expr * IgnoreParenCasts() LLVM_READONLY
Skip past any parentheses and casts which might surround this expression until reaching a fixed point...
Scope - A scope is a transient data structure that is used while parsing the program.
CXXRecordDecl * getCanonicalDecl() override
Retrieves the "canonical" declaration of the given declaration.
bool declaresSameEntity(const Decl *D1, const Decl *D2)
Determine whether two declarations declare the same entity.
TypoExpr - Internal placeholder for expressions where typo correction still needs to be performed and...
ObjCMethodDecl * lookupClassMethod(Selector Sel) const
Lookup a class method for a given selector.
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.
The current expression occurs within a discarded statement.
Represents an Objective-C protocol declaration.
const LangOptions & getLangOpts() const
The reference may be an implicit instance member access.
An ordinary object is located at an address in memory.
bool isUnevaluatedContext() const
Determines whether we are currently in a context that is not evaluated as per C++ [expr] p5...
Represents an ObjC class declaration.
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)
void addDecl(NamedDecl *D)
Add a declaration to these results with its natural access.
Member name lookup, which finds the names of class/struct/union members.
ObjCInterfaceDecl * getInterface() const
Gets the interface declaration for this object type, if the base type really is an interface...
The current context is "potentially evaluated" in C++11 terms, but the expression is evaluated at com...
NestedNameSpecifierLoc getWithLocInContext(ASTContext &Context) const
Retrieve a nested-name-specifier with location information, copied into the given AST context...
unsigned getLength() const
Efficiently return the length of this identifier info.
Sema::RedeclarationKind redeclarationKind() const
Expr * IgnoreImpCasts() LLVM_READONLY
Skip past any implicit casts which might surround this expression until reaching a fixed point...
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)
llvm::SmallPtrSet< const CXXRecordDecl *, 4 > BaseSet
RAII class used to determine whether SFINAE has trapped any errors that occur during template argumen...
unsigned getFlags() const
getFlags - Return the flags for this scope.
Sema - This implements semantic analysis and AST building for C.
All possible referrents are instance members and the current context is not an instance method...
Represents a prototype with parameter type info, e.g.
void recordUseOfWeak(const ExprT *E, bool IsRead=true)
Record that a weak object was accessed.
SourceRange getRange() const
QualType getUsageType(QualType objectType) const
Retrieve the type of this instance variable when viewed as a member of a specific object type...
An Objective-C property is a logical field of an Objective-C object which is read and written via Obj...
static bool LookupMemberExprInRecord(Sema &SemaRef, LookupResult &R, Expr *BaseExpr, const RecordType *RTy, SourceLocation OpLoc, bool IsArrow, CXXScopeSpec &SS, bool HasTemplateArgs, SourceLocation TemplateKWLoc, TypoExpr *&TE)
The current expression is potentially evaluated, but any declarations referenced inside that expressi...
Represent the declaration of a variable (in which case it is an lvalue) a function (in which case it ...
TypoExpr * CorrectTypoDelayed(const DeclarationNameInfo &Typo, Sema::LookupNameKind LookupKind, Scope *S, CXXScopeSpec *SS, 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...
This represents one expression.
LookupNameKind
Describes the kind of name lookup to perform.
ExprValueKind
The categorization of expression values, currently following the C++11 scheme.
static bool IsRGBA(char c)
Determine whether input char is from rgba component set.
const T * castAs() const
Member-template castAs<specific type>.
std::string getAsString() const
Retrieve the human-readable string for this name.
Defines the clang::Preprocessor interface.
All possible referrents are instance members of an unrelated class.
DeclContext * getDeclContext()
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 C++ template name within the type system.
bool RequireCompleteType(SourceLocation Loc, QualType T, TypeDiagnoser &Diagnoser)
Ensure that the type T is a complete type.
UnqualifiedIdKind getKind() const
Determine what kind of name we have.
The current expression and its subexpressions occur within an unevaluated operand (C++11 [expr]p7)...
ObjCIvarDecl * lookupInstanceVariable(IdentifierInfo *IVarName, ObjCInterfaceDecl *&ClassDeclared)
bool isSingleResult() const
Determines if this names a single result which is not an unresolved value using decl.
DeclContext * getParent()
getParent - Returns the containing DeclContext.
SourceLocation getEnd() const
UnaryOperator - This represents the unary-expression's (except sizeof and alignof), the postinc/postdec operators from postfix-expression, and various extensions.
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 ...
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.
A member reference to an MSPropertyDecl.
This template specialization was implicitly instantiated from a template.
bool isNull() const
Return true if this QualType doesn't point to a type yet.
bool isProvablyNotDerivedFrom(const CXXRecordDecl *Base) const
Determine whether this class is provably not derived from the type Base.
ExprObjectKind getObjectKind() const
getObjectKind - The object kind that this expression produces.
bool isUnresolvableResult() const
RecordDecl * getDecl() const
NestedNameSpecifier * getScopeRep() const
Retrieve the representation of the nested-name-specifier.
chain_iterator chain_end() const
QualType getObjCIdRedefinitionType() const
Retrieve the type that id has been defined to, which may be different from the built-in id if id has ...
static bool isPointerToRecordType(QualType T)
ArrayRef< NamedDecl * >::const_iterator chain_iterator
ActionResult - This structure is used while parsing/acting on expressions, stmts, etc...
PseudoObjectExpr - An expression which accesses a pseudo-object l-value.
static ExprResult BuildMSPropertyRefExpr(Sema &S, Expr *BaseExpr, bool IsArrow, const CXXScopeSpec &SS, MSPropertyDecl *PD, const DeclarationNameInfo &NameInfo)
bool isAccessorWithinNumElements(char c, bool isNumericAccessor) const
Encodes a location in the source.
QualType getObjCSelRedefinitionType() const
Retrieve the type that 'SEL' has been defined to, which may be different from the built-in 'SEL' if '...
MemberExpr * BuildMemberExpr(Expr *Base, bool IsArrow, SourceLocation OpLoc, const CXXScopeSpec *SS, SourceLocation TemplateKWLoc, ValueDecl *Member, DeclAccessPair FoundDecl, bool HadMultipleCandidates, const DeclarationNameInfo &MemberNameInfo, QualType Ty, ExprValueKind VK, ExprObjectKind OK, const TemplateArgumentListInfo *TemplateArgs=nullptr)
DeclarationName getName() const
getName - Returns the embedded declaration name.
QualType getElementType() const
IdentifierTable & getIdentifierTable()
bool isOverloadedResult() const
Determines if the results are overloaded.
ExprObjectKind
A further classification of the kind of object referenced by an l-value or x-value.
Represents a static or instance method of a struct/union/class.
QualType getExtVectorType(QualType VectorType, unsigned NumElts) const
Return the unique reference to an extended vector type of the specified element type and size...
ExprResult DefaultLvalueConversion(Expr *E)
The reference may be to an unresolved using declaration.
const char * getNameStart() const
Return the beginning of the actual null-terminated string for this identifier.
TokenKind
Provides a simple uniform namespace for tokens from all C languages.
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...
bool forallBases(ForallBasesCallback BaseMatches, bool AllowShortCircuit=true) const
Determines if the given callback holds for all the direct or indirect base classes of this type...
Represents one property declaration in an Objective-C interface.
bool DiagnoseUseOfDecl(NamedDecl *D, ArrayRef< SourceLocation > Locs, const ObjCInterfaceDecl *UnknownObjCClass=nullptr, bool ObjCPropertyAccess=false, bool AvoidPartialAvailabilityChecks=false, ObjCInterfaceDecl *ClassReciever=nullptr)
Determine whether the use of this declaration is valid, and emit any corresponding diagnostics...
static Decl * FindGetterSetterNameDecl(const ObjCObjectPointerType *QIdTy, IdentifierInfo *Member, const Selector &Sel, ASTContext &Context)
bool isSuperClassOf(const ObjCInterfaceDecl *I) const
isSuperClassOf - Return true if this class is the specified class or is a super class of the specifie...
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...
bool RequireCompleteDeclContext(CXXScopeSpec &SS, DeclContext *DC)
Require that the context specified by SS be complete.
bool isInvalid() const
An error occurred during parsing of the scope specifier.
bool hasSameUnqualifiedType(QualType T1, QualType T2) const
Determine whether the given types are equivalent after cvr-qualifiers have been removed.
Sema & getSema() const
Get the Sema object that this lookup result is searching with.
A POD class for pairing a NamedDecl* with an access specifier.
void setTemplateSpecializationKind(TemplateSpecializationKind TSK, SourceLocation PointOfInstantiation=SourceLocation())
For a static data member that was instantiated from a static data member of a class template...
void diagnoseTypo(const TypoCorrection &Correction, const PartialDiagnostic &TypoDiag, bool ErrorRecovery=true)
QualType getTypedefType(const TypedefNameDecl *Decl, QualType Canon=QualType()) const
Return the unique reference to the type for the specified typedef-name decl.
Dataflow Directional Tag Classes.
bool isValid() const
Return true if this is a valid SourceLocation object.
ObjCMethodDecl * lookupPrivateMethod(const Selector &Sel, bool Instance=true) const
Lookup a method in the classes implementation hierarchy.
ObjCPropertyDecl * FindPropertyDeclaration(const IdentifierInfo *PropertyId, ObjCPropertyQueryKind QueryKind) const
FindPropertyDeclaration - Finds declaration of the property given its name in 'PropertyId' and return...
DeclContext - This is used only as base class of specific decl types that can act as declaration cont...
const Scope * getParent() const
getParent - Return the scope that this is nested in.
ExprResult ImpCastExprToType(Expr *E, QualType Type, CastKind CK, ExprValueKind VK=VK_RValue, const CXXCastPath *BasePath=nullptr, CheckedConversionKind CCK=CCK_ImplicitConversion)
ImpCastExprToType - If Expr is not of type 'Type', insert an implicit cast.
The current expression occurs within an unevaluated operand that unconditionally permits abstract ref...
Represents a field injected from an anonymous union/struct into the parent scope. ...
static FixItHint CreateRemoval(CharSourceRange RemoveRange)
Create a code modification hint that removes the given source range.
AccessSpecifier getAccess() const
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.
NamedDecl * getCorrectionDecl() const
Gets the pointer to the declaration of the typo correction.
The name of a declaration.
NamedDecl * getFoundDecl() const
Fetch the unique decl found by this lookup.
const CXXRecordDecl * getParent() const
Return the parent of this method declaration, which is the class in which this method is defined...
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.
const ObjCObjectType * getObjectType() const
Gets the type pointed to by this ObjC pointer.
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 .
DeclarationNameInfo - A collector data type for bundling together a DeclarationName and the correspnd...
Expr * IgnoreParenImpCasts() LLVM_READONLY
Skip past any parentheses and implicit casts which might surround this expression until reaching a fi...
ExprResult BuildImplicitMemberExpr(const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, LookupResult &R, const TemplateArgumentListInfo *TemplateArgs, bool IsDefiniteInstance, const Scope *S)
Builds an implicit member access expression.
Represents a pointer to an Objective C object.
ObjCImplementationDecl - Represents a class definition - this is where method definitions are specifi...
void setHadMultipleCandidates(bool V=true)
Sets the flag telling whether this expression refers to a method that was resolved from an overloaded...
A helper class that allows the use of isa/cast/dyncast to detect TagType objects of structs/unions/cl...
This is the scope for a function-level C++ try or catch scope.
SourceRange getSourceRange() const LLVM_READONLY
getSourceRange - The range of the declaration name.
chain_iterator chain_begin() const
FunctionDecl * getCurFunctionDecl()
getCurFunctionDecl - If inside of a function body, this returns a pointer to the function decl for th...
bool isFunctionType() const
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...
ExtVectorType - Extended vector type.
Base for LValueReferenceType and RValueReferenceType.
CanQualType BoundMemberTy
Simple template class for restricting typo correction candidates to ones having a single Decl* of the...
SmallVector< ExpressionEvaluationContextRecord, 8 > ExprEvalContexts
A stack of expression evaluation contexts.
ExprResult BuildFieldReferenceExpr(Expr *BaseExpr, bool IsArrow, SourceLocation OpLoc, const CXXScopeSpec &SS, FieldDecl *Field, DeclAccessPair FoundDecl, const DeclarationNameInfo &MemberNameInfo)
Sema::LookupNameKind getLookupKind() const
Gets the kind of lookup to perform.
A bitfield object is a bitfield on a C or C++ record.
ObjCIvarRefExpr - A reference to an ObjC instance variable.
bool LookupQualifiedName(LookupResult &R, DeclContext *LookupCtx, bool InUnqualifiedLookup=false)
Perform qualified name lookup into a given context.
CanQualType getCanonicalType(QualType T) const
Return the canonical (structural) type corresponding to the specified potentially non-canonical type ...
bool isSet() const
Deprecated.
The reference may be to an instance member, but it is invalid if so, because the context is from an u...
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.
Defines the C++ Decl subclasses, other than those for templates (found in DeclTemplate.h) and friends (in DeclFriend.h).
MemberExpr - [C99 6.5.2.3] Structure and Union Members.
ActionResult< Expr * > ExprResult
bool isMutable() const
Determines whether this field is mutable (C++ only).
Represents a C++ struct/union/class.
sema::FunctionScopeInfo * getCurFunction() const
Qualifiers getQualifiers() const
Retrieve the set of qualifiers applied to this type.
ObjCIvarDecl - Represents an ObjC instance variable.
static bool IsValidOpenCLComponentSwizzleLength(unsigned len)
static FixItHint CreateReplacement(CharSourceRange RemoveRange, StringRef Code)
Create a code modification hint that replaces the given source range with the given code string...
SourceRange getSourceRange() const LLVM_READONLY
SourceLocation tokens are not useful in isolation - they are low level value objects created/interpre...
unsigned getNumElements() const
bool isDependentType() const
Whether this type is a dependent type, meaning that its definition somehow depends on a template para...
A reference to a declared variable, function, enum, etc.
const Scope * getFnParent() const
getFnParent - Return the closest scope that is a function body.
bool isIgnored(unsigned DiagID, SourceLocation Loc) const
Determine whether the diagnostic is known to be ignored.
bool isPointerType() const
void setBaseObjectType(QualType T)
Sets the base object type for this lookup.
The reference is definitely not an instance member access.
void suppressDiagnostics()
Suppress the diagnostics that would normally fire because of this lookup.
An instance of this class represents the declaration of a property member.
An l-value expression is a reference to an object with independent storage.
bool empty() const
Return true if no decls were found.
static Decl * FindGetterSetterNameDeclFromProtocolList(const ObjCProtocolDecl *PDecl, IdentifierInfo *Member, const Selector &Sel, ASTContext &Context)
bool isUnresolvedExceptionSpec(ExceptionSpecificationType ESpecType)
static int getNumericAccessorIdx(char c)
A trivial tuple used to represent a source range.
This represents a decl that may have a name.
ObjCMethodDecl * getInstanceMethod(Selector Sel, bool AllowHidden=false) const
AccessControl getAccessControl() const
SourceLocation getNameLoc() const
Gets the location of the identifier.
static QualType CheckExtVectorComponent(Sema &S, QualType baseType, ExprValueKind &VK, SourceLocation OpLoc, const IdentifierInfo *CompName, SourceLocation CompLoc)
Check an ext-vector component access expression.
NamedDecl * getRepresentativeDecl() const
Fetches a representative decl. Useful for lazy diagnostics.
SourceLocation getBegin() const
ObjCCategoryImplDecl - An object of this class encapsulates a category @implementation declaration...
The current expression occurs within a braced-init-list within an unevaluated operand.
SourceLocation getLocation() const
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...
bool isCXXInstanceMember() const
Determine whether the given declaration is an instance member of a C++ class.
bool hasErrorOccurred() const
Determine whether any SFINAE errors have been trapped.
Qualifiers::ObjCLifetime getObjCLifetime() const
Returns lifetime attribute of this type.
bool isTransparentContext() const
isTransparentContext - Determines whether this context is a "transparent" context, meaning that the members declared in this context are semantically declared in the nearest enclosing non-transparent (opaque) context but are lexically declared in this context.