#ifndef LLVM_CLANG_EXTRACTAPI_API_H
#define LLVM_CLANG_EXTRACTAPI_API_H
#include "clang/AST/Availability.h"
#include "clang/AST/DeclBase.h"
#include "clang/AST/RawCommentList.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/ExtractAPI/DeclarationFragments.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/Support/Allocator.h"
#include "llvm/Support/Casting.h"
#include "llvm/TargetParser/Triple.h"
#include <cstddef>
#include <iterator>
#include <memory>
#include <optional>
#include <type_traits>
namespace clang {
namespace extractapi {
class Template { … };
DocComment;
struct APIRecord;
struct SymbolReference { … };
class RecordContext;
struct APIRecord { … };
class RecordContext { … };
struct NamespaceRecord : APIRecord, RecordContext { … };
struct GlobalFunctionRecord : APIRecord { … };
struct GlobalFunctionTemplateRecord : GlobalFunctionRecord { … };
struct GlobalFunctionTemplateSpecializationRecord : GlobalFunctionRecord { … };
struct GlobalVariableRecord : APIRecord, RecordContext { … };
struct GlobalVariableTemplateRecord : GlobalVariableRecord { … };
struct GlobalVariableTemplateSpecializationRecord : GlobalVariableRecord { … };
struct GlobalVariableTemplatePartialSpecializationRecord
: GlobalVariableRecord { … };
struct EnumConstantRecord : APIRecord { … };
struct TagRecord : APIRecord, RecordContext { … };
struct EnumRecord : TagRecord { … };
struct RecordFieldRecord : APIRecord, RecordContext { … };
struct RecordRecord : TagRecord { … };
struct StructFieldRecord : RecordFieldRecord { … };
struct StructRecord : RecordRecord { … };
struct UnionFieldRecord : RecordFieldRecord { … };
struct UnionRecord : RecordRecord { … };
struct CXXFieldRecord : APIRecord, RecordContext { … };
struct CXXFieldTemplateRecord : CXXFieldRecord { … };
struct CXXMethodRecord : APIRecord { … };
struct CXXConstructorRecord : CXXMethodRecord { … };
struct CXXDestructorRecord : CXXMethodRecord { … };
struct CXXStaticMethodRecord : CXXMethodRecord { … };
struct CXXInstanceMethodRecord : CXXMethodRecord { … };
struct CXXMethodTemplateRecord : CXXMethodRecord { … };
struct CXXMethodTemplateSpecializationRecord : CXXMethodRecord { … };
struct ObjCPropertyRecord : APIRecord { … };
struct ObjCInstancePropertyRecord : ObjCPropertyRecord { … };
struct ObjCClassPropertyRecord : ObjCPropertyRecord { … };
struct ObjCInstanceVariableRecord : APIRecord { … };
struct ObjCMethodRecord : APIRecord { … };
struct ObjCInstanceMethodRecord : ObjCMethodRecord { … };
struct ObjCClassMethodRecord : ObjCMethodRecord { … };
struct StaticFieldRecord : CXXFieldRecord { … };
struct ObjCContainerRecord : APIRecord, RecordContext { … };
struct CXXClassRecord : RecordRecord { … };
struct ClassTemplateRecord : CXXClassRecord { … };
struct ClassTemplateSpecializationRecord : CXXClassRecord { … };
struct ClassTemplatePartialSpecializationRecord : CXXClassRecord { … };
struct ConceptRecord : APIRecord { … };
struct ObjCCategoryRecord : ObjCContainerRecord { … };
struct ObjCInterfaceRecord : ObjCContainerRecord { … };
struct ObjCProtocolRecord : ObjCContainerRecord { … };
struct MacroDefinitionRecord : APIRecord { … };
struct TypedefRecord : APIRecord { … };
class APISet { … };
template <typename RecordTy, typename... CtorArgsContTy>
typename std::enable_if_t<std::is_base_of_v<APIRecord, RecordTy>, RecordTy> *
APISet::createRecord(StringRef USR, StringRef Name,
CtorArgsContTy &&...CtorArgs) { … }
template <typename FromTy,
bool IsKnownSubType = std::is_base_of_v<RecordContext, FromTy>>
struct ToRecordContextCastInfoWrapper {
static_assert(std::is_base_of_v<APIRecord, FromTy>,
"Can only cast APIRecord and derived classes to RecordContext");
static bool isPossible(FromTy *From) { … }
static RecordContext *doCast(FromTy *From) { … }
};
ToRecordContextCastInfoWrapper<FromTy, true>;
template <typename ToTy,
bool IsKnownSubType = std::is_base_of_v<RecordContext, ToTy>>
struct FromRecordContextCastInfoWrapper {
static_assert(
std::is_base_of_v<APIRecord, ToTy>,
"Can only class RecordContext to APIRecord and derived classes");
static bool isPossible(RecordContext *Ctx) { … }
static ToTy *doCast(RecordContext *Ctx) { … }
};
FromRecordContextCastInfoWrapper<ToTy, true>;
}
}
namespace llvm {
CastInfo< ::clang::extractapi::RecordContext, FromTy *>;
CastInfo< ::clang::extractapi::RecordContext, const FromTy *>;
CastInfo<ToTy, ::clang::extractapi::RecordContext *>;
CastInfo<ToTy, const ::clang::extractapi::RecordContext *>;
}
#endif