llvm/clang/include/clang/APINotes/Types.h

//===-- Types.h - API Notes Data Types --------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_CLANG_APINOTES_TYPES_H
#define LLVM_CLANG_APINOTES_TYPES_H

#include "clang/Basic/Specifiers.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/StringRef.h"
#include <climits>
#include <optional>
#include <vector>

namespace llvm {
class raw_ostream;
} // namespace llvm

namespace clang {
namespace api_notes {
enum class RetainCountConventionKind {};

/// The payload for an enum_extensibility attribute. This is a tri-state rather
/// than just a boolean because the presence of the attribute indicates
/// auditing.
enum class EnumExtensibilityKind {};

/// The kind of a swift_wrapper/swift_newtype.
enum class SwiftNewTypeKind {};

/// Describes API notes data for any entity.
///
/// This is used as the base of all API notes.
class CommonEntityInfo {};

inline bool operator==(const CommonEntityInfo &LHS,
                       const CommonEntityInfo &RHS) {}

inline bool operator!=(const CommonEntityInfo &LHS,
                       const CommonEntityInfo &RHS) {}

/// Describes API notes for types.
class CommonTypeInfo : public CommonEntityInfo {};

inline bool operator==(const CommonTypeInfo &LHS, const CommonTypeInfo &RHS) {}

inline bool operator!=(const CommonTypeInfo &LHS, const CommonTypeInfo &RHS) {}

/// Describes API notes data for an Objective-C class or protocol or a C++
/// namespace.
class ContextInfo : public CommonTypeInfo {};

inline bool operator==(const ContextInfo &LHS, const ContextInfo &RHS) {}

inline bool operator!=(const ContextInfo &LHS, const ContextInfo &RHS) {}

/// API notes for a variable/property.
class VariableInfo : public CommonEntityInfo {};

inline bool operator==(const VariableInfo &LHS, const VariableInfo &RHS) {}

inline bool operator!=(const VariableInfo &LHS, const VariableInfo &RHS) {}

/// Describes API notes data for an Objective-C property.
class ObjCPropertyInfo : public VariableInfo {};

inline bool operator==(const ObjCPropertyInfo &LHS,
                       const ObjCPropertyInfo &RHS) {}

inline bool operator!=(const ObjCPropertyInfo &LHS,
                       const ObjCPropertyInfo &RHS) {}

/// Describes a function or method parameter.
class ParamInfo : public VariableInfo {};

inline bool operator==(const ParamInfo &LHS, const ParamInfo &RHS) {}

inline bool operator!=(const ParamInfo &LHS, const ParamInfo &RHS) {}

/// API notes for a function or method.
class FunctionInfo : public CommonEntityInfo {};

inline bool operator==(const FunctionInfo &LHS, const FunctionInfo &RHS) {}

inline bool operator!=(const FunctionInfo &LHS, const FunctionInfo &RHS) {}

/// Describes API notes data for an Objective-C method.
class ObjCMethodInfo : public FunctionInfo {};

inline bool operator==(const ObjCMethodInfo &LHS, const ObjCMethodInfo &RHS) {}

inline bool operator!=(const ObjCMethodInfo &LHS, const ObjCMethodInfo &RHS) {}

/// Describes API notes data for a global variable.
class GlobalVariableInfo : public VariableInfo {};

/// Describes API notes data for a global function.
class GlobalFunctionInfo : public FunctionInfo {};

/// Describes API notes data for a C/C++ record field.
class FieldInfo : public VariableInfo {};

/// Describes API notes data for a C++ method.
class CXXMethodInfo : public FunctionInfo {};

/// Describes API notes data for an enumerator.
class EnumConstantInfo : public CommonEntityInfo {};

/// Describes API notes data for a tag.
class TagInfo : public CommonTypeInfo {};

inline bool operator==(const TagInfo &LHS, const TagInfo &RHS) {}

inline bool operator!=(const TagInfo &LHS, const TagInfo &RHS) {}

/// Describes API notes data for a typedef.
class TypedefInfo : public CommonTypeInfo {};

inline bool operator==(const TypedefInfo &LHS, const TypedefInfo &RHS) {}

inline bool operator!=(const TypedefInfo &LHS, const TypedefInfo &RHS) {}

/// The file extension used for the source representation of API notes.
static const constexpr char SOURCE_APINOTES_EXTENSION[] =;

/// Opaque context ID used to refer to an Objective-C class or protocol or a C++
/// namespace.
class ContextID {};

enum class ContextKind : uint8_t {};

struct Context {};

/// A temporary reference to an Objective-C selector, suitable for
/// referencing selector data on the stack.
///
/// Instances of this struct do not store references to any of the
/// data they contain; it is up to the user to ensure that the data
/// referenced by the identifier list persists.
struct ObjCSelectorRef {};
} // namespace api_notes
} // namespace clang

#endif