25 #include "llvm/Support/MemoryBuffer.h"
134 unsigned NumFromArgs,
137 bool Complain =
true);
139 bool Complain =
true);
285 template<
typename IIter,
typename OIter>
289 std::transform(Ibegin, Iend, Obegin,
290 [&ImporterRef](ItemT From) -> ItemT {
291 return ImporterRef.
Import(From);
295 template<
typename IIter,
typename OIter>
300 std::transform(Ibegin, Iend, Obegin,
301 [&ImporterRef, &Failed](ItemT *From) -> ItemT * {
302 ItemT *To = cast_or_null<ItemT>(
303 ImporterRef.
Import(From));
311 template<
typename InContainerTy,
typename OutContainerTy>
313 OutContainerTy &OutContainer) {
315 OutContainer.begin());
318 template<
typename InContainerTy,
typename OIter>
332 using namespace clang;
342 if(UnderlyingType.
isNull())
350 #define IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix) \
351 case BuiltinType::Id: \
352 return Importer.getToContext().SingletonId;
353 #include "clang/Basic/OpenCLImageTypes.def"
354 #define SHARED_SINGLETON_TYPE(Expansion)
355 #define BUILTIN_TYPE(Id, SingletonId) \
356 case BuiltinType::Id: return Importer.getToContext().SingletonId;
357 #include "clang/AST/BuiltinTypes.def"
365 case BuiltinType::Char_U:
374 case BuiltinType::Char_S:
383 case BuiltinType::WChar_S:
384 case BuiltinType::WChar_U:
390 llvm_unreachable(
"Invalid BuiltinType Kind!");
403 if (ToElementType.
isNull())
411 if (ToPointeeType.
isNull())
420 if (ToPointeeType.
isNull())
430 if (ToPointeeType.
isNull())
440 if (ToPointeeType.
isNull())
449 if (ToPointeeType.
isNull())
459 if (ToElementType.
isNull())
471 if (ToElementType.
isNull())
481 if (ToElementType.
isNull())
497 if (ToElementType.
isNull())
507 if (ToElementType.
isNull())
519 if (ToResultType.
isNull())
528 if (ToResultType.
isNull())
537 ArgTypes.push_back(ArgType);
544 if (ExceptionType.
isNull())
546 ExceptionTypes.push_back(ExceptionType);
579 = dyn_cast_or_null<TypedefNameDecl>(Importer.
Import(T->
getDecl()));
596 if (ToUnderlyingType.
isNull())
609 if (UnderlyingType.
isNull())
630 if (!FromDeduced.
isNull()) {
631 ToDeduced = Importer.
Import(FromDeduced);
664 = dyn_cast_or_null<RecordDecl>(Importer.
Import(T->
getDecl()));
686 if (!FromModifiedType.
isNull()) {
687 ToModifiedType = Importer.
Import(FromModifiedType);
688 if (ToModifiedType.
isNull())
691 if (!FromEquivalentType.
isNull()) {
692 ToEquivalentType = Importer.
Import(FromEquivalentType);
693 if (ToEquivalentType.
isNull())
698 ToModifiedType, ToEquivalentType);
705 cast_or_null<TemplateTypeParmDecl>(Importer.
Import(T->
getDecl()));
716 cast_or_null<TemplateTypeParmType>(Importer.
Import(
727 Replaced, Replacement);
741 if (!
QualType(T, 0).isCanonical()) {
744 ToCanonType =Importer.
Import(FromCanonType);
767 ToQualifier, ToNamedType);
772 = dyn_cast_or_null<ObjCInterfaceDecl>(Importer.
Import(T->
getDecl()));
787 if (ImportedTypeArg.
isNull())
790 TypeArgs.push_back(ImportedTypeArg);
794 for (
auto *
P : T->
quals()) {
796 = dyn_cast_or_null<ObjCProtocolDecl>(Importer.
Import(
P));
799 Protocols.push_back(Protocol);
810 if (ToPointeeType.
isNull())
852 ToD = Importer.
Import(FromD);
857 if (
RecordDecl *FromRecord = dyn_cast<RecordDecl>(FromD)) {
858 if (
RecordDecl *ToRecord = cast_or_null<RecordDecl>(ToD)) {
859 if (FromRecord->getDefinition() && FromRecord->isCompleteDefinition() && !ToRecord->getDefinition()) {
866 if (
EnumDecl *FromEnum = dyn_cast<EnumDecl>(FromD)) {
867 if (
EnumDecl *ToEnum = cast_or_null<EnumDecl>(ToD)) {
868 if (FromEnum->getDefinition() && !ToEnum->getDefinition()) {
908 llvm_unreachable(
"Unknown name kind.");
917 for (
auto *From : FromDC->
decls())
936 struct CXXRecordDecl::DefinitionData &ToData = ToCXX->data();
937 struct CXXRecordDecl::DefinitionData &FromData = FromCXX->data();
938 ToData.UserDeclaredConstructor = FromData.UserDeclaredConstructor;
939 ToData.UserDeclaredSpecialMembers = FromData.UserDeclaredSpecialMembers;
940 ToData.Aggregate = FromData.Aggregate;
941 ToData.PlainOldData = FromData.PlainOldData;
942 ToData.Empty = FromData.Empty;
943 ToData.Polymorphic = FromData.Polymorphic;
944 ToData.Abstract = FromData.Abstract;
945 ToData.IsStandardLayout = FromData.IsStandardLayout;
946 ToData.HasNoNonEmptyBases = FromData.HasNoNonEmptyBases;
947 ToData.HasPrivateFields = FromData.HasPrivateFields;
948 ToData.HasProtectedFields = FromData.HasProtectedFields;
949 ToData.HasPublicFields = FromData.HasPublicFields;
950 ToData.HasMutableFields = FromData.HasMutableFields;
951 ToData.HasVariantMembers = FromData.HasVariantMembers;
952 ToData.HasOnlyCMembers = FromData.HasOnlyCMembers;
953 ToData.HasInClassInitializer = FromData.HasInClassInitializer;
954 ToData.HasUninitializedReferenceMember
955 = FromData.HasUninitializedReferenceMember;
956 ToData.HasUninitializedFields = FromData.HasUninitializedFields;
957 ToData.HasInheritedConstructor = FromData.HasInheritedConstructor;
958 ToData.HasInheritedAssignment = FromData.HasInheritedAssignment;
959 ToData.NeedOverloadResolutionForCopyConstructor
960 = FromData.NeedOverloadResolutionForCopyConstructor;
961 ToData.NeedOverloadResolutionForMoveConstructor
962 = FromData.NeedOverloadResolutionForMoveConstructor;
963 ToData.NeedOverloadResolutionForMoveAssignment
964 = FromData.NeedOverloadResolutionForMoveAssignment;
965 ToData.NeedOverloadResolutionForDestructor
966 = FromData.NeedOverloadResolutionForDestructor;
967 ToData.DefaultedCopyConstructorIsDeleted
968 = FromData.DefaultedCopyConstructorIsDeleted;
969 ToData.DefaultedMoveConstructorIsDeleted
970 = FromData.DefaultedMoveConstructorIsDeleted;
971 ToData.DefaultedMoveAssignmentIsDeleted
972 = FromData.DefaultedMoveAssignmentIsDeleted;
973 ToData.DefaultedDestructorIsDeleted = FromData.DefaultedDestructorIsDeleted;
974 ToData.HasTrivialSpecialMembers = FromData.HasTrivialSpecialMembers;
975 ToData.HasIrrelevantDestructor = FromData.HasIrrelevantDestructor;
976 ToData.HasConstexprNonCopyMoveConstructor
977 = FromData.HasConstexprNonCopyMoveConstructor;
978 ToData.HasDefaultedDefaultConstructor
979 = FromData.HasDefaultedDefaultConstructor;
980 ToData.CanPassInRegisters = FromData.CanPassInRegisters;
981 ToData.DefaultedDefaultConstructorIsConstexpr
982 = FromData.DefaultedDefaultConstructorIsConstexpr;
983 ToData.HasConstexprDefaultConstructor
984 = FromData.HasConstexprDefaultConstructor;
985 ToData.HasNonLiteralTypeFieldsOrBases
986 = FromData.HasNonLiteralTypeFieldsOrBases;
988 ToData.UserProvidedDefaultConstructor
989 = FromData.UserProvidedDefaultConstructor;
990 ToData.DeclaredSpecialMembers = FromData.DeclaredSpecialMembers;
991 ToData.ImplicitCopyConstructorCanHaveConstParamForVBase
992 = FromData.ImplicitCopyConstructorCanHaveConstParamForVBase;
993 ToData.ImplicitCopyConstructorCanHaveConstParamForNonVBase
994 = FromData.ImplicitCopyConstructorCanHaveConstParamForNonVBase;
995 ToData.ImplicitCopyAssignmentHasConstParam
996 = FromData.ImplicitCopyAssignmentHasConstParam;
997 ToData.HasDeclaredCopyConstructorWithConstParam
998 = FromData.HasDeclaredCopyConstructorWithConstParam;
999 ToData.HasDeclaredCopyAssignmentWithConstParam
1000 = FromData.HasDeclaredCopyAssignmentWithConstParam;
1001 ToData.IsLambda = FromData.IsLambda;
1004 for (
const auto &Base1 : FromCXX->
bases()) {
1010 if (Base1.isPackExpansion())
1011 EllipsisLoc = Importer.
Import(Base1.getEllipsisLoc());
1020 Base1.isBaseOfClass(),
1021 Base1.getAccessSpecifierAsWritten(),
1022 Importer.
Import(Base1.getTypeSourceInfo()),
1026 ToCXX->setBases(Bases.data(), Bases.size());
1066 if (ToPromotionType.
isNull())
1086 Expr *ToRequiresClause;
1088 ToRequiresClause = Importer.
Import(R);
1089 if (!ToRequiresClause)
1092 ToRequiresClause =
nullptr;
1126 if (!To || ToType.
isNull())
1167 llvm::makeArrayRef(ToPack).copy(Importer.
getToContext()));
1171 llvm_unreachable(
"Invalid template argument kind");
1192 Importer.
Import(FromInfo.getTemplateQualifierLoc()),
1193 Importer.
Import(FromInfo.getTemplateNameLoc()),
1194 Importer.
Import(FromInfo.getTemplateEllipsisLoc()));
1200 unsigned NumFromArgs,
1202 for (
unsigned I = 0;
I != NumFromArgs; ++
I) {
1207 ToArgs.push_back(To);
1221 ToRecord = ToOriginRecord;
1249 const llvm::APSInt &FromVal = FromEC->
getInitVal();
1250 const llvm::APSInt &ToVal = ToEC->
getInitVal();
1252 return FromVal.isSigned() == ToVal.isSigned() &&
1253 FromVal.getBitWidth() == ToVal.getBitWidth() &&
1302 if (!accessSpecDecl)
1329 if (!ToMsg && FromMsg)
1361 MergeWithNamespace = cast<NamespaceDecl>(DC)->getAnonymousNamespace();
1366 for (
unsigned I = 0, N = FoundDecls.size();
I != N; ++
I) {
1370 if (
NamespaceDecl *FoundNS = dyn_cast<NamespaceDecl>(FoundDecls[
I])) {
1371 MergeWithNamespace = FoundNS;
1372 ConflictingDecls.clear();
1376 ConflictingDecls.push_back(FoundDecls[I]);
1379 if (!ConflictingDecls.empty()) {
1381 ConflictingDecls.data(),
1382 ConflictingDecls.size());
1401 TU->setAnonymousNamespace(ToNamespace);
1403 cast<NamespaceDecl>(DC)->setAnonymousNamespace(ToNamespace);
1432 for (
unsigned I = 0, N = FoundDecls.size();
I != N; ++
I) {
1433 if (!FoundDecls[
I]->isInIdentifierNamespace(IDNS))
1436 dyn_cast<TypedefNameDecl>(FoundDecls[
I])) {
1438 FoundTypedef->getUnderlyingType()))
1439 return Importer.
Imported(D, FoundTypedef);
1442 ConflictingDecls.push_back(FoundDecls[I]);
1445 if (!ConflictingDecls.empty()) {
1447 ConflictingDecls.data(),
1448 ConflictingDecls.size());
1475 ToTypedef->setLexicalDeclContext(LexicalDC);
1517 ToLabel->setStmt(Label);
1518 ToLabel->setLexicalDeclContext(LexicalDC);
1548 for (
unsigned I = 0, N = FoundDecls.size();
I != N; ++
I) {
1549 if (!FoundDecls[
I]->isInIdentifierNamespace(IDNS))
1552 Decl *Found = FoundDecls[
I];
1555 Found = Tag->getDecl();
1558 if (
EnumDecl *FoundEnum = dyn_cast<EnumDecl>(Found)) {
1560 return Importer.
Imported(D, FoundEnum);
1563 ConflictingDecls.push_back(FoundDecls[
I]);
1566 if (!ConflictingDecls.empty()) {
1568 ConflictingDecls.data(),
1569 ConflictingDecls.size());
1588 if (ToIntegerType.
isNull())
1604 if (Definition && Definition != D) {
1605 Decl *ImportedDef = Importer.
Import(Definition);
1609 return Importer.
Imported(D, ImportedDef);
1639 if (!FoundDecls.empty()) {
1645 for (
unsigned I = 0, N = FoundDecls.size();
I != N; ++
I) {
1646 if (!FoundDecls[
I]->isInIdentifierNamespace(IDNS))
1649 Decl *Found = FoundDecls[
I];
1652 Found = Tag->getDecl();
1655 if (
RecordDecl *FoundRecord = dyn_cast<RecordDecl>(Found)) {
1657 FoundRecord->isAnonymousStructOrUnion()) {
1664 findUntaggedStructOrUnionIndex(FoundRecord)) {
1665 if (*Index1 != *Index2)
1671 PrevDecl = FoundRecord;
1677 == FoundDef->isAnonymousStructOrUnion() &&
1683 return Importer.
Imported(D, FoundDef);
1692 if (FoundRecord->hasExternalLexicalStorage() &&
1693 !FoundRecord->isCompleteDefinition())
1698 if (FoundRecord->isCompleteDefinition() &&
1703 AdoptDecl = FoundRecord;
1705 }
else if (!SearchName) {
1710 ConflictingDecls.push_back(FoundDecls[
I]);
1713 if (!ConflictingDecls.empty() && SearchName) {
1715 ConflictingDecls.data(),
1716 ConflictingDecls.size());
1725 if (
CXXRecordDecl *DCXX = llvm::dyn_cast<CXXRecordDecl>(D)) {
1726 if (DCXX->isLambda()) {
1730 DCXX->isDependentLambda(),
1731 DCXX->isGenericLambda(),
1732 DCXX->getLambdaCaptureDefault());
1733 Decl *CDecl = Importer.
Import(DCXX->getLambdaContextDecl());
1734 if (DCXX->getLambdaContextDecl() && !CDecl)
1737 }
else if (DCXX->isInjectedClassName()) {
1741 const bool DelayTypeCreation =
true;
1746 D2CXX, llvm::dyn_cast<CXXRecordDecl>(DC));
1801 for (
unsigned I = 0, N = FoundDecls.size();
I != N; ++
I) {
1802 if (!FoundDecls[
I]->isInIdentifierNamespace(IDNS))
1806 = dyn_cast<EnumConstantDecl>(FoundDecls[
I])) {
1808 return Importer.
Imported(D, FoundEnumConstant);
1811 ConflictingDecls.push_back(FoundDecls[I]);
1814 if (!ConflictingDecls.empty()) {
1816 ConflictingDecls.data(),
1817 ConflictingDecls.size());
1833 Importer.
Imported(D, ToEnumerator);
1835 return ToEnumerator;
1856 for (
unsigned I = 0, N = FoundDecls.size();
I != N; ++
I) {
1857 if (!FoundDecls[
I]->isInIdentifierNamespace(IDNS))
1860 if (
FunctionDecl *FoundFunction = dyn_cast<FunctionDecl>(FoundDecls[
I])) {
1861 if (FoundFunction->hasExternalFormalLinkage() &&
1864 FoundFunction->getType())) {
1866 return Importer.
Imported(D, FoundFunction);
1877 Importer.
ToDiag(Loc, diag::err_odr_function_type_inconsistent)
1878 << Name << D->
getType() << FoundFunction->getType();
1879 Importer.
ToDiag(FoundFunction->getLocation(),
1880 diag::note_odr_value_here)
1881 << FoundFunction->getType();
1885 ConflictingDecls.push_back(FoundDecls[I]);
1888 if (!ConflictingDecls.empty()) {
1890 ConflictingDecls.data(),
1891 ConflictingDecls.size());
1902 bool usedDifferentExceptionSpec =
false;
1916 FromFPT->getReturnType(), FromFPT->getParamTypes(), DefaultEPI);
1917 usedDifferentExceptionSpec =
true;
1933 Parameters.push_back(ToP);
1942 cast<CXXRecordDecl>(DC),
1945 FromConstructor->isExplicit(),
1949 if (
unsigned NumInitializers = FromConstructor->getNumCtorInitializers()) {
1953 cast_or_null<CXXCtorInitializer>(Importer.
Import(
I));
1956 CtorInitializers.push_back(ToI);
1960 std::copy(CtorInitializers.begin(), CtorInitializers.end(), Memory);
1963 ToCtor->setNumCtorInitializers(NumInitializers);
1965 }
else if (isa<CXXDestructorDecl>(D)) {
1967 cast<CXXRecordDecl>(DC),
1973 = dyn_cast<CXXConversionDecl>(D)) {
1975 cast<CXXRecordDecl>(DC),
1979 FromConversion->isExplicit(),
1982 }
else if (
CXXMethodDecl *Method = dyn_cast<CXXMethodDecl>(D)) {
1984 cast<CXXRecordDecl>(DC),
1987 Method->getStorageClass(),
1988 Method->isInlineSpecified(),
2010 for (
unsigned I = 0, N = Parameters.size();
I != N; ++
I) {
2011 Parameters[
I]->setOwningFunction(ToFunction);
2014 ToFunction->setParams(Parameters);
2016 if (usedDifferentExceptionSpec) {
2026 if (
Stmt *ToBody = Importer.
Import(FromBody)) {
2036 if (
auto *FromCXXMethod = dyn_cast<CXXMethodDecl>(D))
2068 if (isa<FieldDecl>(*D) || isa<IndirectFieldDecl>(*D))
2089 for (
unsigned I = 0, N = FoundDecls.size();
I != N; ++
I) {
2090 if (
FieldDecl *FoundField = dyn_cast<FieldDecl>(FoundDecls[
I])) {
2096 FoundField->getType())) {
2101 Importer.
ToDiag(Loc, diag::err_odr_field_type_inconsistent)
2102 << Name << D->
getType() << FoundField->getType();
2103 Importer.
ToDiag(FoundField->getLocation(), diag::note_odr_value_here)
2104 << FoundField->getType();
2127 Expr *ToInitializer = Importer.
Import(FromInitializer);
2153 for (
unsigned I = 0, N = FoundDecls.size();
I != N; ++
I) {
2155 = dyn_cast<IndirectFieldDecl>(FoundDecls[
I])) {
2161 FoundField->getType(),
2168 if (!Name && I < N-1)
2171 Importer.
ToDiag(Loc, diag::err_odr_field_type_inconsistent)
2172 << Name << D->
getType() << FoundField->getType();
2173 Importer.
ToDiag(FoundField->getLocation(), diag::note_odr_value_here)
2174 << FoundField->getType();
2188 for (
auto *PI : D->
chain()) {
2192 NamedChain[i++] = cast<NamedDecl>(D);
2204 Importer.
Imported(D, ToIndirectField);
2206 return ToIndirectField;
2214 if (!DC || !LexicalDC)
2219 auto *RD = cast<CXXRecordDecl>(DC);
2220 FriendDecl *ImportedFriend = RD->getFirstFriend();
2225 while (ImportedFriend) {
2226 if (D->
getFriendDecl() && ImportedFriend->getFriendDecl()) {
2228 ImportedFriend->getFriendDecl()))
2229 return Importer.
Imported(D, ImportedFriend);
2231 }
else if (D->
getFriendType() && ImportedFriend->getFriendType()) {
2234 ImportedFriend->getFriendType()->getType(),
true))
2235 return Importer.
Imported(D, ImportedFriend);
2237 ImportedFriend = ImportedFriend->getNextFriend();
2243 ToFU = cast_or_null<NamedDecl>(Importer.
Import(FriendD));
2252 for (
unsigned I = 0;
I < D->NumTPLists;
I++) {
2256 ToTPLists[
I] = List;
2265 RD->pushFriendDecl(FrD);
2287 for (
unsigned I = 0, N = FoundDecls.size();
I != N; ++
I) {
2288 if (
ObjCIvarDecl *FoundIvar = dyn_cast<ObjCIvarDecl>(FoundDecls[
I])) {
2290 FoundIvar->getType())) {
2295 Importer.
ToDiag(Loc, diag::err_odr_ivar_type_inconsistent)
2296 << Name << D->
getType() << FoundIvar->getType();
2297 Importer.
ToDiag(FoundIvar->getLocation(), diag::note_odr_value_here)
2298 << FoundIvar->getType();
2314 cast<ObjCContainerDecl>(DC),
2340 VarDecl *MergeWithVar =
nullptr;
2345 for (
unsigned I = 0, N = FoundDecls.size();
I != N; ++
I) {
2346 if (!FoundDecls[
I]->isInIdentifierNamespace(IDNS))
2349 if (
VarDecl *FoundVar = dyn_cast<VarDecl>(FoundDecls[
I])) {
2351 if (FoundVar->hasExternalFormalLinkage() &&
2354 FoundVar->getType())) {
2355 MergeWithVar = FoundVar;
2363 if (FoundArray && TArray) {
2364 if (isa<IncompleteArrayType>(FoundArray) &&
2365 isa<ConstantArrayType>(TArray)) {
2371 FoundVar->setType(T);
2372 MergeWithVar = FoundVar;
2374 }
else if (isa<IncompleteArrayType>(TArray) &&
2375 isa<ConstantArrayType>(FoundArray)) {
2376 MergeWithVar = FoundVar;
2381 Importer.
ToDiag(Loc, diag::err_odr_variable_type_inconsistent)
2382 << Name << D->
getType() << FoundVar->getType();
2383 Importer.
ToDiag(FoundVar->getLocation(), diag::note_odr_value_here)
2384 << FoundVar->getType();
2388 ConflictingDecls.push_back(FoundDecls[I]);
2394 Importer.
Imported(D, MergeWithVar);
2398 Importer.
ToDiag(ExistingDef->getLocation(),
2399 diag::err_odr_variable_multiple_def)
2401 Importer.
FromDiag(DDef->getLocation(), diag::note_odr_defined_here);
2403 Expr *Init = Importer.
Import(DDef->getInit());
2405 if (DDef->isInitKnownICE()) {
2408 Eval->
IsICE = DDef->isInitICE();
2413 return MergeWithVar;
2416 if (!ConflictingDecls.empty()) {
2418 ConflictingDecls.data(),
2419 ConflictingDecls.size());
2479 return Importer.
Imported(D, ToParm);
2512 Expr *ToDefArg =
nullptr;
2513 Expr *FromDefArg =
nullptr;
2516 ToDefArg = Importer.
Import(FromDefArg);
2522 ToDefArg = Importer.
Import(FromDefArg);
2525 if (FromDefArg && !ToDefArg)
2531 return Importer.
Imported(D, ToParm);
2547 for (
unsigned I = 0, N = FoundDecls.size();
I != N; ++
I) {
2548 if (
ObjCMethodDecl *FoundMethod = dyn_cast<ObjCMethodDecl>(FoundDecls[
I])) {
2554 FoundMethod->getReturnType())) {
2555 Importer.
ToDiag(Loc, diag::err_odr_objc_method_result_type_inconsistent)
2557 << FoundMethod->getReturnType();
2558 Importer.
ToDiag(FoundMethod->getLocation(),
2559 diag::note_odr_objc_method_here)
2565 if (D->
param_size() != FoundMethod->param_size()) {
2566 Importer.
ToDiag(Loc, diag::err_odr_objc_method_num_params_inconsistent)
2568 << D->
param_size() << FoundMethod->param_size();
2569 Importer.
ToDiag(FoundMethod->getLocation(),
2570 diag::note_odr_objc_method_here)
2577 PEnd = D->
param_end(), FoundP = FoundMethod->param_begin();
2578 P != PEnd; ++
P, ++FoundP) {
2580 (*FoundP)->getType())) {
2581 Importer.
FromDiag((*P)->getLocation(),
2582 diag::err_odr_objc_method_param_type_inconsistent)
2584 << (*P)->getType() << (*FoundP)->getType();
2585 Importer.
ToDiag((*FoundP)->getLocation(), diag::note_odr_value_here)
2586 << (*FoundP)->getType();
2593 if (D->
isVariadic() != FoundMethod->isVariadic()) {
2594 Importer.
ToDiag(Loc, diag::err_odr_objc_method_variadic_inconsistent)
2596 Importer.
ToDiag(FoundMethod->getLocation(),
2597 diag::note_odr_objc_method_here)
2603 return Importer.
Imported(D, FoundMethod);
2630 ToParams.push_back(ToP);
2634 for (
unsigned I = 0, N = ToParams.size();
I != N; ++
I) {
2722 FromProto != FromProtoEnd;
2723 ++FromProto, ++FromProtoLoc) {
2725 = cast_or_null<ObjCProtocolDecl>(Importer.
Import(*FromProto));
2728 Protocols.push_back(ToProto);
2729 ProtocolLocs.push_back(Importer.
Import(*FromProtoLoc));
2746 = cast_or_null<ObjCCategoryImplDecl>(
2776 FromProto != FromProtoEnd;
2777 ++FromProto, ++FromProtoLoc) {
2779 = cast_or_null<ObjCProtocolDecl>(Importer.
Import(*FromProto));
2782 Protocols.push_back(ToProto);
2783 ProtocolLocs.push_back(Importer.
Import(*FromProtoLoc));
2802 if (Definition && Definition != D) {
2803 Decl *ImportedDef = Importer.
Import(Definition);
2807 return Importer.
Imported(D, ImportedDef);
2823 for (
unsigned I = 0, N = FoundDecls.size();
I != N; ++
I) {
2827 if ((MergeWithProtocol = dyn_cast<ObjCProtocolDecl>(FoundDecls[
I])))
2874 Importer.
Imported(D, ToLinkageSpec);
2876 return ToLinkageSpec;
2886 FromSuper = cast_or_null<ObjCInterfaceDecl>(Importer.
Import(FromSuper));
2892 if ((
bool)FromSuper != (
bool)ToSuper ||
2895 diag::err_odr_objc_superclass_inconsistent)
2902 diag::note_odr_objc_missing_superclass);
2905 diag::note_odr_objc_superclass)
2909 diag::note_odr_objc_missing_superclass);
2937 FromProto != FromProtoEnd;
2938 ++FromProto, ++FromProtoLoc) {
2940 = cast_or_null<ObjCProtocolDecl>(Importer.
Import(*FromProto));
2943 Protocols.push_back(ToProto);
2944 ProtocolLocs.push_back(Importer.
Import(*FromProtoLoc));
2979 for (
auto fromTypeParam : *list) {
2980 auto toTypeParam = cast_or_null<ObjCTypeParamDecl>(
2981 Importer.
Import(fromTypeParam));
2985 toTypeParams.push_back(toTypeParam);
2989 Importer.
Import(list->getLAngleLoc()),
2991 Importer.
Import(list->getRAngleLoc()));
2999 if (Definition && Definition != D) {
3000 Decl *ImportedDef = Importer.
Import(Definition);
3004 return Importer.
Imported(D, ImportedDef);
3021 for (
unsigned I = 0, N = FoundDecls.size();
I != N; ++
I) {
3025 if ((MergeWithIface = dyn_cast<ObjCInterfaceDecl>(FoundDecls[
I])))
3101 Super = cast_or_null<ObjCInterfaceDecl>(
3141 diag::err_odr_objc_superclass_inconsistent)
3147 diag::note_odr_objc_superclass)
3151 diag::note_odr_objc_missing_superclass);
3154 diag::note_odr_objc_superclass)
3158 diag::note_odr_objc_missing_superclass);
3183 for (
unsigned I = 0, N = FoundDecls.size();
I != N; ++
I) {
3185 = dyn_cast<ObjCPropertyDecl>(FoundDecls[
I])) {
3188 FoundProp->getType())) {
3189 Importer.
ToDiag(Loc, diag::err_odr_objc_property_type_inconsistent)
3190 << Name << D->
getType() << FoundProp->getType();
3191 Importer.
ToDiag(FoundProp->getLocation(), diag::note_odr_value_here)
3192 << FoundProp->getType();
3263 Ivar = cast_or_null<ObjCIvarDecl>(
3288 diag::err_odr_objc_property_impl_kind_inconsistent)
3293 diag::note_odr_objc_property_impl_kind)
3303 diag::err_odr_objc_synthesize_ivar_inconsistent)
3308 diag::note_odr_objc_synthesize_ivar_here)
3380 if (!TemplateParams)
3405 return Importer.
Imported(D, ImportedDef);
3423 for (
unsigned I = 0, N = FoundDecls.size();
I != N; ++
I) {
3427 Decl *Found = FoundDecls[
I];
3429 = dyn_cast<ClassTemplateDecl>(Found)) {
3435 FoundTemplate->getTemplatedDecl());
3436 return Importer.
Imported(D, FoundTemplate);
3440 ConflictingDecls.push_back(FoundDecls[
I]);
3443 if (!ConflictingDecls.empty()) {
3445 ConflictingDecls.data(),
3446 ConflictingDecls.size());
3458 Importer.
Import(DTemplated));
3464 return AlreadyImported;
3469 if (!TemplateParams)
3473 Loc,
Name, TemplateParams,
3483 Importer.
Imported(DTemplated, D2Templated);
3499 if (Definition && Definition != D) {
3500 Decl *ImportedDef = Importer.
Import(Definition);
3504 return Importer.
Imported(D, ImportedDef);
3508 = cast_or_null<ClassTemplateDecl>(Importer.
Import(
3537 void *InsertPos =
nullptr;
3551 return Importer.
Imported(D, FoundDef);
3557 dyn_cast<ClassTemplatePartialSpecializationDecl>(D)) {
3561 auto &ASTTemplateArgs = *PartialSpec->getTemplateArgsAsWritten();
3562 for (
unsigned I = 0,
E = ASTTemplateArgs.NumTemplateArgs;
I <
E; ++
I) {
3571 PartialSpec->getInjectedSpecializationType());
3572 if (CanonInjType.
isNull())
3577 PartialSpec->getTemplateParameters());
3578 if (!ToTPList && PartialSpec->getTemplateParameters())
3583 ToTPList, ClassTemplate,
3584 llvm::makeArrayRef(TemplateArgs.data(), TemplateArgs.size()),
3585 ToTAInfo, CanonInjType,
nullptr);
3646 return Importer.
Imported(D, ImportedDef);
3661 "Variable templates cannot be declared at function scope");
3665 for (
unsigned I = 0, N = FoundDecls.size();
I != N; ++
I) {
3669 Decl *Found = FoundDecls[
I];
3670 if (
VarTemplateDecl *FoundTemplate = dyn_cast<VarTemplateDecl>(Found)) {
3674 FoundTemplate->getTemplatedDecl());
3675 return Importer.
Imported(D, FoundTemplate);
3679 ConflictingDecls.push_back(FoundDecls[
I]);
3682 if (!ConflictingDecls.empty()) {
3684 ConflictingDecls.data(),
3685 ConflictingDecls.size());
3719 if (!TemplateParams)
3732 Importer.
Imported(DTemplated, D2Templated);
3748 if (Definition && Definition != D) {
3749 Decl *ImportedDef = Importer.
Import(Definition);
3753 return Importer.
Imported(D, ImportedDef);
3784 void *InsertPos =
nullptr;
3786 TemplateArgs, InsertPos);
3799 return Importer.
Imported(D, FoundDef);
3812 Importer.
getToContext(), DC, StartLoc, IdLoc, VarTemplate, T, TInfo,
3818 VarTemplate->AddSpecialization(D2, InsertPos);
3842 size_t NumDecls = DG.
end() - DG.
begin();
3844 auto &_Importer = this->Importer;
3845 std::transform(DG.
begin(), DG.
end(), ToDecls.begin(),
3847 return _Importer.Import(D);
3869 Names.push_back(ToII);
3877 Names.push_back(ToII);
3886 Clobbers.push_back(Clobber);
3895 Constraints.push_back(Output);
3903 Constraints.push_back(Input);
3936 for (
Decl *ToD : ToDG) {
3961 ToLBraceLoc, ToRBraceLoc);
3969 if (!ToRHS && S->
getRHS())
3975 ToCaseLoc, ToEllipsisLoc,
3993 if (!ToLabelDecl && S->
getDecl())
4007 std::transform(FromAttrs.begin(), FromAttrs.end(), ToAttrs.begin(),
4008 [&_ToContext](
const Attr *A) ->
const Attr * {
4009 return A->
clone(_ToContext);
4011 for (
const Attr *ToA : ToAttrs) {
4019 ToAttrs, ToSubStmt);
4027 VarDecl *ToConditionVariable =
nullptr;
4029 ToConditionVariable =
4030 dyn_cast_or_null<VarDecl>(Importer.
Import(FromConditionVariable));
4031 if (!ToConditionVariable)
4035 if (!ToCondition && S->
getCond())
4038 if (!ToThenStmt && S->
getThen())
4042 if (!ToElseStmt && S->
getElse())
4047 ToConditionVariable,
4048 ToCondition, ToThenStmt,
4049 ToElseLoc, ToElseStmt);
4056 VarDecl *ToConditionVariable =
nullptr;
4058 ToConditionVariable =
4059 dyn_cast_or_null<VarDecl>(Importer.
Import(FromConditionVariable));
4060 if (!ToConditionVariable)
4064 if (!ToCondition && S->
getCond())
4068 ToConditionVariable, ToCondition);
4081 if (LastChainedSwitchCase)
4085 LastChainedSwitchCase = ToSC;
4091 VarDecl *ToConditionVariable =
nullptr;
4093 ToConditionVariable =
4094 dyn_cast_or_null<VarDecl>(Importer.
Import(FromConditionVariable));
4095 if (!ToConditionVariable)
4099 if (!ToCondition && S->
getCond())
4106 ToConditionVariable,
4107 ToCondition, ToBody,
4116 if (!ToCondition && S->
getCond())
4122 ToDoLoc, ToWhileLoc,
4131 if (!ToCondition && S->
getCond())
4133 VarDecl *ToConditionVariable =
nullptr;
4135 ToConditionVariable =
4136 dyn_cast_or_null<VarDecl>(Importer.
Import(FromConditionVariable));
4137 if (!ToConditionVariable)
4141 if (!ToInc && S->
getInc())
4150 ToInit, ToCondition,
4151 ToConditionVariable,
4153 ToForLoc, ToLParenLoc,
4160 ToLabel = dyn_cast_or_null<LabelDecl>(Importer.
Import(FromLabel));
4167 ToGotoLoc, ToLabelLoc);
4196 VarDecl *ToNRVOCandidate = cast_or_null<VarDecl>(Importer.
Import(NRVOCandidate));
4197 if (!ToNRVOCandidate && NRVOCandidate)
4205 VarDecl *ToExceptionDecl =
nullptr;
4208 dyn_cast_or_null<VarDecl>(Importer.
Import(FromExceptionDecl));
4209 if (!ToExceptionDecl)
4226 for (
unsigned HI = 0, HE = S->
getNumHandlers(); HI != HE; ++HI) {
4228 if (
Stmt *ToHandler = Importer.
Import(FromHandler))
4229 ToHandlers[HI] = ToHandler;
4254 if (!ToInc && S->
getInc())
4270 ToForLoc, ToCoawaitLoc,
4271 ToColonLoc, ToRParenLoc);
4295 VarDecl *ToExceptionDecl =
nullptr;
4298 dyn_cast_or_null<VarDecl>(Importer.
Import(FromExceptionDecl));
4299 if (!ToExceptionDecl)
4328 if (
Stmt *ToCatchStmt = Importer.
Import(FromCatchStmt))
4329 ToCatchStmts[CI] = ToCatchStmt;
4337 ToAtTryLoc, ToAtTryStmt,
4338 ToCatchStmts.begin(), ToCatchStmts.size(),
4353 ToAtSynchronizedLoc, ToSynchExpr, ToSynchBody);
4452 ResInfo = &ToTAInfo;
4506 IndexExprs[
I - 1] = Arg;
4512 llvm::transform(DIE->
designators(), Designators.begin(),
4518 if (D.isFieldDesignator() && !D.getFieldName())
4576 Locations.data(), Locations.size());
4697 SubExpr, ResultType,
4773 Common, OpaqueValue, Cond, TrueExpr, FalseExpr,
4848 if (CompLHSType.
isNull())
4852 if (CompResultType.
isNull())
4867 CompLHSType, CompResultType,
4875 Path.push_back(Spec);
4917 case Stmt::CStyleCastExprClass: {
4921 SubExpr, &BasePath, TInfo,
4926 case Stmt::CXXFunctionalCastExprClass: {
4935 case Stmt::ObjCBridgedCastExprClass: {
4952 case Stmt::CXXStaticCastExprClass:
4955 SubExpr, &BasePath, TInfo,
4956 ExprLoc, RParenLoc, Brackets);
4958 case Stmt::CXXDynamicCastExprClass:
4961 SubExpr, &BasePath, TInfo,
4962 ExprLoc, RParenLoc, Brackets);
4964 case Stmt::CXXReinterpretCastExprClass:
4967 SubExpr, &BasePath, TInfo,
4968 ExprLoc, RParenLoc, Brackets);
4970 case Stmt::CXXConstCastExprClass:
4973 RParenLoc, Brackets);
4975 llvm_unreachable(
"Cast expression of unsupported type!");
5027 Exprs[
I] = ToIndexExpr;
5036 TInfo, Nodes, Exprs,
5056 T, Operand, CanThrow,
5102 auto *Dtor = cast_or_null<CXXDestructorDecl>(
5103 Importer.
Import(const_cast<CXXDestructorDecl *>(
5122 auto *Ctor = cast_or_null<CXXConstructorDecl>(
5151 ValueDecl *ExtendedBy = cast_or_null<ValueDecl>(
5173 FunctionDecl *OperatorNewDecl = cast_or_null<FunctionDecl>(
5178 FunctionDecl *OperatorDeleteDecl = cast_or_null<FunctionDecl>(
5198 OperatorNewDecl, OperatorDeleteDecl,
5213 FunctionDecl *OperatorDeleteDecl = cast_or_null<FunctionDecl>(
5342 ToMember, ToFoundDecl, ToMemberNameInfo,
5360 for (
unsigned ai = 0, ae = NumArgs; ai != ae; ++ai) {
5371 for (
unsigned ai = 0, ae = NumArgs; ai != ae; ++ai)
5372 ToArgs_Copied[ai] = ToArgs[ai];
5376 llvm::makeArrayRef(ToArgs_Copied, NumArgs), T, E->
getValueKind(),
5411 Importer.
Import(SyntForm));
5449 FieldDecl *ToField = llvm::dyn_cast_or_null<FieldDecl>(
5475 if (isa<CXXStaticCastExpr>(E)) {
5477 Importer.
getToContext(), ToType, VK, CK, ToOp, &BasePath,
5478 ToWritten, ToOperatorLoc, ToRParenLoc, ToAngleBrackets);
5479 }
else if (isa<CXXDynamicCastExpr>(E)) {
5481 Importer.
getToContext(), ToType, VK, CK, ToOp, &BasePath,
5482 ToWritten, ToOperatorLoc, ToRParenLoc, ToAngleBrackets);
5483 }
else if (isa<CXXReinterpretCastExpr>(E)) {
5485 Importer.
getToContext(), ToType, VK, CK, ToOp, &BasePath,
5486 ToWritten, ToOperatorLoc, ToRParenLoc, ToAngleBrackets);
5517 cast<CXXMethodDecl>(Importer.
Import(const_cast<CXXMethodDecl*>(
5518 FromOverriddenMethod))));
5524 : ToContext(ToContext), FromContext(FromContext),
5525 ToFileManager(ToFileManager), FromFileManager(FromFileManager),
5526 Minimal(MinimalImport), LastDiagFromFrom(
false)
5541 llvm::DenseMap<const Type *, const Type *>::iterator Pos
5542 = ImportedTypes.find(fromTy);
5543 if (Pos != ImportedTypes.end())
5573 llvm::DenseMap<Decl *, Decl *>::iterator Pos = ImportedDecls.find(FromD);
5574 if (Pos != ImportedDecls.end()) {
5575 Decl *ToD = Pos->second;
5590 llvm::DenseMap<Decl *, Decl *>::iterator Pos = ImportedDecls.find(FromD);
5591 if (Pos != ImportedDecls.end()) {
5592 Decl *ToD = Pos->second;
5603 ImportedDecls[FromD] = ToD;
5605 if (
TagDecl *FromTag = dyn_cast<TagDecl>(FromD)) {
5607 if (FromTag->getTypedefNameForAnonDecl())
5608 AnonTagsWithPendingTypedefs.push_back(FromTag);
5609 }
else if (
TypedefNameDecl *FromTypedef = dyn_cast<TypedefNameDecl>(FromD)) {
5613 FromTag = AnonTagsWithPendingTypedefs.begin(),
5614 FromTagEnd = AnonTagsWithPendingTypedefs.end();
5615 FromTag != FromTagEnd; ++FromTag) {
5616 if ((*FromTag)->getTypedefNameForAnonDecl() == FromTypedef) {
5617 if (
TagDecl *ToTag = cast_or_null<TagDecl>(
Import(*FromTag))) {
5619 ToTag->setTypedefNameForAnonDecl(cast<TypedefNameDecl>(ToD));
5620 AnonTagsWithPendingTypedefs.erase(FromTag);
5640 if (
RecordDecl *ToRecord = dyn_cast<RecordDecl>(ToDC)) {
5641 RecordDecl *FromRecord = cast<RecordDecl>(FromDC);
5642 if (ToRecord->isCompleteDefinition()) {
5650 }
else if (
EnumDecl *ToEnum = dyn_cast<EnumDecl>(ToDC)) {
5651 EnumDecl *FromEnum = cast<EnumDecl>(FromDC);
5652 if (ToEnum->isCompleteDefinition()) {
5662 if (ToClass->getDefinition()) {
5672 if (ToProto->getDefinition()) {
5689 return cast_or_null<Expr>(
Import(cast<Stmt>(FromE)));
5697 llvm::DenseMap<Stmt *, Stmt *>::iterator Pos = ImportedStmts.find(FromS);
5698 if (Pos != ImportedStmts.end())
5703 Stmt *ToS = Importer.Visit(FromS);
5708 ImportedStmts[FromS] = ToS;
5753 bool bTemplate = FromNNS->
getKind() ==
5762 llvm_unreachable(
"Invalid nested name specifier kind");
5773 NestedNames.push_back(NNS);
5779 while (!NestedNames.empty()) {
5780 NNS = NestedNames.pop_back_val();
5849 E = FromStorage->
end();
5907 = cast_or_null<TemplateTemplateParmDecl>(
5922 llvm_unreachable(
"Invalid template name kind");
5950 llvm::DenseMap<FileID, FileID>::iterator Pos
5951 = ImportedFileIDs.find(FromID);
5952 if (Pos != ImportedFileIDs.end())
5958 assert(FromSLoc.
isFile() &&
"Cannot handle macro expansions yet");
5978 const llvm::MemoryBuffer *
5980 std::unique_ptr<llvm::MemoryBuffer> ToBuf
5981 = llvm::MemoryBuffer::getMemBufferCopy(FromBuf->getBuffer(),
5982 FromBuf->getBufferIdentifier());
5988 ImportedFileIDs[FromID] = ToID;
5994 if (!ToExpr && From->
getInit())
6030 return new (ToContext)
6040 auto Pos = ImportedCXXBaseSpecifiers.find(BaseSpec);
6041 if (Pos != ImportedCXXBaseSpecifiers.end())
6050 ImportedCXXBaseSpecifiers[BaseSpec] =
Imported;
6059 if (
DeclContext *FromDC = cast<DeclContext>(From)) {
6062 if (
RecordDecl *ToRecord = dyn_cast<RecordDecl>(To)) {
6063 if (!ToRecord->getDefinition()) {
6070 if (
EnumDecl *ToEnum = dyn_cast<EnumDecl>(To)) {
6071 if (!ToEnum->getDefinition()) {
6079 if (!ToIFace->getDefinition()) {
6087 if (!ToProto->getDefinition()) {
6159 llvm_unreachable(
"Invalid DeclarationName Kind!");
6189 unsigned NumDecls) {
6194 if (LastDiagFromFrom)
6197 LastDiagFromFrom =
false;
6202 if (!LastDiagFromFrom)
6205 LastDiagFromFrom =
true;
6211 if (!
ID->getDefinition())
6212 ID->startDefinition();
6215 if (!PD->getDefinition())
6216 PD->startDefinition();
6218 else if (
TagDecl *TD = dyn_cast<TagDecl>(D)) {
6219 if (!TD->getDefinition() && !TD->isBeingDefined()) {
6220 TD->startDefinition();
6221 TD->setCompleteDefinition(
true);
6225 assert (0 &&
"CompleteDecl called on a Decl that can't be completed");
6240 ImportedDecls[From] = To;
6246 llvm::DenseMap<const Type *, const Type *>::iterator Pos
SourceLocation getRParenLoc() const
unsigned getNumElements() const
Represents a single C99 designator.
static NamespaceDecl * Create(ASTContext &C, DeclContext *DC, bool Inline, SourceLocation StartLoc, SourceLocation IdLoc, IdentifierInfo *Id, NamespaceDecl *PrevDecl)
param_const_iterator param_begin() const
ValueDecl * getMemberDecl() const
Retrieve the member declaration to which this expression refers.
SourceRange getParenOrBraceRange() const
void setMethodParams(ASTContext &C, ArrayRef< ParmVarDecl * > Params, ArrayRef< SourceLocation > SelLocs=llvm::None)
Sets the method's parameters and selector source locations.
SourceLocation getLocalEndLoc() const
Retrieve the location of the end of this component of the nested-name-specifier.
void setValueDependent(bool VD)
Set whether this expression is value-dependent or not.
QualType getElaboratedType(ElaboratedTypeKeyword Keyword, NestedNameSpecifier *NNS, QualType NamedType) const
tokloc_iterator tokloc_begin() const
Defines the clang::ASTContext interface.
unsigned getNumInits() const
Represents a type that was referred to using an elaborated type keyword, e.g., struct S...
SourceLocation getEnd() const
const SwitchCase * getNextSwitchCase() const
const FileEntry * OrigEntry
Reference to the file entry representing this ContentCache.
void setOwningFunction(DeclContext *FD)
setOwningFunction - Sets the function declaration that owns this ParmVarDecl.
QualType getUnderlyingType() const
TemplateParameterList * ImportTemplateParameterList(TemplateParameterList *Params)
StmtClass getStmtClass() const
Stmt * VisitObjCAtSynchronizedStmt(ObjCAtSynchronizedStmt *S)
Qualifiers getLocalQualifiers() const
Retrieve the set of qualifiers local to this particular QualType instance, not including any qualifie...
Expr * VisitCXXMemberCallExpr(CXXMemberCallExpr *E)
ObjCInterfaceDecl * getDecl() const
Get the declaration of this interface.
CastKind getCastKind() const
The null pointer literal (C++11 [lex.nullptr])
Expr * VisitConditionalOperator(ConditionalOperator *E)
ExprObjectKind getObjectKind() const
getObjectKind - The object kind that this expression produces.
static unsigned getFieldIndex(Decl *F)
This represents a GCC inline-assembly statement extension.
IdentifierInfo * getFieldName() const
For a field or identifier offsetof node, returns the name of the field.
void setImplicit(bool I=true)
Decl * VisitCXXMethodDecl(CXXMethodDecl *D)
FunctionDecl - An instance of this class is created to represent a function declaration or definition...
NamedDecl * getFoundDecl()
Get the NamedDecl through which this reference occurred.
QualType VisitVectorType(const VectorType *T)
unsigned getNumOutputs() const
TypeSourceInfo * getTypeSourceInfo() const
Decl * VisitEnumDecl(EnumDecl *D)
unsigned getDepth() const
bool isMinimalImport() const
Whether the importer will perform a minimal import, creating to-be-completed forward declarations whe...
void setArrayFiller(Expr *filler)
Stmt * VisitDoStmt(DoStmt *S)
const DeclGroupRef getDeclGroup() const
Smart pointer class that efficiently represents Objective-C method names.
This is a discriminated union of FileInfo and ExpansionInfo.
void setAnonymousStructOrUnion(bool Anon)
PointerType - C99 6.7.5.1 - Pointer Declarators.
llvm::iterator_range< arg_iterator > placement_arguments()
const ObjCAtFinallyStmt * getFinallyStmt() const
Retrieve the @finally statement, if any.
A (possibly-)qualified type.
bool isVirtual() const
Determines whether the base class is a virtual base class (or not).
ImplementationControl getImplementationControl() const
QualType VisitDecltypeType(const DecltypeType *T)
TemplateName getReplacement() const
SourceRange getBracketsRange() const
void setTemplateKeywordLoc(SourceLocation Loc)
Sets the location of the template keyword.
bool isBaseOfClass() const
Determine whether this base class is a base of a class declared with the 'class' keyword (vs...
Expr * getArg(unsigned Arg)
getArg - Return the specified argument.
Stmt * VisitCaseStmt(CaseStmt *S)
SourceLocation getExternLoc() const
Gets the location of the extern keyword, if present.
ObjCInterfaceDecl * getClassInterface()
Implements support for file system lookup, file system caching, and directory search management...
SourceLocation getThrowLoc() const
void startDefinition()
Starts the definition of this Objective-C class, taking it from a forward declaration (@class) to a d...
bool hasLeadingEmptyMacro() const
SourceLocation getLParenLoc() const
ObjCTypeParamList * ImportObjCTypeParamList(ObjCTypeParamList *list)
SourceLocation getTemplateKeywordLoc() const
Gets the location of the template keyword, if present.
bool isElidable() const
Whether this construction is elidable.
DeclarationNameInfo getMemberNameInfo() const
Retrieve the member declaration name info.
QualType VisitSubstTemplateTypeParmType(const SubstTemplateTypeParmType *T)
SourceRange getSourceRange() const LLVM_READONLY
Retrieve the source range covering the entirety of this nested-name-specifier.
Defines the clang::FileManager interface and associated types.
protocol_iterator protocol_end() const
QualType getComplexType(QualType T) const
Return the uniqued reference to the type for a complex number with the specified element type...
Stmt * VisitObjCAtCatchStmt(ObjCAtCatchStmt *S)
CompoundStmt * getSubStmt()
IdentifierInfo * getIdentifier() const
getIdentifier - Get the identifier that names this declaration, if there is one.
SourceLocation getTemplateKeywordLoc() const
Retrieve the location of the template keyword preceding the member name, if any.
Decl * VisitDecl(Decl *D)
bool isKindOfTypeAsWritten() const
Whether this is a "__kindof" type as written.
PropertyControl getPropertyImplementation() const
QualType getQualifiedType(SplitQualType split) const
Un-split a SplitQualType.
Stmt * VisitContinueStmt(ContinueStmt *S)
CharacterKind getKind() const
bool hasDefaultArg() const
hasDefaultArg - Determines whether this parameter has a default argument, either parsed or not...
SourceLocation getCXXLiteralOperatorNameLoc() const
getCXXLiteralOperatorNameLoc - Returns the location of the literal operator name (not the operator ke...
Stmt - This represents one statement.
bool isFixed() const
Returns true if this is an Objective-C, C++11, or Microsoft-style enumeration with a fixed underlying...
decl_range decls() const
decls_begin/decls_end - Iterate over the declarations stored in this context.
bool isParameterPack() const
Returns whether this is a parameter pack.
void setPreviousDecl(decl_type *PrevDecl)
Set the previous declaration.
CXXCatchStmt * getHandler(unsigned i)
TemplateDecl * getAsTemplateDecl() const
Retrieve the underlying template declaration that this template name refers to, if known...
bool IsICE
Whether this statement is an integral constant expression, or in C++11, whether the statement is a co...
const Expr * getInitExpr() const
bool isArgumentType() const
bool isThisDeclarationADefinition() const
Determine whether this particular declaration of this class is actually also a definition.
IfStmt - This represents an if/then/else.
ClassTemplateSpecializationDecl * findSpecialization(ArrayRef< TemplateArgument > Args, void *&InsertPos)
Return the specialization with the provided arguments if it exists, otherwise return the insertion po...
QualType getRValueReferenceType(QualType T) const
Return the uniqued reference to the type for an rvalue reference to the specified type...
Expr * VisitImplicitCastExpr(ImplicitCastExpr *E)
Expr * getInit() const
Retrieve the initializer value.
IdentifierInfo * getCXXLiteralIdentifier() const
getCXXLiteralIdentifier - If this name is the name of a literal operator, retrieve the identifier ass...
Expr * VisitExpressionTraitExpr(ExpressionTraitExpr *E)
EnumConstantDecl - An instance of this object exists for each enum constant that is defined...
OverloadedOperatorKind getOperator() const
Return the overloaded operator to which this template name refers.
static CXXDynamicCastExpr * Create(const ASTContext &Context, QualType T, ExprValueKind VK, CastKind Kind, Expr *Op, const CXXCastPath *Path, TypeSourceInfo *Written, SourceLocation L, SourceLocation RParenLoc, SourceRange AngleBrackets)
bool isGlobalDelete() const
Expr * VisitCXXConstructExpr(CXXConstructExpr *E)
Expr * GetTemporaryExpr() const
Retrieve the temporary-generating subexpression whose value will be materialized into a glvalue...
TypedefDecl - Represents the declaration of a typedef-name via the 'typedef' type specifier...
Defines the SourceManager interface.
tokloc_iterator tokloc_end() const
Microsoft's '__super' specifier, stored as a CXXRecordDecl* of the class it appeared in...
Expr * VisitBinaryOperator(BinaryOperator *E)
The template argument is an expression, and we've not resolved it to one of the other forms yet...
QualType getUnaryTransformType(QualType BaseType, QualType UnderlyingType, UnaryTransformType::UTTKind UKind) const
Unary type transforms.
SourceLocation getForLoc() const
CXXRecordDecl * getDecl() const
static TemplateTemplateParmDecl * Create(const ASTContext &C, DeclContext *DC, SourceLocation L, unsigned D, unsigned P, bool ParameterPack, IdentifierInfo *Id, TemplateParameterList *Params)
TypeSourceInfo * getTypeSourceInfo() const
SourceRange getTypeIdParens() const
NestedNameSpecifierLoc getPrefix() const
Return the prefix of this nested-name-specifier.
CXXRecordDecl * getTemplatedDecl() const
Get the underlying class declarations of the template.
QualType getUnderlyingType() const
Decl - This represents one declaration (or definition), e.g.
SourceLocation getLParenLoc() const
SourceLocation getLocStart() const LLVM_READONLY
unsigned size() const
Returns the number of designators in this initializer.
AccessSpecifier getAccess() const
DeclGroupRef ImportDeclGroup(DeclGroupRef DG)
Represents the index of the current element of an array being initialized by an ArrayInitLoopExpr.
VarDecl * getDefinition(ASTContext &)
Get the real (not just tentative) definition for this declaration.
unsigned getBuiltinID() const
Return a value indicating whether this is a builtin function.
Represents a C++11 auto or C++14 decltype(auto) type.
bool isBoundToLvalueReference() const
Determine whether this materialized temporary is bound to an lvalue reference; otherwise, it's bound to an rvalue reference.
void setPure(bool P=true)
Represents an attribute applied to a statement.
static ObjCProtocolDecl * Create(ASTContext &C, DeclContext *DC, IdentifierInfo *Id, SourceLocation nameLoc, SourceLocation atStartLoc, ObjCProtocolDecl *PrevDecl)
ParenExpr - This represents a parethesized expression, e.g.
static ObjCPropertyDecl * Create(ASTContext &C, DeclContext *DC, SourceLocation L, IdentifierInfo *Id, SourceLocation AtLocation, SourceLocation LParenLocation, QualType T, TypeSourceInfo *TSI, PropertyControl propControl=None)
pack_iterator pack_begin() const
Iterator referencing the first argument of a template argument pack.
QualType getLValueReferenceType(QualType T, bool SpelledAsLValue=true) const
Return the uniqued reference to the type for an lvalue reference to the specified type...
unsigned getArrayExprIndex() const
For an array element node, returns the index into the array of expressions.
SourceLocation getLocStart() const LLVM_READONLY
QualType getPointeeType() const
IdentifierInfo * getAsIdentifierInfo() const
getAsIdentifierInfo - Retrieve the IdentifierInfo * stored in this declaration name, or NULL if this declaration name isn't a simple identifier.
The base class of the type hierarchy.
CXXRecordDecl * getAsRecordDecl() const
Retrieve the record declaration stored in this nested name specifier.
Represents Objective-C's @throw statement.
SourceLocation getRBracketLoc() const
QualType VisitTemplateSpecializationType(const TemplateSpecializationType *T)
SourceLocation getLabelLoc() const
DiagnosticBuilder Report(SourceLocation Loc, unsigned DiagID)
Issue the message to the client.
InitListExpr * getSyntacticForm() const
Represents an array type, per C99 6.7.5.2 - Array Declarators.
Declaration of a variable template.
SourceLocation getIfLoc() const
SourceLocation getRParenLoc() const
TemplateTemplateParmDecl * getParameterPack() const
Retrieve the template template parameter pack being substituted.
The template argument is a declaration that was provided for a pointer, reference, or pointer to member non-type template parameter.
NamespaceDecl - Represent a C++ namespace.
protocol_loc_iterator protocol_loc_begin() const
NestedNameSpecifier * getPrefix() const
Return the prefix of this nested name specifier.
Expr * VisitOffsetOfExpr(OffsetOfExpr *OE)
Represents a call to a C++ constructor.
SourceLocation getCoawaitLoc() const
TypeSourceInfo * getTypeSourceInfo() const
RetTy Visit(const Type *T)
Performs the operation associated with this visitor object.
An Embarcadero array type trait, as used in the implementation of __array_rank and __array_extent...
void setSpecializationKind(TemplateSpecializationKind TSK)
virtual void completeDefinition()
completeDefinition - Notes that the definition of this type is now complete.
Decl * VisitFieldDecl(FieldDecl *D)
A container of type source information.
RefQualifierKind RefQualifier
ArrayRef< TemplateArgumentLoc > template_arguments() const
void setSwitchCaseList(SwitchCase *SC)
Set the case list for this switch statement.
const Stmt * getElse() const
unsigned getIndex() const
Decl * VisitObjCCategoryImplDecl(ObjCCategoryImplDecl *D)
SourceLocation getOperatorLoc() const
Expr * getAsExpr() const
Retrieve the template argument as an expression.
static StringLiteral * Create(const ASTContext &C, StringRef Str, StringKind Kind, bool Pascal, QualType Ty, const SourceLocation *Loc, unsigned NumStrs)
This is the "fully general" constructor that allows representation of strings formed from multiple co...
QualType VisitInjectedClassNameType(const InjectedClassNameType *T)
void setTemplateArgsInfo(const TemplateArgumentListInfo &ArgsInfo)
ObjCProtocolList::iterator protocol_iterator
static CXXFunctionalCastExpr * Create(const ASTContext &Context, QualType T, ExprValueKind VK, TypeSourceInfo *Written, CastKind Kind, Expr *Op, const CXXCastPath *Path, SourceLocation LPLoc, SourceLocation RPLoc)
VarDecl * getConditionVariable() const
Retrieve the variable declared in this "for" statement, if any.
SourceLocation getLocEnd() const LLVM_READONLY
SourceLocation getEllipsisLoc() const
static FriendDecl * Create(ASTContext &C, DeclContext *DC, SourceLocation L, FriendUnion Friend_, SourceLocation FriendL, ArrayRef< TemplateParameterList * > FriendTypeTPLists=None)
void localUncachedLookup(DeclarationName Name, SmallVectorImpl< NamedDecl * > &Results)
A simplistic name lookup mechanism that performs name lookup into this declaration context without co...
Represents a C++ constructor within a class.
Represents a prvalue temporary that is written into memory so that a reference can bind to it...
A template template parameter that has been substituted for some other template name.
Expr * getInClassInitializer() const
getInClassInitializer - Get the C++11 in-class initializer for this member, or null if one has not be...
InClassInitStyle getInClassInitStyle() const
getInClassInitStyle - Get the kind of (C++11) in-class initializer which this field has...
bool hasExplicitTemplateArgs() const
Determines whether the member name was followed by an explicit template argument list.
IdentType getIdentType() const
const llvm::APInt & getSize() const
protocol_loc_iterator protocol_loc_begin() const
ObjCTypeParamVariance getVariance() const
Determine the variance of this type parameter.
SourceLocation getIncludeLoc() const
bool doesUsualArrayDeleteWantSize() const
Answers whether the usual array deallocation function for the allocated type expects the size of the ...
Expr * getIndexExpr(unsigned Idx)
bool hadArrayRangeDesignator() const
SourceLocation getTemplateKeywordLoc() const
Retrieve the location of the template keyword preceding this name, if any.
CharacteristicKind getFileCharacteristic() const
Return whether this is a system header or not.
static CXXConstructExpr * Create(const ASTContext &C, QualType T, SourceLocation Loc, CXXConstructorDecl *Ctor, bool Elidable, ArrayRef< Expr * > Args, bool HadMultipleCandidates, bool ListInitialization, bool StdInitListInitialization, bool ZeroInitialization, ConstructionKind ConstructKind, SourceRange ParenOrBraceRange)
An identifier, stored as an IdentifierInfo*.
Expr * VisitStringLiteral(StringLiteral *E)
VarTemplateDecl * getSpecializedTemplate() const
Retrieve the template that this specialization specializes.
SourceRange getSourceRange() const LLVM_READONLY
FriendDecl - Represents the declaration of a friend entity, which can be a function, a type, or a templated function or type.
QualType VisitPointerType(const PointerType *T)
QualType getBlockPointerType(QualType T) const
Return the uniqued reference to the type for a block of the specified type.
Expr * getOperand() const
VarDecl - An instance of this class is created to represent a variable declaration or definition...
virtual Decl * GetOriginalDecl(Decl *To)
Called by StructuralEquivalenceContext.
void setImplementation(ObjCCategoryImplDecl *ImplD)
SourceLocation getReturnLoc() const
static CXXConversionDecl * Create(ASTContext &C, CXXRecordDecl *RD, SourceLocation StartLoc, const DeclarationNameInfo &NameInfo, QualType T, TypeSourceInfo *TInfo, bool isInline, bool isExplicit, bool isConstexpr, SourceLocation EndLocation)
bool isFileVarDecl() const
isFileVarDecl - Returns true for file scoped variable declaration.
static NestedNameSpecifier * Create(const ASTContext &Context, NestedNameSpecifier *Prefix, IdentifierInfo *II)
Builds a specifier combining a prefix and an identifier.
Expr * getInit() const
Get the initializer.
CompoundLiteralExpr - [C99 6.5.2.5].
unsigned getIndex() const
Retrieve the index into its type parameter list.
SourceLocation getRParenLoc() const
void setCXXLiteralOperatorNameLoc(SourceLocation Loc)
setCXXLiteralOperatorNameLoc - Sets the location of the literal operator name (not the operator keywo...
const Expr * getCallee() const
Stmt * VisitLabelStmt(LabelStmt *S)
SourceLocation getIvarRBraceLoc() const
Expr * VisitIntegerLiteral(IntegerLiteral *E)
Represents an empty template argument, e.g., one that has not been deduced.
Extra information about a function prototype.
AccessSpecifier getAccess() const
AutoTypeKeyword getKeyword() const
TypeSourceInfo * getSuperClassTInfo() const
Represents a variable template specialization, which refers to a variable template with a given set o...
SourceLocation getLocStart() const LLVM_READONLY
ObjCMethodDecl - Represents an instance or class method declaration.
SourceLocation getLocation() const
Retrieve the location of the literal.
Decl * VisitVarDecl(VarDecl *D)
TemplateTypeParmDecl * getDecl() const
A namespace, stored as a NamespaceDecl*.
DiagnosticBuilder ToDiag(SourceLocation Loc, unsigned DiagID)
Report a diagnostic in the "to" context.
SourceLocation getDoLoc() const
QualType getOriginalType() const
SourceLocation getRParenLoc() const
UnaryExprOrTypeTrait getKind() const
Expr * VisitUnaryOperator(UnaryOperator *E)
Stores a list of template parameters for a TemplateDecl and its derived classes.
Expr * VisitAtomicExpr(AtomicExpr *E)
Expr * getCond() const
getCond - Return the condition expression; this is defined in terms of the opaque value...
void getSelectorLocs(SmallVectorImpl< SourceLocation > &SelLocs) const
const ParmVarDecl * getParam() const
SourceLocation getLParenLoc() const
QualType Import(QualType FromT)
Import the given type from the "from" context into the "to" context.
unsigned param_size() const
unsigned getValue() const
A C++ throw-expression (C++ [except.throw]).
Represents an expression – generally a full-expression – that introduces cleanups to be run at the en...
TemplateTemplateParmDecl * getParameter() const
static AccessSpecDecl * Create(ASTContext &C, AccessSpecifier AS, DeclContext *DC, SourceLocation ASLoc, SourceLocation ColonLoc)
ParmVarDecl - Represents a parameter to a function.
bool ImportTemplateArguments(const TemplateArgument *FromArgs, unsigned NumFromArgs, SmallVectorImpl< TemplateArgument > &ToArgs)
Represents the result of substituting a type for a template type parameter.
unsigned getNumArgs() const
Retrieve the number of template arguments.
SourceLocation getDefaultLoc() const
SourceLocation getLocation() const
SourceLocation getEllipsisLoc() const
BoundNodesTreeBuilder Nodes
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier (with source-location information) that qualifies the name of this...
QualType getFunctionNoProtoType(QualType ResultTy, const FunctionType::ExtInfo &Info) const
Return a K&R style C function type like 'int()'.
bool isBaseInitializer() const
Determine whether this initializer is initializing a base class.
ArrayTypeTrait getTrait() const
SourceLocation getSetterNameLoc() const
TypeSourceInfo * getTypeSourceInfo() const
SourceLocation getEllipsisLoc() const
TypeSourceInfo * getFriendType() const
If this friend declaration names an (untemplated but possibly dependent) type, return the type; other...
EvaluatedStmt * ensureEvaluatedStmt() const
Convert the initializer for this declaration to the elaborated EvaluatedStmt form, which contains extra information on the evaluated value of the initializer.
const IdentifierInfo * getIdentifier() const
Returns the identifier to which this template name refers.
bool hasExternalFormalLinkage() const
True if this decl has external linkage.
Decl * VisitStaticAssertDecl(StaticAssertDecl *D)
void setTemplateSpecializationKind(TemplateSpecializationKind TSK)
Set the kind of specialization or template instantiation this is.
LabelStmt - Represents a label, which has a substatement.
SourceLocation getRParenLoc() const
Return the location of the right parentheses.
Kind getPropertyImplementation() const
RecordDecl - Represents a struct/union/class.
Represents a C99 designated initializer expression.
ObjCProtocolList::iterator protocol_iterator
ObjCTypeParamList * getTypeParamListAsWritten() const
Retrieve the type parameters written on this particular declaration of the class. ...
Decl * VisitObjCCategoryDecl(ObjCCategoryDecl *D)
QualType VisitBlockPointerType(const BlockPointerType *T)
bool hasUninstantiatedDefaultArg() const
virtual DeclarationName HandleNameConflict(DeclarationName Name, DeclContext *DC, unsigned IDNS, NamedDecl **Decls, unsigned NumDecls)
Cope with a name conflict when importing a declaration into the given context.
DeclarationName getName() const
getName - Returns the embedded declaration name.
FunctionType::ExtInfo ExtInfo
One of these records is kept for each identifier that is lexed.
Represents a class template specialization, which refers to a class template with a given set of temp...
void setIntegerType(QualType T)
Set the underlying integer type.
unsigned getIndexTypeCVRQualifiers() const
bool isScopedUsingClassTag() const
Returns true if this is a C++11 scoped enumeration.
Decl * VisitTypedefDecl(TypedefDecl *D)
DiagnosticBuilder FromDiag(SourceLocation Loc, unsigned DiagID)
Report a diagnostic in the "from" context.
Expr * getSubExpr(unsigned Idx) const
OverloadedTemplateStorage * getAsOverloadedTemplate() const
Retrieve the underlying, overloaded function template.
unsigned getNumInputs() const
StringLiteral * getMessage()
Designator ImportDesignator(const Designator &D)
Decl * VisitClassTemplateSpecializationDecl(ClassTemplateSpecializationDecl *D)
Expr * VisitCompoundAssignOperator(CompoundAssignOperator *E)
Represents a class type in Objective C.
static RecordDecl * Create(const ASTContext &C, TagKind TK, DeclContext *DC, SourceLocation StartLoc, SourceLocation IdLoc, IdentifierInfo *Id, RecordDecl *PrevDecl=nullptr)
Expr * getSizeExpr() const
void setUninstantiatedDefaultArg(Expr *arg)
IdentifierInfo * getIdentifierInfoForSlot(unsigned argIndex) const
Retrieve the identifier at a given position in the selector.
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.
Represents a dependent template name that cannot be resolved prior to template instantiation.
bool hasExternalLexicalStorage() const
Whether this DeclContext has external storage containing additional declarations that are lexically i...
bool CheckedICE
Whether we already checked whether this statement was an integral constant expression.
bool isIdentifier() const
Determine whether this template name refers to an identifier.
bool ImportArrayChecked(IIter Ibegin, IIter Iend, OIter Obegin)
Decl * VisitTemplateTemplateParmDecl(TemplateTemplateParmDecl *D)
The template argument is an integral value stored in an llvm::APSInt that was provided for an integra...
QualType VisitMemberPointerType(const MemberPointerType *T)
QualType VisitDecayedType(const DecayedType *T)
SourceLocation getLocStart() const LLVM_READONLY
protocol_iterator protocol_begin() const
SourceLocation getAmpAmpLoc() const
QualType getExtVectorType(QualType VectorType, unsigned NumElts) const
Return the unique reference to an extended vector type of the specified element type and size...
FieldDecl - An instance of this class is created by Sema::ActOnField to represent a member of a struc...
bool isCompleteDefinition() const
isCompleteDefinition - Return true if this decl has its body fully specified.
void setTypeParamList(ObjCTypeParamList *TPL)
Set the type parameters of this class.
QualType VisitParenType(const ParenType *T)
bool isMemberInitializer() const
Determine whether this initializer is initializing a non-static data member.
unsigned getManglingNumber() const
One instance of this struct is kept for every file loaded or used.
bool isPure() const
Whether this virtual function is pure, i.e.
SourceLocation getRParen() const
Get the location of the right parentheses ')'.
void startDefinition()
Starts the definition of this tag declaration.
void setSuperClass(TypeSourceInfo *superClass)
GNUNullExpr - Implements the GNU __null extension, which is a name for a null pointer constant that h...
SourceLocation getCaseLoc() const
CXXRecordDecl * getDefinition() const
unsigned size() const
Retrieve the number of template arguments in this template argument list.
SourceLocation getGetterNameLoc() const
TagKind getTagKind() const
bool hasSameType(QualType T1, QualType T2) const
Determine whether the given types T1 and T2 are equivalent.
static DeclRefExpr * Create(const ASTContext &Context, NestedNameSpecifierLoc QualifierLoc, SourceLocation TemplateKWLoc, ValueDecl *D, bool RefersToEnclosingVariableOrCapture, SourceLocation NameLoc, QualType T, ExprValueKind VK, NamedDecl *FoundD=nullptr, const TemplateArgumentListInfo *TemplateArgs=nullptr)
QualType getTypeOfType(QualType t) const
getTypeOfType - Unlike many "get<Type>" functions, we don't unique TypeOfType nodes...
Expr * VisitExpr(Expr *E)
Decl * VisitObjCImplementationDecl(ObjCImplementationDecl *D)
SourceLocation getLBracLoc() const
Represents an access specifier followed by colon ':'.
void startDefinition()
Starts the definition of this Objective-C protocol.
llvm::PointerUnion< NamedDecl *, TypeSourceInfo * > FriendUnion
static CXXRecordDecl * CreateLambda(const ASTContext &C, DeclContext *DC, TypeSourceInfo *Info, SourceLocation Loc, bool DependentLambda, bool IsGeneric, LambdaCaptureDefault CaptureDefault)
bool isNull() const
Determine whether this is the empty selector.
QualType getTypeDeclType(const TypeDecl *Decl, const TypeDecl *PrevDecl=nullptr) const
Return the unique reference to the type for the specified type declaration.
QualType VisitObjCInterfaceType(const ObjCInterfaceType *T)
SourceLocation getRParenLoc() const
TypeSourceInfo * getNamedTypeInfo() const
getNamedTypeInfo - Returns the source type info associated to the name.
QualType getUnderlyingType() const
bool hasBraces() const
Determines whether this linkage specification had braces in its syntactic form.
QualType VisitComplexType(const ComplexType *T)
SourceLocation getCategoryNameLoc() const
StorageClass getStorageClass() const
Returns the storage class as written in the source.
Expr * getUnderlyingExpr() const
static OffsetOfExpr * Create(const ASTContext &C, QualType type, SourceLocation OperatorLoc, TypeSourceInfo *tsi, ArrayRef< OffsetOfNode > comps, ArrayRef< Expr * > exprs, SourceLocation RParenLoc)
Decl * VisitFriendDecl(FriendDecl *D)
const VarDecl * getCatchParamDecl() const
SourceLocation getColonLoc() const
Retrieve the location of the ':' separating the type parameter name from the explicitly-specified bou...
SourceLocation getWhileLoc() const
Represents Objective-C's @catch statement.
const CompoundStmt * getSynchBody() const
const VarDecl * getNRVOCandidate() const
Retrieve the variable that might be used for the named return value optimization. ...
IndirectGotoStmt - This represents an indirect goto.
Describes an C or C++ initializer list.
QualType VisitVariableArrayType(const VariableArrayType *T)
Stmt * VisitBreakStmt(BreakStmt *S)
bool ImportArrayChecked(const InContainerTy &InContainer, OIter Obegin)
Decl * VisitCXXConstructorDecl(CXXConstructorDecl *D)
An rvalue reference type, per C++11 [dcl.ref].
param_type_range param_types() const
SourceLocation getLAngleLoc() const
IdentifierInfo * getOutputIdentifier(unsigned i) const
QualType getParenType(QualType NamedType) const
const Stmt * getFinallyBody() const
ForStmt - This represents a 'for (init;cond;inc)' stmt.
A qualified template name, where the qualification is kept to describe the source code as written...
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier (with source-location information) that qualifies the name of this...
bool isParameterPack() const
Whether this parameter is a non-type template parameter pack.
SourceLocation getLocWithOffset(int Offset) const
Return a source location with the specified offset from this SourceLocation.
static ObjCInterfaceDecl * Create(const ASTContext &C, DeclContext *DC, SourceLocation atLoc, IdentifierInfo *Id, ObjCTypeParamList *typeParamList, ObjCInterfaceDecl *PrevDecl, SourceLocation ClassLoc=SourceLocation(), bool isInternal=false)
QualType VisitElaboratedType(const ElaboratedType *T)
static DeclAccessPair make(NamedDecl *D, AccessSpecifier AS)
const LangOptions & getLangOpts() const
ObjCBridgeCastKind getBridgeKind() const
Determine which kind of bridge is being performed via this cast.
Stmt * VisitAttributedStmt(AttributedStmt *S)
Namespaces, declared with 'namespace foo {}'.
bool isImplicit() const
isImplicit - Indicates whether the declaration was implicitly generated by the implementation.
bool isInline() const
Returns true if this is an inline namespace declaration.
IndirectFieldDecl * getIndirectMember() const
ObjCTypeParamList * getTypeParamList() const
Retrieve the type parameter list associated with this category or extension.
void setCXXOperatorNameRange(SourceRange R)
setCXXOperatorNameRange - Sets the range of the operator name (without the operator keyword)...
SourceLocation getIvarLBraceLoc() const
A convenient class for passing around template argument information.
SourceLocation getSuperClassLoc() const
Retrieve the starting location of the superclass.
const ValueDecl * getExtendingDecl() const
Get the declaration which triggered the lifetime-extension of this temporary, if any.
static ObjCCategoryDecl * Create(ASTContext &C, DeclContext *DC, SourceLocation AtLoc, SourceLocation ClassNameLoc, SourceLocation CategoryNameLoc, IdentifierInfo *Id, ObjCInterfaceDecl *IDecl, ObjCTypeParamList *typeParamList, SourceLocation IvarLBraceLoc=SourceLocation(), SourceLocation IvarRBraceLoc=SourceLocation())
QualType getBaseType() const
Gets the base type of this object type.
ImplicitParamKind getParameterKind() const
Returns the implicit parameter kind.
TemplateName getTemplateName() const
Retrieve the name of the template that we are specializing.
SourceLocation getAtFinallyLoc() const
static ObjCPropertyImplDecl * Create(ASTContext &C, DeclContext *DC, SourceLocation atLoc, SourceLocation L, ObjCPropertyDecl *property, Kind PK, ObjCIvarDecl *ivarDecl, SourceLocation ivarLoc)
protocol_iterator protocol_end() const
QualType getReturnType() const
static EnumConstantDecl * Create(ASTContext &C, EnumDecl *DC, SourceLocation L, IdentifierInfo *Id, QualType T, Expr *E, const llvm::APSInt &V)
SourceLocation getEllipsisLoc() const
For a pack expansion, determine the location of the ellipsis.
SourceLocation getRParenLoc() const
Stmt * getHandlerBlock() const
Expr * getInitializer()
The initializer of this new-expression.
path_iterator path_begin()
SourceLocation getLParen() const
Get the location of the left parentheses '('.
TemplateArgument getArgumentPack() const
Retrieve the template template argument pack with which this parameter was substituted.
QualType VisitTemplateTypeParmType(const TemplateTypeParmType *T)
TemplateName getSubstTemplateTemplateParm(TemplateTemplateParmDecl *param, TemplateName replacement) const
const ArrayType * getAsArrayType(QualType T) const
Type Query functions.
Decl * VisitObjCPropertyDecl(ObjCPropertyDecl *D)
Represents a typeof (or typeof) expression (a GCC extension).
Expr * VisitCharacterLiteral(CharacterLiteral *E)
const Expr * getSubExpr() const
static TemplateTypeParmDecl * Create(const ASTContext &C, DeclContext *DC, SourceLocation KeyLoc, SourceLocation NameLoc, unsigned D, unsigned P, IdentifierInfo *Id, bool Typename, bool ParameterPack)
SourceLocation getRParenLoc() const
A builtin binary operation expression such as "x + y" or "x <= y".
SourceLocation getLocation() const
static ObjCTypeParamList * create(ASTContext &ctx, SourceLocation lAngleLoc, ArrayRef< ObjCTypeParamDecl * > typeParams, SourceLocation rAngleLoc)
Create a new Objective-C type parameter list.
void setLambdaMangling(unsigned ManglingNumber, Decl *ContextDecl)
Set the mangling number and context declaration for a lambda class.
InitializationStyle getInitializationStyle() const
The kind of initializer this new-expression has.
bool isValueDependent() const
isValueDependent - Determines whether this expression is value-dependent (C++ [temp.dep.constexpr]).
QualifiedTemplateName * getAsQualifiedTemplateName() const
Retrieve the underlying qualified template name structure, if any.
RecordDecl * getDecl() const
static CXXTryStmt * Create(const ASTContext &C, SourceLocation tryLoc, Stmt *tryBlock, ArrayRef< Stmt * > handlers)
Decl * VisitObjCPropertyImplDecl(ObjCPropertyImplDecl *D)
CXXForRangeStmt - This represents C++0x [stmt.ranged]'s ranged for statement, represented as 'for (ra...
Selector getSetterName() const
Stmt * VisitObjCAtFinallyStmt(ObjCAtFinallyStmt *S)
StringRef getName() const
LabelStmt * getStmt() const
ObjCProtocolDecl * getDefinition()
Retrieve the definition of this protocol, if any.
SourceLocation getLocStart() const LLVM_READONLY
void setSpecializationKind(TemplateSpecializationKind TSK)
SourceLocation getFileLoc(SourceLocation Loc) const
Given Loc, if it is a macro location return the expansion location or the spelling location...
bool declaresSameEntity(const Decl *D1, const Decl *D2)
Determine whether two declarations declare the same entity.
const Stmt * getCatchBody() const
Decl * VisitObjCProtocolDecl(ObjCProtocolDecl *D)
bool isDelegatingInitializer() const
Determine whether this initializer is creating a delegating constructor.
NestedNameSpecifier * getQualifier() const
Retrieve the qualification on this type.
CastExpr - Base class for type casts, including both implicit casts (ImplicitCastExpr) and explicit c...
FieldDecl * getField()
Get the field whose initializer will be used.
Helper class for OffsetOfExpr.
Represents an Objective-C protocol declaration.
Represents binding an expression to a temporary.
const ObjCAtCatchStmt * getCatchStmt(unsigned I) const
Retrieve a @catch statement.
StringLiteral * getClobberStringLiteral(unsigned i)
bool IsStructurallyEquivalent(QualType From, QualType To, bool Complain=true)
Determine whether the given types are structurally equivalent.
DeclContext * getLexicalDeclContext()
getLexicalDeclContext - The declaration context where this Decl was lexically declared (LexicalDC)...
NestedNameSpecifierLoc getWithLocInContext(ASTContext &Context) const
Retrieve a nested-name-specifier with location information, copied into the given AST context...
CXXTemporary * getTemporary()
NestedNameSpecifier * getQualifier() const
Return the nested name specifier that qualifies this name.
static VarDecl * Create(ASTContext &C, DeclContext *DC, SourceLocation StartLoc, SourceLocation IdLoc, IdentifierInfo *Id, QualType T, TypeSourceInfo *TInfo, StorageClass S)
static IntegerLiteral * Create(const ASTContext &C, const llvm::APInt &V, QualType type, SourceLocation l)
Returns a new integer literal with value 'V' and type 'type'.
Stmt * VisitNullStmt(NullStmt *S)
TypeSourceInfo * getTypeInfoAsWritten() const
getTypeInfoAsWritten - Returns the type source info for the type that this expression is casting to...
void setProtocolList(ObjCProtocolDecl *const *List, unsigned Num, const SourceLocation *Locs, ASTContext &C)
setProtocolList - Set the list of protocols that this interface implements.
Stmt * VisitCXXCatchStmt(CXXCatchStmt *S)
TemplateSpecializationKind getSpecializationKind() const
Determine the kind of specialization that this declaration represents.
SourceLocation getLocStart() const LLVM_READONLY
Represents an ObjC class declaration.
SourceLocation getLocEnd() const LLVM_READONLY
CleanupObject getObject(unsigned i) const
Represents a linkage specification.
Stmt * VisitCXXTryStmt(CXXTryStmt *S)
detail::InMemoryDirectory::const_iterator I
PropertyAttributeKind getPropertyAttributes() const
FunctionDecl * SourceDecl
The function whose exception specification this is, for EST_Unevaluated and EST_Uninstantiated.
bool ImportDefinition(RecordDecl *From, RecordDecl *To, ImportDefinitionKind Kind=IDK_Default)
SourceLocation getLParenLoc() const
ASTImporter(ASTContext &ToContext, FileManager &ToFileManager, ASTContext &FromContext, FileManager &FromFileManager, bool MinimalImport)
Create a new AST importer.
known_categories_range known_categories() const
SourceLocation getUsedLocation() const
Retrieve the location where this default argument was actually used.
CanQualType UnsignedCharTy
A default argument (C++ [dcl.fct.default]).
Expr * VisitGNUNullExpr(GNUNullExpr *E)
static FunctionDecl * Create(ASTContext &C, DeclContext *DC, SourceLocation StartLoc, SourceLocation NLoc, DeclarationName N, QualType T, TypeSourceInfo *TInfo, StorageClass SC, bool isInlineSpecified=false, bool hasWrittenPrototype=true, bool isConstexprSpecified=false)
Expr * VisitSubstNonTypeTemplateParmExpr(SubstNonTypeTemplateParmExpr *E)
ExpressionTrait getTrait() const
SourceLocation getIvarLBraceLoc() const
Import the default subset of the definition, which might be nothing (if minimal import is set) or mig...
SourceLocation getSwitchLoc() const
void addDeclInternal(Decl *D)
Add the declaration D into this context, but suppress searches for external declarations with the sam...
SourceLocation getAtStartLoc() const
Stmt * VisitDeclStmt(DeclStmt *S)
Represents the this expression in C++.
bool hadMultipleCandidates() const
Whether the referred constructor was resolved from an overloaded set having size greater than 1...
DiagnosticsEngine & getDiagnostics() const
Class that aids in the construction of nested-name-specifiers along with source-location information ...
SourceLocation getLoc() const
getLoc - Returns the main location of the declaration name.
SourceLocation getAtLoc() const
SourceLocation getBuiltinLoc() const
bool IsStructurallyEquivalent(Decl *D1, Decl *D2)
Determine whether the two declarations are structurally equivalent.
EnumDecl * getDecl() const
bool isKNRPromoted() const
True if the value passed to this parameter must undergo K&R-style default argument promotion: ...
static ImplicitParamDecl * Create(ASTContext &C, DeclContext *DC, SourceLocation IdLoc, IdentifierInfo *Id, QualType T, ImplicitParamKind ParamKind)
Create implicit parameter.
Represents a K&R-style 'int foo()' function, which has no information available about its arguments...
ObjCPropertyImplDecl - Represents implementation declaration of a property in a class or category imp...
SourceLocation getOperatorLoc() const LLVM_READONLY
TypeSourceInfo * getTypeAsWritten() const
Gets the type of this specialization as it was written by the user, if it was so written.
Decl * VisitTypedefNameDecl(TypedefNameDecl *D, bool IsAlias)
FunctionDecl * getOperatorDelete() const
QualType getValueType() const
Gets the type contained by this atomic type, i.e.
Optional< unsigned > getNumTemplateExpansions() const
Retrieve the number of expansions that a template template argument expansion will produce...
const FileEntry * getFile(StringRef Filename, bool OpenFile=false, bool CacheFailure=true)
Lookup, cache, and verify the specified file (real or virtual).
void completeDefinition(QualType NewType, QualType PromotionType, unsigned NumPositiveBits, unsigned NumNegativeBits)
completeDefinition - When created, the EnumDecl corresponds to a forward-declared enum...
QualType getInjectedSpecializationType() const
Decl * VisitCXXDestructorDecl(CXXDestructorDecl *D)
bool isThisDeclarationADefinition() const
Determine whether this particular declaration is also the definition.
ConditionalOperator - The ?: ternary operator.
SourceLocation getLocStart() const LLVM_READONLY
QualType VisitObjCObjectType(const ObjCObjectType *T)
ExtInfo getExtInfo() const
SourceLocation getTryLoc() const
QualType getObjCObjectType(QualType Base, ObjCProtocolDecl *const *Protocols, unsigned NumProtocols) const
Legacy interface: cannot provide type arguments or __kindof.
llvm::APInt getValue() const
TypeAliasDecl - Represents the declaration of a typedef-name via a C++0x alias-declaration.
A little helper class used to produce diagnostics.
CompoundStmt - This represents a group of statements like { stmt stmt }.
SourceLocation getAsmLoc() const
Represents a prototype with parameter type info, e.g.
IdentifierInfo * getFieldName() const
Decl * VisitRecordDecl(RecordDecl *D)
SourceLocation getLocStart() const LLVM_READONLY
unsigned getPosition() const
Get the position of the template parameter within its parameter list.
Decl * VisitCXXConversionDecl(CXXConversionDecl *D)
ObjCPropertyImplDecl * FindPropertyImplDecl(IdentifierInfo *propertyId, ObjCPropertyQueryKind queryKind) const
FindPropertyImplDecl - This method looks up a previous ObjCPropertyImplDecl added to the list of thos...
unsigned getNumObjects() const
CastKind
CastKind - The kind of operation required for a conversion.
static ImplicitCastExpr * Create(const ASTContext &Context, QualType T, CastKind Kind, Expr *Operand, const CXXCastPath *BasePath, ExprValueKind Cat)
Expr * getQueriedExpression() const
DeclarationNameTable DeclarationNames
A dependent template name that has not been resolved to a template (or set of templates).
unsigned getChainingSize() const
Expr * VisitArrayInitLoopExpr(ArrayInitLoopExpr *E)
UnaryExprOrTypeTraitExpr - expression with either a type or (unevaluated) expression operand...
decl_range noload_decls() const
noload_decls_begin/end - Iterate over the declarations stored in this context that are currently load...
protocol_loc_iterator protocol_loc_begin() const
NamedDecl * getDecl() const
Stmt * VisitObjCForCollectionStmt(ObjCForCollectionStmt *S)
void setTypeParamList(ObjCTypeParamList *TPL)
Set the type parameters of this category.
bool isInstantiationDependent() const
Whether this expression is instantiation-dependent, meaning that it depends in some way on a template...
ImportDefinitionKind
What we should import from the definition.
static CXXDefaultArgExpr * Create(const ASTContext &C, SourceLocation Loc, ParmVarDecl *Param)
Represents a call to the builtin function __builtin_va_arg.
QualType getAtomicType(QualType T) const
Return the uniqued reference to the atomic type for the specified type.
SourceLocation getSuperClassLoc() const
FunctionDecl * getOperatorDelete() const
static StaticAssertDecl * Create(ASTContext &C, DeclContext *DC, SourceLocation StaticAssertLoc, Expr *AssertExpr, StringLiteral *Message, SourceLocation RParenLoc, bool Failed)
StorageClass getStorageClass() const
Returns the storage class as written in the source.
void setInClassInitializer(Expr *Init)
setInClassInitializer - Set the C++11 in-class initializer for this member.
SourceLocation getColonLoc() const
QualType getObjCInterfaceType(const ObjCInterfaceDecl *Decl, ObjCInterfaceDecl *PrevDecl=nullptr) const
getObjCInterfaceType - Return the unique reference to the type for the specified ObjC interface decl...
NameKind getNameKind() const
getNameKind - Determine what kind of name this is.
SourceLocation getThrowLoc() const LLVM_READONLY
static unsigned getNumSubExprs(AtomicOp Op)
Determine the number of arguments the specified atomic builtin should have.
bool requiresZeroInitialization() const
Whether this construction first requires zero-initialization before the initializer is called...
static NestedNameSpecifier * SuperSpecifier(const ASTContext &Context, CXXRecordDecl *RD)
Returns the nested name specifier representing the __super scope for the given CXXRecordDecl.
static CXXDestructorDecl * Create(ASTContext &C, CXXRecordDecl *RD, SourceLocation StartLoc, const DeclarationNameInfo &NameInfo, QualType T, TypeSourceInfo *TInfo, bool isInline, bool isImplicitlyDeclared)
SpecifierKind getKind() const
Determine what kind of nested name specifier is stored.
Expr * VisitParenExpr(ParenExpr *E)
LabelDecl * getDecl() const
unsigned getNumExprs() const
An expression "T()" which creates a value-initialized rvalue of type T, which is a non-class type...
SourceLocation getVarianceLoc() const
Retrieve the location of the variance keyword.
void setGetterMethodDecl(ObjCMethodDecl *gDecl)
VarTemplateDecl * getDescribedVarTemplate() const
Retrieves the variable template that is described by this variable declaration.
BlockDecl - This represents a block literal declaration, which is like an unnamed FunctionDecl...
IdentifierInfo * getInputIdentifier(unsigned i) const
llvm::MutableArrayRef< Designator > designators()
QualType getPointeeType() const
ValueDecl - Represent the declaration of a variable (in which case it is an lvalue) a function (in wh...
Expr - This represents one expression.
Stmt * VisitGotoStmt(GotoStmt *S)
StringRef getName() const
Return the actual identifier string.
Decl * VisitEnumConstantDecl(EnumConstantDecl *D)
SourceLocation getRParenLoc() const
static ObjCMethodDecl * Create(ASTContext &C, SourceLocation beginLoc, SourceLocation endLoc, Selector SelInfo, QualType T, TypeSourceInfo *ReturnTInfo, DeclContext *contextDecl, bool isInstance=true, bool isVariadic=false, bool isPropertyAccessor=false, bool isImplicitlyDeclared=false, bool isDefined=false, ImplementationControl impControl=None, bool HasRelatedResultType=false)
ExprValueKind
The categorization of expression values, currently following the C++11 scheme.
static ClassTemplatePartialSpecializationDecl * Create(ASTContext &Context, TagKind TK, DeclContext *DC, SourceLocation StartLoc, SourceLocation IdLoc, TemplateParameterList *Params, ClassTemplateDecl *SpecializedTemplate, ArrayRef< TemplateArgument > Args, const TemplateArgumentListInfo &ArgInfos, QualType CanonInjectedType, ClassTemplatePartialSpecializationDecl *PrevDecl)
SourceLocation getLParenLoc() const
Stmt * VisitCXXForRangeStmt(CXXForRangeStmt *S)
unsigned getNumArgs() const
bool isEmpty() const
Evaluates true when this declaration name is empty.
SourceLocation getLocStart() const LLVM_READONLY
Declaration of a template type parameter.
void setSetterMethodDecl(ObjCMethodDecl *gDecl)
bool isListInitialization() const
Whether this constructor call was written as list-initialization.
TemplateDecl * getCXXDeductionGuideTemplate() const
If this name is the name of a C++ deduction guide, return the template associated with that name...
VarDecl * getConditionVariable() const
Retrieve the variable declared in this "while" statement, if any.
SourceLocation getLocation() const
Retrieve the location of this expression.
FileID createFileID(const FileEntry *SourceFile, SourceLocation IncludePos, SrcMgr::CharacteristicKind FileCharacter, int LoadedID=0, unsigned LoadedOffset=0)
Create a new FileID that represents the specified file being #included from the specified IncludePosi...
bool wasDeclaredWithTypename() const
Whether this template type parameter was declared with the 'typename' keyword.
ObjCIvarDecl * getPropertyIvarDecl() const
Expr * VisitDeclRefExpr(DeclRefExpr *E)
protocol_iterator protocol_begin() const
void setSyntacticForm(InitListExpr *Init)
Represents a C++ functional cast expression that builds a temporary object.
The template argument is a null pointer or null pointer to member that was provided for a non-type te...
SourceLocation getLBraceLoc() const
TemplateName getOverloadedTemplateName(UnresolvedSetIterator Begin, UnresolvedSetIterator End) const
Retrieve the template name that corresponds to a non-empty lookup.
Expr * getBitWidth() const
ArrayRef< NamedDecl * > chain() const
SourceLocation getRParenLoc() const
bool IsStructuralMatch(RecordDecl *FromRecord, RecordDecl *ToRecord, bool Complain=true)
unsigned getNumExpressions() const
Represents a C++ destructor within a class.
TranslationUnitDecl * getTranslationUnitDecl() const
SourceLocation getGotoLoc() const
Expr * getUnderlyingExpr() const
void setRBraceLoc(SourceLocation L)
Stmt * VisitIfStmt(IfStmt *S)
AccessSpecifier getAccessSpecifierAsWritten() const
Retrieves the access specifier as written in the source code (which may mean that no access specifier...
QualType getNamedType() const
Retrieve the type named by the qualified-id.
static CXXStaticCastExpr * Create(const ASTContext &Context, QualType T, ExprValueKind VK, CastKind K, Expr *Op, const CXXCastPath *Path, TypeSourceInfo *Written, SourceLocation L, SourceLocation RParenLoc, SourceRange AngleBrackets)
ArgKind getKind() const
Return the kind of stored template argument.
SourceLocation getLocation() const
ExtProtoInfo getExtProtoInfo() const
SourceLocation getEqualOrColonLoc() const
Retrieve the location of the '=' that precedes the initializer value itself, if present.
Decl * VisitLinkageSpecDecl(LinkageSpecDecl *D)
Expr * VisitArrayTypeTraitExpr(ArrayTypeTraitExpr *E)
static ObjCTypeParamDecl * Create(ASTContext &ctx, DeclContext *dc, ObjCTypeParamVariance variance, SourceLocation varianceLoc, unsigned index, SourceLocation nameLoc, IdentifierInfo *name, SourceLocation colonLoc, TypeSourceInfo *boundInfo)
Expr * VisitAddrLabelExpr(AddrLabelExpr *E)
Expr * VisitMaterializeTemporaryExpr(MaterializeTemporaryExpr *E)
DeclContext * getDeclContext()
Decl * VisitAccessSpecDecl(AccessSpecDecl *D)
A structure for storing the information associated with a substituted template template parameter...
QualType VisitFunctionNoProtoType(const FunctionNoProtoType *T)
ConstructionKind getConstructionKind() const
Determine whether this constructor is actually constructing a base class (rather than a complete obje...
ParmVarDecl *const * param_iterator
Represents Objective-C's @synchronized statement.
const char * getDeclKindName() const
SubstTemplateTemplateParmPackStorage * getAsSubstTemplateTemplateParmPack() const
Retrieve the substituted template template parameter pack, if known.
static TemplateParameterList * Create(const ASTContext &C, SourceLocation TemplateLoc, SourceLocation LAngleLoc, ArrayRef< NamedDecl * > Params, SourceLocation RAngleLoc, Expr *RequiresClause)
CXXTryStmt - A C++ try block, including all handlers.
protocol_iterator protocol_begin() const
Expr * VisitPredefinedExpr(PredefinedExpr *E)
NonTypeTemplateParmDecl - Declares a non-type template parameter, e.g., "Size" in.
static FloatingLiteral * Create(const ASTContext &C, const llvm::APFloat &V, bool isexact, QualType Type, SourceLocation L)
Represents a C++ template name within the type system.
Represents the type decltype(expr) (C++11).
QualType VisitConstantArrayType(const ConstantArrayType *T)
A namespace alias, stored as a NamespaceAliasDecl*.
ArrayRef< Expr * > inits()
void setImplementation(ObjCImplementationDecl *ImplD)
void setConstexpr(bool IC)
Expr * VisitCXXDeleteExpr(CXXDeleteExpr *E)
bool isParameterPack() const
Whether this template template parameter is a template parameter pack.
SourceRange getAngleBrackets() const LLVM_READONLY
SourceLocation getMemberLocation() const
SourceLocation getEndLoc() const
Stmt * VisitObjCAtTryStmt(ObjCAtTryStmt *S)
const SwitchCase * getSwitchCaseList() const
SourceLocation getQuestionLoc() const
Expr * VisitCXXThisExpr(CXXThisExpr *E)
bool isScoped() const
Returns true if this is a C++11 scoped enumeration.
Expr * getSubExpr() const
bool isIndirectMemberInitializer() const
SourceLocation getLabelLoc() const
bool hasRelatedResultType() const
Determine whether this method has a result type that is related to the message receiver's type...
bool isInstanceMethod() const
bool isFunctionOrMethod() const
void ImportDeclarationNameLoc(const DeclarationNameInfo &From, DeclarationNameInfo &To)
QualType getCXXNameType() const
getCXXNameType - If this name is one of the C++ names (of a constructor, destructor, or conversion function), return the type associated with that name.
Decl * GetAlreadyImportedOrNull(Decl *FromD)
Return the copy of the given declaration in the "to" context if it has already been imported from the...
TemplateName getAsTemplateOrTemplatePattern() const
Retrieve the template argument as a template name; if the argument is a pack expansion, return the pattern as a template name.
ReturnStmt - This represents a return, optionally of an expression: return; return 4;...
const TemplateArgument * data() const
Retrieve a pointer to the template argument list.
unsigned getNumComponents() const
Expr * VisitCXXDefaultArgExpr(CXXDefaultArgExpr *E)
CXXBaseSpecifier * getBase() const
For a base class node, returns the base specifier.
UnaryOperator - This represents the unary-expression's (except sizeof and alignof), the postinc/postdec operators from postfix-expression, and various extensions.
Expr * getDimensionExpression() const
Represents a GCC generic vector type.
An lvalue reference type, per C++11 [dcl.ref].
DeclarationName getDeclName() const
getDeclName - Get the actual, stored name of the declaration, which may be a special name...
TemplateTemplateParmDecl - Declares a template template parameter, e.g., "T" in.
Stmt * VisitReturnStmt(ReturnStmt *S)
ClassTemplateDecl * getSpecializedTemplate() const
Retrieve the template that this specialization specializes.
Represents a reference to a non-type template parameter that has been substituted with a template arg...
SourceLocation getFriendLoc() const
Retrieves the location of the 'friend' keyword.
static AttributedStmt * Create(const ASTContext &C, SourceLocation Loc, ArrayRef< const Attr * > Attrs, Stmt *SubStmt)
const Type * getAsType() const
Retrieve the type stored in this nested name specifier.
void setDescribedClassTemplate(ClassTemplateDecl *Template)
QualType getElementType() const
QualType getComputationLHSType() const
Represents a C++ conversion function within a class.
The result type of a method or function.
CStyleCastExpr - An explicit cast in C (C99 6.5.4) or a C-style cast in C++ (C++ [expr.cast]), which uses the syntax (Type)expr.
RecordDecl * getDefinition() const
getDefinition - Returns the RecordDecl that actually defines this struct/union/class.
A type, stored as a Type*.
NestedNameSpecifierLoc getQualifierLoc() const
If the name was qualified, retrieves the nested-name-specifier that precedes the name, with source-location information.
Expr * getLHS()
An array access can be written A[4] or 4[A] (both are equivalent).
SourceLocation getLParenLoc() const
SourceLocation getSemiLoc() const
TypeSourceInfo * getTypeSourceInfo() const
QualType getReplacementType() const
Gets the type that was substituted for the template parameter.
TypedefNameDecl * getTypedefNameForAnonDecl() const
const Expr * getAnyInitializer() const
getAnyInitializer - Get the initializer for this variable, no matter which declaration it is attached...
SourceLocation getAtLoc() const
TypeSourceInfo * getReturnTypeSourceInfo() const
bool isConstexpr() const
Whether this is a (C++11) constexpr function or constexpr constructor.
Decl * VisitObjCMethodDecl(ObjCMethodDecl *D)
unsigned getNumSubExprs() const
Retrieve the total number of subexpressions in this designated initializer expression, including the actual initialized value and any expressions that occur within array and array-range designators.
TemplateName getQualifiedTemplateName(NestedNameSpecifier *NNS, bool TemplateKeyword, TemplateDecl *Template) const
Retrieve the template name that represents a qualified template name such as std::vector.
bool isVirtualAsWritten() const
Whether this function is marked as virtual explicitly.
static CXXRecordDecl * Create(const ASTContext &C, TagKind TK, DeclContext *DC, SourceLocation StartLoc, SourceLocation IdLoc, IdentifierInfo *Id, CXXRecordDecl *PrevDecl=nullptr, bool DelayTypeCreation=false)
DoStmt - This represents a 'do/while' stmt.
ObjCCategoryDecl * getCategoryDecl() const
param_const_iterator param_end() const
bool isArrayRangeDesignator() const
QualType getComputationResultType() const
QualType VisitEnumType(const EnumType *T)
LabelDecl * getLabel() const
ArrayRef< ParmVarDecl * > parameters() const
const TemplateTypeParmType * getReplacedParameter() const
Gets the template parameter that was substituted for.
Stmt * getBody(const FunctionDecl *&Definition) const
getBody - Retrieve the body (definition) of the function.
SpecifierKind
The kind of specifier that completes this nested name specifier.
SourceLocation getOperatorLoc() const
SourceLocation getLocStart() const LLVM_READONLY
NamespaceDecl * getAsNamespace() const
Retrieve the namespace stored in this nested name specifier.
Expr * VisitParenListExpr(ParenListExpr *E)
A template template parameter pack that has been substituted for a template template argument pack...
CanThrowResult
Possible results from evaluation of a noexcept expression.
SourceLocation getDotLoc() const
ASTContext & getFromContext() const
Retrieve the context that AST nodes are being imported from.
TypeLoc getTypeLoc() const
Return the TypeLoc wrapper for the type source info.
bool cleanupsHaveSideEffects() const
OpaqueValueExpr - An expression referring to an opaque object of a fixed type and value class...
SourceLocation getGotoLoc() const
SourceLocation getLocEnd() const LLVM_READONLY
SourceLocation getExternLoc() const
const StringLiteral * getAsmString() const
SelectorTable & Selectors
static CXXConstCastExpr * Create(const ASTContext &Context, QualType T, ExprValueKind VK, Expr *Op, TypeSourceInfo *WrittenTy, SourceLocation L, SourceLocation RParenLoc, SourceRange AngleBrackets)
static CXXBindTemporaryExpr * Create(const ASTContext &C, CXXTemporary *Temp, Expr *SubExpr)
A field in a dependent type, known only by its name.
Decl * VisitIndirectFieldDecl(IndirectFieldDecl *D)
ExceptionSpecificationType Type
The kind of exception specification this is.
static ClassTemplateSpecializationDecl * Create(ASTContext &Context, TagKind TK, DeclContext *DC, SourceLocation StartLoc, SourceLocation IdLoc, ClassTemplateDecl *SpecializedTemplate, ArrayRef< TemplateArgument > Args, ClassTemplateSpecializationDecl *PrevDecl)
void setKNRPromoted(bool promoted)
Decl * VisitTemplateTypeParmDecl(TemplateTypeParmDecl *D)
SourceLocation getLocStart() const LLVM_READONLY
void MakeSuper(ASTContext &Context, CXXRecordDecl *RD, SourceLocation SuperLoc, SourceLocation ColonColonLoc)
Turns this (empty) nested-name-specifier into '__super' nested-name-specifier.
Encodes a location in the source.
Sugar for parentheses used when specifying types.
IdentifierInfo & get(StringRef Name)
Return the identifier token info for the specified named identifier.
ExternalASTSource * getExternalSource() const
Retrieve a pointer to the external AST source associated with this AST context, if any...
const Type * getTypePtr() const
Retrieves a pointer to the underlying (unqualified) type.
A helper class that allows the use of isa/cast/dyncast to detect TagType objects of enums...
TemplateName getAsTemplate() const
Retrieve the template name for a template name argument.
QualType VisitFunctionProtoType(const FunctionProtoType *T)
QualType getElementType() const
Expr * getSourceExpr() const
The source expression of an opaque value expression is the expression which originally generated the ...
Represents a C++ temporary.
Represents typeof(type), a GCC extension.
Interfaces are the core concept in Objective-C for object oriented design.
const TemplateArgumentListInfo & getTemplateArgsInfo() const
SourceLocation getOperatorLoc() const
getOperatorLoc - Return the location of the operator.
QualType VisitBuiltinType(const BuiltinType *T)
SourceLocation getLocStart() const LLVM_READONLY
A structure for storing an already-substituted template template parameter pack.
bool isValid() const
Return true if this is a valid SourceLocation object.
OverloadedOperatorKind getCXXOverloadedOperator() const
getCXXOverloadedOperator - If this name is the name of an overloadable operator in C++ (e...
NonTypeTemplateParmDecl * getParameter() const
Represents a new-expression for memory allocation and constructor calls, e.g: "new CXXNewExpr(foo)"...
void setExternLoc(SourceLocation Loc)
Sets the location of the extern keyword.
TagDecl - Represents the declaration of a struct/union/class/enum.
TemplateName getDependentTemplateName(NestedNameSpecifier *NNS, const IdentifierInfo *Name) const
Retrieve the template name that represents a dependent template name such as MetaFun::template apply...
Represents a call to a member function that may be written either with member call syntax (e...
ASTContext & getASTContext() const LLVM_READONLY
TypeSourceInfo * getTrivialTypeSourceInfo(QualType T, SourceLocation Loc=SourceLocation()) const
Allocate a TypeSourceInfo where all locations have been initialized to a given location, which defaults to the empty location.
bool refersToEnclosingVariableOrCapture() const
Does this DeclRefExpr refer to an enclosing local or a captured variable?
SourceLocation getRParenLoc() const
DeclStmt - Adaptor class for mixing declarations with statements and expressions. ...
Decl * VisitTranslationUnitDecl(TranslationUnitDecl *D)
LabelDecl - Represents the declaration of a label.
void setPropertyAttributesAsWritten(PropertyAttributeKind PRVal)
const Expr * getCond() const
VectorKind getVectorKind() const
Cached information about one file (either on disk or in the virtual file system). ...
SourceLocation getIdentLoc() const
Decl * VisitNonTypeTemplateParmDecl(NonTypeTemplateParmDecl *D)
Expr * VisitMemberExpr(MemberExpr *E)
void setCtorInitializers(CXXCtorInitializer **Initializers)
QualType getTemplateSpecializationType(TemplateName T, ArrayRef< TemplateArgument > Args, QualType Canon=QualType()) const
SourceLocation getLocalBeginLoc() const
Retrieve the location of the beginning of this component of the nested-name-specifier.
SourceLocation getLocStart() const LLVM_READONLY
bool getSynthesize() const
Represents a static or instance method of a struct/union/class.
unsigned getDepth() const
Retrieve the depth of the template parameter.
static ExprWithCleanups * Create(const ASTContext &C, EmptyShell empty, unsigned numObjects)
bool shouldForceImportDeclContext(ImportDefinitionKind IDK)
StmtVisitor - This class implements a simple visitor for Stmt subclasses.
Expr * getRequiresClause()
The constraint-expression of the associated requires-clause.
Represents a C++ nested name specifier, such as "\::std::vector<int>::".
void addOverriddenMethod(const CXXMethodDecl *MD)
ArrayRef< ParmVarDecl * > parameters() const
bool isBaseVirtual() const
Returns whether the base is virtual or not.
SourceLocation getLBracketLoc() const
void setProtocolList(ObjCProtocolDecl *const *List, unsigned Num, const SourceLocation *Locs, ASTContext &C)
setProtocolList - Set the list of protocols that this interface implements.
void MakeGlobal(ASTContext &Context, SourceLocation ColonColonLoc)
Turn this (empty) nested-name-specifier into the global nested-name-specifier '::'.
QualType getIncompleteArrayType(QualType EltTy, ArrayType::ArraySizeModifier ASM, unsigned IndexTypeQuals) const
Return a unique reference to the type for an incomplete array of the specified element type...
Decl * VisitFunctionDecl(FunctionDecl *D)
ObjCCategoryDecl - Represents a category declaration.
const ObjCInterfaceDecl * getClassInterface() const
AtomicExpr - Variadic atomic builtins: __atomic_exchange, __atomic_fetch_*, __atomic_load, __atomic_store, and __atomic_compare_exchange_*, for the similarly-named C++11 instructions, and __c11 variants for <stdatomic.h>.
bool isPropertyAccessor() const
void addDecl(NamedDecl *D)
QualType VisitTypedefType(const TypedefType *T)
Expr * VisitCXXBindTemporaryExpr(CXXBindTemporaryExpr *E)
SourceLocation getContinueLoc() const
void setPointOfInstantiation(SourceLocation Loc)
const FileInfo & getFile() const
StringLiteral * getFunctionName()
SourceLocation getOperatorLoc() const
Retrieve the location of the cast operator keyword, e.g., static_cast.
SourceLocation getPointOfInstantiation() const
Get the point of instantiation (if any), or null if none.
const internal::VariadicDynCastAllOfMatcher< Decl, AccessSpecDecl > accessSpecDecl
Matches C++ access specifier declarations.
bool isPackExpansion() const
Determine whether this initializer is a pack expansion.
static CXXDefaultInitExpr * Create(const ASTContext &C, SourceLocation Loc, FieldDecl *Field)
Field is the non-static data member whose default initializer is used by this expression.
Represents one property declaration in an Objective-C interface.
VarDecl * getConditionVariable() const
Retrieve the variable declared in this "switch" statement, if any.
TypedefNameDecl * getDecl() const
void setProtocolList(ObjCProtocolDecl *const *List, unsigned Num, const SourceLocation *Locs, ASTContext &C)
setProtocolList - Set the list of protocols that this interface implements.
ASTNodeImporter(ASTImporter &Importer)
ImplicitCastExpr - Allows us to explicitly represent implicit type conversions, which have no direct ...
Stmt * VisitForStmt(ForStmt *S)
SubstTemplateTemplateParmStorage * getAsSubstTemplateTemplateParm() const
Retrieve the substituted template template parameter, if known.
A simple visitor class that helps create declaration visitors.
NamespaceAliasDecl * getAsNamespaceAlias() const
Retrieve the namespace alias stored in this nested name specifier.
SourceLocation getBegin() const
QualType getReturnType() const
static DesignatedInitExpr * Create(const ASTContext &C, llvm::ArrayRef< Designator > Designators, ArrayRef< Expr * > IndexExprs, SourceLocation EqualOrColonLoc, bool GNUSyntax, Expr *Init)
QualType getAttributedType(AttributedType::Kind attrKind, QualType modifiedType, QualType equivalentType)
QualType VisitRecordType(const RecordType *T)
QualType getAutoType(QualType DeducedType, AutoTypeKeyword Keyword, bool IsDependent) const
C++11 deduced auto type.
Decl * VisitVarTemplateDecl(VarTemplateDecl *D)
Stmt * VisitCompoundStmt(CompoundStmt *S)
Stmt * VisitIndirectGotoStmt(IndirectGotoStmt *S)
An expression trait intrinsic.
Decl * VisitImplicitParamDecl(ImplicitParamDecl *D)
Expr * VisitCXXBoolLiteralExpr(CXXBoolLiteralExpr *E)
ArrayRef< Expr * > exprs()
Represents a C++11 static_assert declaration.
SourceLocation getAtSynchronizedLoc() const
uint64_t getValue() const
bool isInlineSpecified() const
Determine whether the "inline" keyword was specified for this function.
Stmt * VisitWhileStmt(WhileStmt *S)
StmtExpr - This is the GNU Statement Expression extension: ({int X=4; X;}).
Attr * clone(ASTContext &C) const
Expr * VisitCallExpr(CallExpr *E)
Expr * getArrayFiller()
If this initializer list initializes an array with more elements than there are initializers in the l...
SourceLocation getCategoryNameLoc() const
Decl * VisitLabelDecl(LabelDecl *D)
QualType VisitObjCObjectPointerType(const ObjCObjectPointerType *T)
void setHasInheritedDefaultArg(bool I=true)
SourceLocation getForLoc() const
void sawArrayRangeDesignator(bool ARD=true)
bool passAlignment() const
Indicates whether the required alignment should be implicitly passed to the allocation function...
QualType getType() const
Return the type wrapped by this type source info.
void addArgument(const TemplateArgumentLoc &Loc)
static CXXReinterpretCastExpr * Create(const ASTContext &Context, QualType T, ExprValueKind VK, CastKind Kind, Expr *Op, const CXXCastPath *Path, TypeSourceInfo *WrittenTy, SourceLocation L, SourceLocation RParenLoc, SourceRange AngleBrackets)
static ClassTemplateDecl * Create(ASTContext &C, DeclContext *DC, SourceLocation L, DeclarationName Name, TemplateParameterList *Params, NamedDecl *Decl, Expr *AssociatedConstraints=nullptr)
Create a class template node.
SourceLocation getLParenLoc() const
ValueDecl * getAsDecl() const
Retrieve the declaration for a declaration non-type template argument.
static MemberExpr * Create(const ASTContext &C, Expr *base, bool isarrow, SourceLocation OperatorLoc, NestedNameSpecifierLoc QualifierLoc, SourceLocation TemplateKWLoc, ValueDecl *memberdecl, DeclAccessPair founddecl, DeclarationNameInfo MemberNameInfo, const TemplateArgumentListInfo *targs, QualType ty, ExprValueKind VK, ExprObjectKind OK)
const OffsetOfNode & getComponent(unsigned Idx) const
Represents a pointer type decayed from an array or function type.
SourceLocation getExprLoc() const LLVM_READONLY
getExprLoc - Return the preferred location for the arrow when diagnosing a problem with a generic exp...
The injected class name of a C++ class template or class template partial specialization.
ClassTemplateDecl * getDescribedClassTemplate() const
Retrieves the class template that is described by this class declaration.
QualType getPointeeType() const
SourceLocation getOperatorLoc() const
getOperatorLoc - Return the location of the operator.
void setVirtualAsWritten(bool V)
SourceLocation getRBracketLoc() const
static TypeAliasDecl * Create(ASTContext &C, DeclContext *DC, SourceLocation StartLoc, SourceLocation IdLoc, IdentifierInfo *Id, TypeSourceInfo *TInfo)
CompoundAssignOperator - For compound assignments (e.g.
ArrayRef< QualType > getTypeArgsAsWritten() const
Retrieve the type arguments of this object type as they were written.
A POD class for pairing a NamedDecl* with an access specifier.
const char * getTypeClassName() const
AddrLabelExpr - The GNU address of label extension, representing &&label.
An Objective-C "bridged" cast expression, which casts between Objective-C pointers and C pointers...
Base class for declarations which introduce a typedef-name.
ast_type_traits::DynTypedNode Node
An opaque identifier used by SourceManager which refers to a source file (MemoryBuffer) along with it...
bool isAnonymousStructOrUnion() const
isAnonymousStructOrUnion - Whether this is an anonymous struct or union.
Represents a template argument.
TemplateSpecializationKind getTemplateSpecializationKind() const
Determine whether this particular class is a specialization or instantiation of a class template or m...
Expr * getReplacement() const
SourceLocation getLocation() const
QualType getMemberPointerType(QualType T, const Type *Cls) const
Return the uniqued reference to the type for a member pointer to the specified type in the specified ...
bool ImportDeclParts(NamedDecl *D, DeclContext *&DC, DeclContext *&LexicalDC, DeclarationName &Name, NamedDecl *&ToD, SourceLocation &Loc)
QualType getAsType() const
Retrieve the type for a type template argument.
static DeclGroupRef Create(ASTContext &C, Decl **Decls, unsigned NumDecls)
VarDecl * getConditionVariable() const
Retrieve the variable declared in this "if" statement, if any.
NonEquivalentDeclSet & getNonEquivalentDecls()
Return the set of declarations that we know are not equivalent.
Expr * getCommon() const
getCommon - Return the common expression, written to the left of the condition.
Represents a template name that was expressed as a qualified name.
TypeSourceInfo * getTypeSourceInfo() const
Returns the declarator information for a base class or delegating initializer.
NullStmt - This is the null statement ";": C99 6.8.3p3.
Selector getObjCSelector() const
getObjCSelector - Get the Objective-C selector stored in this declaration name.
SourceLocation getColonLoc() const
The location of the colon following the access specifier.
TemplateName getSubstTemplateTemplateParmPack(TemplateTemplateParmDecl *Param, const TemplateArgument &ArgPack) const
ObjCCategoryDecl * FindCategoryDeclaration(IdentifierInfo *CategoryId) const
FindCategoryDeclaration - Finds category declaration in the list of categories for this class and ret...
Expr * VisitCXXNamedCastExpr(CXXNamedCastExpr *E)
static ParmVarDecl * Create(ASTContext &C, DeclContext *DC, SourceLocation StartLoc, SourceLocation IdLoc, IdentifierInfo *Id, QualType T, TypeSourceInfo *TInfo, StorageClass S, Expr *DefArg)
static LinkageSpecDecl * Create(ASTContext &C, DeclContext *DC, SourceLocation ExternLoc, SourceLocation LangLoc, LanguageIDs Lang, bool HasBraces)
const Expr * getSubExpr() const
virtual void CompleteDecl(Decl *D)
Called for ObjCInterfaceDecl, ObjCProtocolDecl, and TagDecl.
SourceRange getCXXOperatorNameRange() const
getCXXOperatorNameRange - Gets the range of the operator name (without the operator keyword)...
SourceLocation getLParenLoc() const
void setExtendingDecl(const ValueDecl *ExtendedBy, unsigned ManglingNumber)
ObjCCategoryImplDecl * getImplementation() const
QualType getDecayedType(QualType T) const
Return the uniqued reference to the decayed version of the given type.
void ImportDeclContext(DeclContext *FromDC, bool ForceImport=false)
bool hasTemplateKeyword() const
Whether the template name was prefixed by the "template" keyword.
bool hadMultipleCandidates() const
Returns true if this expression refers to a function that was resolved from an overloaded set having ...
static NonTypeTemplateParmDecl * Create(const ASTContext &C, DeclContext *DC, SourceLocation StartLoc, SourceLocation IdLoc, unsigned D, unsigned P, IdentifierInfo *Id, QualType T, bool ParameterPack, TypeSourceInfo *TInfo)
[C99 6.4.2.2] - A predefined identifier such as func.
void setGetterName(Selector Sel, SourceLocation Loc=SourceLocation())
DeclContext - This is used only as base class of specific decl types that can act as declaration cont...
Represents a delete expression for memory deallocation and destructor calls, e.g. ...
TemplateSpecializationKind getSpecializationKind() const
Determine the kind of specialization that this declaration represents.
SourceLocation getStarLoc() const
The base class of all kinds of template declarations (e.g., class, function, etc.).
TemplateArgument ImportTemplateArgument(const TemplateArgument &From)
bool hasUnparsedDefaultArg() const
hasUnparsedDefaultArg - Determines whether this parameter has a default argument that has not yet bee...
QualType VisitIncompleteArrayType(const IncompleteArrayType *T)
const TemplateArgumentList & getTemplateArgs() const
Retrieve the template arguments of the variable template specialization.
virtual Decl * Imported(Decl *From, Decl *To)
Note that we have imported the "from" declaration by mapping it to the (potentially-newly-created) "t...
const internal::VariadicAllOfMatcher< Type > type
Matches Types in the clang AST.
ObjCIvarDecl * getPropertyIvarDecl() const
const Stmt * getBody() const
SourceLocation getLocStart() const LLVM_READONLY
QualType getPromotionType() const
getPromotionType - Return the integer type that enumerators should promote to.
The template argument is a pack expansion of a template name that was provided for a template templat...
QualType VisitAttributedType(const AttributedType *T)
bool isThrownVariableInScope() const
Determines whether the variable thrown by this expression (if any!) is within the innermost try block...
NestedNameSpecifierLoc getQualifierLoc() const
If the member name was qualified, retrieves the nested-name-specifier that precedes the member name...
IndirectFieldDecl - An instance of this class is created to represent a field injected from an anonym...
QualType getEquivalentType() const
SourceLocation getLParenLoc() const
const llvm::APSInt & getInitVal() const
ObjCInterfaceDecl * getDefinition()
Retrieve the definition of this class, or NULL if this class has been forward-declared (with @class) ...
IdentifierInfo * getAsIdentifier() const
Retrieve the identifier stored in this nested name specifier.
bool isParameterPack() const
LanguageIDs getLanguage() const
Return the language specified by this linkage specification.
SourceLocation getPropertyIvarDeclLoc() const
bool hasWrittenPrototype() const
const ContentCache * getContentCache() const
QualType getPointerType(QualType T) const
Return the uniqued reference to the type for a pointer to the specified type.
DeclarationName - The name of a declaration.
Represents the declaration of an Objective-C type parameter.
const Expr * getSynchExpr() const
Expr * VisitUnaryExprOrTypeTraitExpr(UnaryExprOrTypeTraitExpr *E)
unsigned getNumHandlers() const
Expr * VisitCXXScalarValueInitExpr(CXXScalarValueInitExpr *E)
Selector getGetterName() const
QualType getObjCObjectPointerType(QualType OIT) const
Return a ObjCObjectPointerType type for the given ObjCObjectType.
const StringLiteral * getOutputConstraintLiteral(unsigned i) const
DefinitionKind isThisDeclarationADefinition(ASTContext &) const
Check whether this declaration is a definition.
bool isUsed(bool CheckUsedAttr=true) const
Whether any (re-)declaration of the entity was used, meaning that a definition is required...
static ObjCImplementationDecl * Create(ASTContext &C, DeclContext *DC, ObjCInterfaceDecl *classInterface, ObjCInterfaceDecl *superDecl, SourceLocation nameLoc, SourceLocation atStartLoc, SourceLocation superLoc=SourceLocation(), SourceLocation IvarLBraceLoc=SourceLocation(), SourceLocation IvarRBraceLoc=SourceLocation())
Decl * VisitClassTemplateDecl(ClassTemplateDecl *D)
unsigned getNumPlacementArgs() const
QualType getTemplateTypeParmType(unsigned Depth, unsigned Index, bool ParameterPack, TemplateTypeParmDecl *ParmDecl=nullptr) const
Retrieve the template type parameter type for a template parameter or parameter pack with the given d...
A set of unresolved declarations.
StringRef getBytes() const
Allow access to clients that need the byte representation, such as ASTWriterStmt::VisitStringLiteral(...
SourceLocation getWhileLoc() const
void setInstantiationDependent(bool ID)
Set whether this expression is instantiation-dependent or not.
SourceLocation getLocStart() const LLVM_READONLY
bool isNull() const
Determine whether this template argument has no value.
StringKind getKind() const
EnumDecl - Represents an enum.
void ImportArray(IIter Ibegin, IIter Iend, OIter Obegin)
detail::InMemoryDirectory::const_iterator E
A pointer to member type per C++ 8.3.3 - Pointers to members.
QualType getModifiedType() const
bool usesGNUSyntax() const
Determines whether this designated initializer used the deprecated GNU syntax for designated initiali...
const Expr * getRetValue() const
Expr * VisitExplicitCastExpr(ExplicitCastExpr *E)
Expr * VisitImplicitValueInitExpr(ImplicitValueInitExpr *ILE)
unsigned getNumArgs() const
getNumArgs - Return the number of actual arguments to this call.
SourceLocation getLocation() const
CanQualType getCanonicalType(QualType T) const
Return the canonical (structural) type corresponding to the specified potentially non-canonical type ...
FieldDecl * getMember() const
If this is a member initializer, returns the declaration of the non-static data member being initiali...
ExplicitCastExpr - An explicit cast written in the source code.
DeclarationNameInfo - A collector data type for bundling together a DeclarationName and the correspnd...
Tags, declared with 'struct foo;' and referenced with 'struct foo'.
unsigned getNumArgs() const
unsigned getNumConcatenated() const
getNumConcatenated - Get the number of string literal tokens that were concatenated in translation ph...
void setInitializedFieldInUnion(FieldDecl *FD)
A type that was preceded by the 'template' keyword, stored as a Type*.
static EnumDecl * Create(ASTContext &C, DeclContext *DC, SourceLocation StartLoc, SourceLocation IdLoc, IdentifierInfo *Id, EnumDecl *PrevDecl, bool IsScoped, bool IsScopedUsingClassTag, bool IsFixed)
Decl * VisitObjCIvarDecl(ObjCIvarDecl *D)
Expr * VisitCXXTemporaryObjectExpr(CXXTemporaryObjectExpr *CE)
VarTemplateSpecializationDecl * findSpecialization(ArrayRef< TemplateArgument > Args, void *&InsertPos)
Return the specialization with the provided arguments if it exists, otherwise return the insertion po...
static LabelDecl * Create(ASTContext &C, DeclContext *DC, SourceLocation IdentL, IdentifierInfo *II)
TemplateArgumentLoc ImportTemplateArgumentLoc(const TemplateArgumentLoc &TALoc, bool &Error)
llvm::APFloat getValue() const
Decl * VisitVarTemplateSpecializationDecl(VarTemplateSpecializationDecl *D)
unsigned getDepth() const
Get the nesting depth of the template parameter.
QualType getPointeeType() const
Gets the type pointed to by this ObjC pointer.
const Stmt * getThen() const
QualType VisitLValueReferenceType(const LValueReferenceType *T)
Represents a pointer to an Objective C object.
Represents a C++11 noexcept expression (C++ [expr.unary.noexcept]).
SwitchStmt - This represents a 'switch' stmt.
SourceLocation getAtCatchLoc() const
bool hasInheritedDefaultArg() const
static ObjCIvarDecl * Create(ASTContext &C, ObjCContainerDecl *DC, SourceLocation StartLoc, SourceLocation IdLoc, IdentifierInfo *Id, QualType T, TypeSourceInfo *TInfo, AccessControl ac, Expr *BW=nullptr, bool synthesized=false)
void ImportOverrides(CXXMethodDecl *ToMethod, CXXMethodDecl *FromMethod)
Expr * VisitFloatingLiteral(FloatingLiteral *E)
SourceLocation getRParenLoc() const
ObjCImplementationDecl - Represents a class definition - this is where method definitions are specifi...
ObjCMethodDecl * getGetterMethodDecl() const
FunctionDecl * SourceTemplate
The function template whose exception specification this is instantiated from, for EST_Uninstantiated...
const TemplateArgument * getArgs() const
Retrieve the template arguments.
A helper class that allows the use of isa/cast/dyncast to detect TagType objects of structs/unions/cl...
Complex values, per C99 6.2.5p11.
unsigned getNumNegativeBits() const
Returns the width in bits required to store all the negative enumerators of this enum.
Location wrapper for a TemplateArgument.
void setIsUsed()
Set whether the declaration is used, in the sense of odr-use.
VarDecl * getTemplatedDecl() const
Get the underlying variable declarations of the template.
void setUnparsedDefaultArg()
setUnparsedDefaultArg - Specify that this parameter has an unparsed default argument.
Expr * getUninstantiatedDefaultArg()
void setQualifierInfo(NestedNameSpecifierLoc QualifierLoc)
SourceLocation getLocEnd() const LLVM_READONLY
FunctionDecl * getOperatorNew() const
const T * getAs() const
Member-template getAs<specific type>'.
Imports selected nodes from one AST context into another context, merging AST nodes where appropriate...
ArraySubscriptExpr - [C99 6.5.2.1] Array Subscripting.
NamedDecl * getFriendDecl() const
If this friend declaration doesn't name a type, return the inner declaration.
QualType getCanonicalType() const
const Stmt * getSubStmt() const
Represents Objective-C's collection statement.
Represents a C++ base or member initializer.
OpaqueValueExpr * getOpaqueValue() const
getOpaqueValue - Return the opaque value placeholder.
Expr * VisitCXXNoexceptExpr(CXXNoexceptExpr *E)
Expr * VisitCXXNullPtrLiteralExpr(CXXNullPtrLiteralExpr *E)
SourceLocation getBridgeKeywordLoc() const
The location of the bridge keyword.
ObjCMethodDecl * getSetterMethodDecl() const
void setQualifierInfo(NestedNameSpecifierLoc QualifierLoc)
QualType getFunctionType(QualType ResultTy, ArrayRef< QualType > Args, const FunctionProtoType::ExtProtoInfo &EPI) const
Return a normal function type with a typed argument list.
Selector getSelector(unsigned NumArgs, IdentifierInfo **IIV)
Can create any sort of selector.
SourceLocation getAtTryLoc() const
Retrieve the location of the @ in the @try.
static CStyleCastExpr * Create(const ASTContext &Context, QualType T, ExprValueKind VK, CastKind K, Expr *Op, const CXXCastPath *BasePath, TypeSourceInfo *WrittenTy, SourceLocation L, SourceLocation R)
An implicit indirection through a C++ base class, when the field found is in a base class...
QualType getIntegralType() const
Retrieve the type of the integral value.
ObjCProtocolList::iterator protocol_iterator
bool isNull() const
Determine whether this template name is NULL.
QualType getIntegerType() const
getIntegerType - Return the integer type this enum decl corresponds to.
void setBuiltinID(unsigned ID)
TypeSourceInfo * getWrittenTypeInfo() const
void setSwitchLoc(SourceLocation L)
static llvm::Optional< unsigned > findUntaggedStructOrUnionIndex(RecordDecl *Anon)
Find the index of the given anonymous struct/union within its context.
ExtVectorType - Extended vector type.
QualType getInnerType() const
virtual void CompleteType(TagDecl *Tag)
Gives the external AST source an opportunity to complete an incomplete type.
DeclContext * getRedeclContext()
getRedeclContext - Retrieve the context in which an entity conflicts with other entities of the same ...
CXXConstructorDecl * getConstructor() const
Get the constructor that this expression will (ultimately) call.
SourceLocation getRBraceLoc() const
bool isTrivial() const
Whether this function is "trivial" in some specialized C++ senses.
TypeSourceInfo * getTypeSourceInfo() const
Retrieves the type and source location of the base class.
ObjCInterfaceDecl * getCanonicalDecl() override
Retrieves the canonical declaration of this Objective-C class.
Represents Objective-C's @finally statement.
DesignatedInitExpr::Designator Designator
static CXXMethodDecl * Create(ASTContext &C, CXXRecordDecl *RD, SourceLocation StartLoc, const DeclarationNameInfo &NameInfo, QualType T, TypeSourceInfo *TInfo, StorageClass SC, bool isInline, bool isConstexpr, SourceLocation EndLocation)
The template argument is a type.
ObjCImplementationDecl * getImplementation() const
SourceLocation getRParenLoc() const
void setSetterName(Selector Sel, SourceLocation Loc=SourceLocation())
bool ImportContainerChecked(const InContainerTy &InContainer, OutContainerTy &OutContainer)
The template argument is actually a parameter pack.
LabelDecl * getLabel() const
protocol_iterator protocol_end() const
QualType getTagDeclType(const TagDecl *Decl) const
Return the unique reference to the type for the specified TagDecl (struct/union/class/enum) decl...
Represents a base class of a C++ class.
QualType VisitUnaryTransformType(const UnaryTransformType *T)
unsigned getNumCatchStmts() const
Retrieve the number of @catch statements in this try-catch-finally block.
const Expr * getInitializer() const
SourceRange getDirectInitRange() const
SourceLocation getRParenLoc() const
void setNamedTypeInfo(TypeSourceInfo *TInfo)
setNamedTypeInfo - Sets the source type info associated to the name.
Decl * VisitObjCTypeParamDecl(ObjCTypeParamDecl *D)
ArrayRef< QualType > Exceptions
Explicitly-specified list of exception types.
SourceManager & getSourceManager()
SourceLocation getForLoc() const
SourceLocation getLocation() const
Expr * VisitCXXNewExpr(CXXNewExpr *CE)
DeclStmt * getRangeStmt()
Stmt * VisitObjCAtThrowStmt(ObjCAtThrowStmt *S)
SourceLocation getLocEnd() const LLVM_READONLY
Expr * getFalseExpr() const
getFalseExpr - Return the subexpression which will be evaluated if the condnition evaluates to false;...
GotoStmt - This represents a direct goto.
ArrayRef< const Attr * > getAttrs() const
void ImportDefinition(Decl *From)
Import the definition of the given declaration, including all of the declarations it contains...
A use of a default initializer in a constructor or in aggregate initialization.
void setHadMultipleCandidates(bool V=true)
Sets the flag telling whether this expression refers to a function that was resolved from an overload...
const TemplateArgumentList & getTemplateArgs() const
Retrieve the template arguments of the class template specialization.
TemplateArgumentLocInfo getLocInfo() const
DependentTemplateName * getAsDependentTemplateName() const
Retrieve the underlying dependent template name structure, if any.
const Type * getClass() const
ObjCPropertyDecl * getPropertyDecl() const
SourceLocation getAttrLoc() const
AccessControl getAccessControl() const
Decl * VisitTypeAliasDecl(TypeAliasDecl *D)
Expr * NoexceptExpr
Noexcept expression, if this is EST_ComputedNoexcept.
QualType getNullPtrType() const
Retrieve the type for null non-type template argument.
Expr * VisitInitListExpr(InitListExpr *E)
QualType getTypeOfExprType(Expr *e) const
GCC extension.
An attributed type is a type to which a type attribute has been applied.
Defines the C++ Decl subclasses, other than those for templates (found in DeclTemplate.h) and friends (in DeclFriend.h).
const StringLiteral * getInputConstraintLiteral(unsigned i) const
bool isArrayFormAsWritten() const
MemberExpr - [C99 6.5.2.3] Structure and Union Members.
unsigned pack_size() const
The number of template arguments in the given template argument pack.
void AddSpecialization(ClassTemplateSpecializationDecl *D, void *InsertPos)
Insert the specified specialization knowing that it is not already in.
bool isImplicitInterfaceDecl() const
isImplicitInterfaceDecl - check that this is an implicitly declared ObjCInterfaceDecl node...
const Expr * getSubExpr() const
QualType getVariableArrayType(QualType EltTy, Expr *NumElts, ArrayType::ArraySizeModifier ASM, unsigned IndexTypeQuals, SourceRange Brackets) const
Return a non-unique reference to the type for a variable array of the specified element type...
SourceLocation getBuiltinLoc() const
bool hasArrayFiller() const
Return true if this is an array initializer and its array "filler" has been set.
SourceLocation getRParenLoc() const
Retrieve the location of the closing parenthesis.
void setDefaultArg(Expr *defarg)
unsigned getNumPositiveBits() const
Returns the width in bits required to store all the non-negative enumerators of this enum...
Represents a C++ struct/union/class.
BoundNodesTreeBuilder *const Builder
static IndirectFieldDecl * Create(ASTContext &C, DeclContext *DC, SourceLocation L, IdentifierInfo *Id, QualType T, llvm::MutableArrayRef< NamedDecl * > CH)
ContinueStmt - This represents a continue.
Expr * VisitDesignatedInitExpr(DesignatedInitExpr *E)
SourceLocation getRParenLoc() const
Represents a loop initializing the elements of an array.
The template argument is a template name that was provided for a template template parameter...
void setDescribedVarTemplate(VarTemplateDecl *Template)
Represents a C array with an unspecified size.
static CXXTemporary * Create(const ASTContext &C, const CXXDestructorDecl *Destructor)
BinaryConditionalOperator - The GNU extension to the conditional operator which allows the middle ope...
SourceLocation getBreakLoc() const
CXXCatchStmt - This represents a C++ catch block.
Represents an explicit C++ type conversion that uses "functional" notation (C++ [expr.type.conv]).
FPOptions getFPFeatures() const
bool doesUsualArrayDeleteWantSize() const
Answers whether the usual array deallocation function for the allocated type expects the size of the ...
ObjCIvarDecl - Represents an ObjC instance variable.
static TypedefDecl * Create(ASTContext &C, DeclContext *DC, SourceLocation StartLoc, SourceLocation IdLoc, IdentifierInfo *Id, TypeSourceInfo *TInfo)
NestedNameSpecifier * getNestedNameSpecifier() const
Retrieve the nested-name-specifier to which this instance refers.
ArraySizeModifier getSizeModifier() const
ElaboratedTypeKeyword getKeyword() const
WhileStmt - This represents a 'while' stmt.
A structure for storing the information associated with an overloaded template name.
SourceLocation getColonLoc() const
const Expr * getCond() const
ObjCPropertyQueryKind getQueryKind() const
Location information for a TemplateArgument.
FieldDecl * getField() const
For a field offsetof node, returns the field.
SourceLocation getElseLoc() const
TypeSourceInfo * getQueriedTypeSourceInfo() const
static VarTemplateDecl * Create(ASTContext &C, DeclContext *DC, SourceLocation L, DeclarationName Name, TemplateParameterList *Params, VarDecl *Decl)
Create a variable template node.
Declaration of a class template.
QualType getVectorType(QualType VectorType, unsigned NumElts, VectorType::VectorKind VecKind) const
Return the unique reference to a vector type of the specified element type and size.
Stores a list of Objective-C type parameters for a parameterized class or a category/extension thereo...
bool isConstexpr() const
Whether this variable is (C++11) constexpr.
Stmt * VisitSwitchStmt(SwitchStmt *S)
This class is used for builtin types like 'int'.
TemplateParameterList * getTemplateParameters() const
Get the list of template parameters.
CompoundStmt * getTryBlock()
bool ImportCastPath(CastExpr *E, CXXCastPath &Path)
void setPropertyAttributes(PropertyAttributeKind PRVal)
Expr * VisitArraySubscriptExpr(ArraySubscriptExpr *E)
Represents Objective-C's @try ... @catch ... @finally statement.
unsigned getIndex() const
Retrieve the index of the template parameter.
Expr * VisitVAArgExpr(VAArgExpr *E)
const Expr * getThrowExpr() const
QualType getParamTypeForDecl() const
NestedNameSpecifier * getQualifier() const
Return the nested name specifier that qualifies this name.
bool hasExplicitTemplateArgs() const
Determines whether this declaration reference was followed by an explicit template argument list...
StringLiteral - This represents a string literal expression, e.g.
CallExpr - Represents a function call (C99 6.5.2.2, C++ [expr.call]).
ASTContext & getToContext() const
Retrieve the context that AST nodes are being imported into.
Expr * VisitCXXDefaultInitExpr(CXXDefaultInitExpr *E)
Expr * VisitArrayInitIndexExpr(ArrayInitIndexExpr *E)
ObjCInterfaceDecl * getSuperClass() const
Expr * VisitOpaqueValueExpr(OpaqueValueExpr *E)
PropertyAttributeKind getPropertyAttributesAsWritten() const
QualType getDeducedType() const
Get the type deduced for this placeholder type, or null if it's either not been deduced or was deduce...
Stmt * VisitDefaultStmt(DefaultStmt *S)
QualType getPointeeTypeAsWritten() const
SourceLocation getRBracLoc() const
Import only the bare bones needed to establish a valid DeclContext.
SourceLocation getColonLoc() const
Abstract class common to all of the C++ "named"/"keyword" casts.
bool isMicrosoftABI() const
Returns whether this is really a Win64 ABI va_arg expression.
QualType VisitExtVectorType(const ExtVectorType *T)
bool isStdInitListInitialization() const
Whether this constructor call was written as list-initialization, but was interpreted as forming a st...
void setNextSwitchCase(SwitchCase *SC)
SourceLocation getIvarRBraceLoc() const
const Stmt * getTryBody() const
Retrieve the @try body.
TranslationUnitDecl - The top declaration context.
void ImportDefinitionIfNeeded(Decl *FromD, Decl *ToD=nullptr)
QualType VisitTypeOfExprType(const TypeOfExprType *T)
NamespaceDecl * getAnonymousNamespace() const
Retrieve the anonymous namespace nested inside this namespace, if any.
VarDecl * getExceptionDecl() const
A reference to a declared variable, function, enum, etc.
ExprValueKind getValueKind() const
getValueKind - The value kind that this expression produces.
Expr * VisitBinaryConditionalOperator(BinaryConditionalOperator *E)
Represents a type template specialization; the template must be a class template, a type alias templa...
QualType getDecltypeType(Expr *e, QualType UnderlyingType) const
C++11 decltype.
SourceLocation getRAngleLoc() const
QualType getConstantArrayType(QualType EltTy, const llvm::APInt &ArySize, ArrayType::ArraySizeModifier ASM, unsigned IndexTypeQuals) const
Return the unique reference to the type for a constant array of the specified element type...
QualType getElementType() const
BreakStmt - This represents a break.
void Extend(ASTContext &Context, SourceLocation TemplateKWLoc, TypeLoc TL, SourceLocation ColonColonLoc)
Extend the current nested-name-specifier by another nested-name-specifier component of the form 'type...
SourceLocation getLocForStartOfFile(FileID FID) const
Return the source location corresponding to the first byte of the specified file. ...
SourceLocation getInnerLocStart() const
getInnerLocStart - Return SourceLocation representing start of source range ignoring outer template d...
llvm::MemoryBuffer * getBuffer(DiagnosticsEngine &Diag, const SourceManager &SM, SourceLocation Loc=SourceLocation(), bool *Invalid=nullptr) const
Returns the memory buffer for the associated content.
Expr * VisitExprWithCleanups(ExprWithCleanups *EWC)
const Expr * getSubExpr() const
FieldDecl * getInitializedFieldInUnion()
If this initializes a union, specifies which field in the union to initialize.
Expr * VisitCompoundLiteralExpr(CompoundLiteralExpr *E)
TypeSourceInfo * getAllocatedTypeSourceInfo() const
bool isFieldDesignator() const
DeclStmt * getLoopVarStmt()
unsigned getNumClobbers() const
Expr * getTrueExpr() const
getTrueExpr - Return the subexpression which will be evaluated if the condition evaluates to true; th...
A set of overloaded template declarations.
SourceLocation getRParenLoc() const
unsigned getFirstExprIndex() const
A trivial tuple used to represent a source range.
static VarTemplateSpecializationDecl * Create(ASTContext &Context, DeclContext *DC, SourceLocation StartLoc, SourceLocation IdLoc, VarTemplateDecl *SpecializedTemplate, QualType T, TypeSourceInfo *TInfo, StorageClass S, ArrayRef< TemplateArgument > Args)
SourceLocation getLocation() const
void setLexicalDeclContext(DeclContext *DC)
NamedDecl - This represents a decl with a name.
DeclarationNameInfo getNameInfo() const
SourceLocation getRParenLoc() const
A boolean literal, per ([C++ lex.bool] Boolean literals).
static ObjCCategoryImplDecl * Create(ASTContext &C, DeclContext *DC, IdentifierInfo *Id, ObjCInterfaceDecl *classInterface, SourceLocation nameLoc, SourceLocation atStartLoc, SourceLocation CategoryNameLoc)
static DeclarationName getUsingDirectiveName()
getUsingDirectiveName - Return name for all using-directives.
OffsetOfExpr - [C99 7.17] - This represents an expression of the form offsetof(record-type, member-designator).
void setAccess(AccessSpecifier AS)
SourceLocation getLocEnd() const LLVM_READONLY
Represents a C array with a specified size that is not an integer-constant-expression.
EnumDecl * getDefinition() const
Decl * VisitNamespaceDecl(NamespaceDecl *D)
Represents a C++ namespace alias.
Decl * VisitObjCInterfaceDecl(ObjCInterfaceDecl *D)
Stmt * VisitObjCAutoreleasePoolStmt(ObjCAutoreleasePoolStmt *S)
const DirectoryEntry * getDir() const
Return the directory the file lives in.
SourceLocation getStartLoc() const
std::pair< FileID, unsigned > getDecomposedLoc(SourceLocation Loc) const
Decompose the specified location into a raw FileID + Offset pair.
QualType VisitAtomicType(const AtomicType *T)
SourceRange getSourceRange() const LLVM_READONLY
Retrieves the source range that contains the entire base specifier.
SourceLocation getLocation() const
DeclStmt * getBeginStmt()
bool isNull() const
Return true if this QualType doesn't point to a type yet.
TypeSourceInfo * getTypeSourceInfo() const
void setTypeAsWritten(TypeSourceInfo *T)
Sets the type of this specialization as it was written by the user.
static FieldDecl * Create(const ASTContext &C, DeclContext *DC, SourceLocation StartLoc, SourceLocation IdLoc, IdentifierInfo *Id, QualType T, TypeSourceInfo *TInfo, Expr *BW, bool Mutable, InClassInitStyle InitStyle)
const char * getStmtClassName() const
QualType getSubstTemplateTypeParmType(const TemplateTypeParmType *Replaced, QualType Replacement) const
Retrieve a substitution-result type.
The global specifier '::'. There is no stored value.
SourceLocation getLocStart() const LLVM_READONLY
void setType(QualType newType)
static CXXConstructorDecl * Create(ASTContext &C, CXXRecordDecl *RD, SourceLocation StartLoc, const DeclarationNameInfo &NameInfo, QualType T, TypeSourceInfo *TInfo, bool isExplicit, bool isInline, bool isImplicitlyDeclared, bool isConstexpr, InheritedConstructor Inherited=InheritedConstructor())
const TemplateArgument & getArgument() const
Expr * getSubExpr() const
Get the initializer to use for each array element.
SourceLocation ColonLoc
Location of ':'.
Decl * VisitParmVarDecl(ParmVarDecl *D)
SourceLocation getCatchLoc() const
QualType VisitRValueReferenceType(const RValueReferenceType *T)
Represents Objective-C's @autoreleasepool Statement.
Stmt * VisitGCCAsmStmt(GCCAsmStmt *S)
QualType VisitAutoType(const AutoType *T)
SourceLocation getFieldLoc() const
ObjCCategoryImplDecl - An object of this class encapsulates a category @implementation declaration...
ArrayRef< QualType > exceptions() const
bool isBeingDefined() const
isBeingDefined - Return true if this decl is currently being defined.
This class handles loading and caching of source files into memory.
Represents the canonical version of C arrays with a specified constant size.
OpaqueValueExpr * getCommonExpr() const
Get the common subexpression shared by all initializations (the source array).
const CXXDestructorDecl * getDestructor() const
ExceptionSpecInfo ExceptionSpec
bool isArrayDesignator() const
QualType VisitType(const Type *T)
DeclContext * ImportContext(DeclContext *FromDC)
Import the given declaration context from the "from" AST context into the "to" AST context...
overridden_method_range overridden_methods() const
void setPropertyIvarDecl(ObjCIvarDecl *Ivar)
Represents an implicitly-generated value initialization of an object of a given type.
static ObjCAtTryStmt * Create(const ASTContext &Context, SourceLocation atTryLoc, Stmt *atTryStmt, Stmt **CatchStmts, unsigned NumCatchStmts, Stmt *atFinallyStmt)
Expr * VisitCXXThrowExpr(CXXThrowExpr *E)
Stmt * VisitStmt(Stmt *S)
Attr - This represents one attribute.
QualType VisitTypeOfType(const TypeOfType *T)
A single template declaration.
Kind getKind() const
Determine what kind of offsetof node this is.
SourceLocation getColonLoc() const
Expr * VisitStmtExpr(StmtExpr *E)
NamedDecl *const * iterator
DeclAccessPair getFoundDecl() const
Retrieves the declaration found by lookup.
bool isMutable() const
isMutable - Determines whether this field is mutable (C++ only).
TypeSourceInfo * getArgumentTypeInfo() const
Structure used to store a statement, the constant value to which it was evaluated (if any)...
const ObjCInterfaceDecl * getSuperClass() const
SourceLocation getTemplateLoc() const
static NestedNameSpecifier * GlobalSpecifier(const ASTContext &Context)
Returns the nested name specifier representing the global scope.
void notePriorDiagnosticFrom(const DiagnosticsEngine &Other)
Note that the prior diagnostic was emitted by some other DiagnosticsEngine, and we may be attaching a...