003 File Manager
Current Path:
/usr/src/contrib/llvm-project/clang/include/clang/Basic
usr
/
src
/
contrib
/
llvm-project
/
clang
/
include
/
clang
/
Basic
/
📁
..
📄
AArch64SVEACLETypes.def
(7.09 KB)
📄
ABI.h
(5.95 KB)
📄
ASTNode.td
(120 B)
📄
AddressSpaces.h
(2.59 KB)
📄
AlignedAllocation.h
(1.38 KB)
📄
AllDiagnostics.h
(1.44 KB)
📄
Attr.td
(122.78 KB)
📄
AttrDocs.td
(197.8 KB)
📄
AttrKinds.h
(929 B)
📄
AttrSubjectMatchRules.h
(957 B)
📄
AttributeCommonInfo.h
(7.02 KB)
📄
Attributes.h
(1.35 KB)
📄
BitmaskEnum.h
(749 B)
📄
Builtins.def
(71.64 KB)
📄
Builtins.h
(9.13 KB)
📄
BuiltinsAArch64.def
(14.31 KB)
📄
BuiltinsAMDGPU.def
(13.1 KB)
📄
BuiltinsARM.def
(18.6 KB)
📄
BuiltinsBPF.def
(1016 B)
📄
BuiltinsHexagon.def
(6.15 KB)
📄
BuiltinsHexagonDep.def
(117.26 KB)
📄
BuiltinsHexagonMapCustomDep.def
(8.56 KB)
📄
BuiltinsLe64.def
(728 B)
📄
BuiltinsMips.def
(35.51 KB)
📄
BuiltinsNEON.def
(814 B)
📄
BuiltinsNVPTX.def
(27.63 KB)
📄
BuiltinsPPC.def
(21.53 KB)
📄
BuiltinsSVE.def
(786 B)
📄
BuiltinsSystemZ.def
(19.7 KB)
📄
BuiltinsWebAssembly.def
(10.17 KB)
📄
BuiltinsX86.def
(140.49 KB)
📄
BuiltinsX86_64.def
(6.79 KB)
📄
BuiltinsXCore.def
(846 B)
📄
CapturedStmt.h
(662 B)
📄
CharInfo.h
(6.52 KB)
📄
CodeGenOptions.def
(21.65 KB)
📄
CodeGenOptions.h
(14.14 KB)
📄
CommentNodes.td
(1.04 KB)
📄
CommentOptions.h
(1.1 KB)
📄
Cuda.h
(2.3 KB)
📄
DebugInfoOptions.h
(1.72 KB)
📄
DeclNodes.td
(4.72 KB)
📄
Diagnostic.h
(55.73 KB)
📄
Diagnostic.td
(5.29 KB)
📄
DiagnosticAST.h
(903 B)
📄
DiagnosticASTKinds.td
(29.35 KB)
📄
DiagnosticAnalysis.h
(933 B)
📄
DiagnosticAnalysisKinds.td
(405 B)
📄
DiagnosticCategories.h
(757 B)
📄
DiagnosticCategories.td
(480 B)
📄
DiagnosticComment.h
(927 B)
📄
DiagnosticCommentKinds.td
(6.18 KB)
📄
DiagnosticCommonKinds.td
(14.32 KB)
📄
DiagnosticCrossTU.h
(927 B)
📄
DiagnosticCrossTUKinds.td
(889 B)
📄
DiagnosticDocs.td
(1.96 KB)
📄
DiagnosticDriver.h
(921 B)
📄
DiagnosticDriverKinds.td
(25.54 KB)
📄
DiagnosticError.h
(1.98 KB)
📄
DiagnosticFrontend.h
(933 B)
📄
DiagnosticFrontendKinds.td
(13.86 KB)
📄
DiagnosticGroups.td
(59.71 KB)
📄
DiagnosticIDs.h
(12.83 KB)
📄
DiagnosticLex.h
(903 B)
📄
DiagnosticLexKinds.td
(38.36 KB)
📄
DiagnosticOptions.def
(4.58 KB)
📄
DiagnosticOptions.h
(4.21 KB)
📄
DiagnosticParse.h
(915 B)
📄
DiagnosticParseKinds.td
(68.47 KB)
📄
DiagnosticRefactoring.h
(951 B)
📄
DiagnosticRefactoringKinds.td
(1.33 KB)
📄
DiagnosticSema.h
(909 B)
📄
DiagnosticSemaKinds.td
(546.17 KB)
📄
DiagnosticSerialization.h
(962 B)
📄
DiagnosticSerializationKinds.td
(18.08 KB)
📄
ExceptionSpecificationType.h
(2.48 KB)
📄
ExpressionTraits.h
(1.18 KB)
📄
FPOptions.def
(1.16 KB)
📄
Features.def
(11.55 KB)
📄
FileManager.h
(16.39 KB)
📄
FileSystemOptions.h
(924 B)
📄
FileSystemStatCache.h
(3.26 KB)
📄
FixedPoint.h
(8.6 KB)
📄
IdentifierTable.h
(33.75 KB)
📄
JsonSupport.h
(3.69 KB)
📄
LLVM.h
(2.43 KB)
📄
Lambda.h
(1.37 KB)
📄
LangOptions.def
(21.96 KB)
📄
LangOptions.h
(18.78 KB)
📄
LangStandard.h
(3.87 KB)
📄
LangStandards.def
(6.8 KB)
📄
Linkage.h
(4.13 KB)
📄
MSP430Target.def
(7.04 KB)
📄
MacroBuilder.h
(1.34 KB)
📄
Module.h
(24.09 KB)
📄
ObjCRuntime.h
(14.36 KB)
📄
OpenCLExtensionTypes.def
(1.59 KB)
📄
OpenCLExtensions.def
(4.38 KB)
📄
OpenCLImageTypes.def
(4.1 KB)
📄
OpenCLOptions.h
(4.42 KB)
📄
OpenMPKinds.def
(4.58 KB)
📄
OpenMPKinds.h
(9.66 KB)
📄
OperatorKinds.def
(6.56 KB)
📄
OperatorKinds.h
(1.55 KB)
📄
OperatorPrecedence.h
(1.82 KB)
📄
PartialDiagnostic.h
(12.96 KB)
📄
PlistSupport.h
(4.02 KB)
📄
PragmaKinds.h
(1.21 KB)
📄
PrettyStackTrace.h
(1.26 KB)
📄
SanitizerBlacklist.h
(1.73 KB)
📄
SanitizerSpecialCaseList.h
(1.81 KB)
📄
Sanitizers.def
(6.41 KB)
📄
Sanitizers.h
(6.57 KB)
📄
SourceLocation.h
(15.56 KB)
📄
SourceManager.h
(71.11 KB)
📄
SourceManagerInternals.h
(4.27 KB)
📄
Specifiers.h
(12.68 KB)
📄
Stack.h
(1.94 KB)
📄
StmtNodes.td
(10.92 KB)
📄
SyncScope.h
(4.87 KB)
📄
TargetBuiltins.h
(9.18 KB)
📄
TargetCXXABI.h
(12.49 KB)
📄
TargetInfo.h
(54.4 KB)
📄
TargetOptions.h
(3 KB)
📄
TemplateKinds.h
(2.22 KB)
📄
TokenKinds.def
(33.83 KB)
📄
TokenKinds.h
(3.99 KB)
📄
TypeNodes.td
(5.48 KB)
📄
TypeTraits.h
(2.67 KB)
📄
Version.h
(2.23 KB)
📄
Visibility.h
(4.4 KB)
📄
X86Target.def
(5.21 KB)
📄
XRayInstr.h
(1.92 KB)
📄
XRayLists.h
(1.73 KB)
📄
arm_bf16.td
(590 B)
📄
arm_cde.td
(9.29 KB)
📄
arm_fp16.td
(5.79 KB)
📄
arm_mve.td
(70.85 KB)
📄
arm_mve_defs.td
(24.52 KB)
📄
arm_neon.td
(90.63 KB)
📄
arm_neon_incl.td
(13.64 KB)
📄
arm_sve.td
(162.48 KB)
Editing: Specifiers.h
//===--- Specifiers.h - Declaration and Type Specifiers ---------*- 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 // //===----------------------------------------------------------------------===// /// /// \file /// Defines various enumerations that describe declaration and /// type specifiers. /// //===----------------------------------------------------------------------===// #ifndef LLVM_CLANG_BASIC_SPECIFIERS_H #define LLVM_CLANG_BASIC_SPECIFIERS_H #include "llvm/ADT/StringRef.h" #include "llvm/Support/DataTypes.h" #include "llvm/Support/ErrorHandling.h" namespace clang { /// Define the meaning of possible values of the kind in ExplicitSpecifier. enum class ExplicitSpecKind : unsigned { ResolvedFalse, ResolvedTrue, Unresolved, }; /// Define the kind of constexpr specifier. enum ConstexprSpecKind { CSK_unspecified, CSK_constexpr, CSK_consteval, CSK_constinit }; /// Specifies the width of a type, e.g., short, long, or long long. enum TypeSpecifierWidth { TSW_unspecified, TSW_short, TSW_long, TSW_longlong }; /// Specifies the signedness of a type, e.g., signed or unsigned. enum TypeSpecifierSign { TSS_unspecified, TSS_signed, TSS_unsigned }; enum TypeSpecifiersPipe { TSP_unspecified, TSP_pipe }; /// Specifies the kind of type. enum TypeSpecifierType { TST_unspecified, TST_void, TST_char, TST_wchar, // C++ wchar_t TST_char8, // C++20 char8_t (proposed) TST_char16, // C++11 char16_t TST_char32, // C++11 char32_t TST_int, TST_int128, TST_extint, // Extended Int types. TST_half, // OpenCL half, ARM NEON __fp16 TST_Float16, // C11 extension ISO/IEC TS 18661-3 TST_Accum, // ISO/IEC JTC1 SC22 WG14 N1169 Extension TST_Fract, TST_BFloat16, TST_float, TST_double, TST_float128, TST_bool, // _Bool TST_decimal32, // _Decimal32 TST_decimal64, // _Decimal64 TST_decimal128, // _Decimal128 TST_enum, TST_union, TST_struct, TST_class, // C++ class type TST_interface, // C++ (Microsoft-specific) __interface type TST_typename, // Typedef, C++ class-name or enum name, etc. TST_typeofType, TST_typeofExpr, TST_decltype, // C++11 decltype TST_underlyingType, // __underlying_type for C++11 TST_auto, // C++11 auto TST_decltype_auto, // C++1y decltype(auto) TST_auto_type, // __auto_type extension TST_unknown_anytype, // __unknown_anytype extension TST_atomic, // C11 _Atomic #define GENERIC_IMAGE_TYPE(ImgType, Id) TST_##ImgType##_t, // OpenCL image types #include "clang/Basic/OpenCLImageTypes.def" TST_error // erroneous type }; /// Structure that packs information about the type specifiers that /// were written in a particular type specifier sequence. struct WrittenBuiltinSpecs { static_assert(TST_error < 1 << 6, "Type bitfield not wide enough for TST"); /*DeclSpec::TST*/ unsigned Type : 6; /*DeclSpec::TSS*/ unsigned Sign : 2; /*DeclSpec::TSW*/ unsigned Width : 2; unsigned ModeAttr : 1; }; /// A C++ access specifier (public, private, protected), plus the /// special value "none" which means different things in different contexts. enum AccessSpecifier { AS_public, AS_protected, AS_private, AS_none }; /// The categorization of expression values, currently following the /// C++11 scheme. enum ExprValueKind { /// An r-value expression (a pr-value in the C++11 taxonomy) /// produces a temporary value. VK_RValue, /// An l-value expression is a reference to an object with /// independent storage. VK_LValue, /// An x-value expression is a reference to an object with /// independent storage but which can be "moved", i.e. /// efficiently cannibalized for its resources. VK_XValue }; /// A further classification of the kind of object referenced by an /// l-value or x-value. enum ExprObjectKind { /// An ordinary object is located at an address in memory. OK_Ordinary, /// A bitfield object is a bitfield on a C or C++ record. OK_BitField, /// A vector component is an element or range of elements on a vector. OK_VectorComponent, /// An Objective-C property is a logical field of an Objective-C /// object which is read and written via Objective-C method calls. OK_ObjCProperty, /// An Objective-C array/dictionary subscripting which reads an /// object or writes at the subscripted array/dictionary element via /// Objective-C method calls. OK_ObjCSubscript, /// A matrix component is a single element of a matrix. OK_MatrixComponent }; /// The reason why a DeclRefExpr does not constitute an odr-use. enum NonOdrUseReason { /// This is an odr-use. NOUR_None = 0, /// This name appears in an unevaluated operand. NOUR_Unevaluated, /// This name appears as a potential result of an lvalue-to-rvalue /// conversion that is a constant expression. NOUR_Constant, /// This name appears as a potential result of a discarded value /// expression. NOUR_Discarded, }; /// Describes the kind of template specialization that a /// particular template specialization declaration represents. enum TemplateSpecializationKind { /// This template specialization was formed from a template-id but /// has not yet been declared, defined, or instantiated. TSK_Undeclared = 0, /// This template specialization was implicitly instantiated from a /// template. (C++ [temp.inst]). TSK_ImplicitInstantiation, /// This template specialization was declared or defined by an /// explicit specialization (C++ [temp.expl.spec]) or partial /// specialization (C++ [temp.class.spec]). TSK_ExplicitSpecialization, /// This template specialization was instantiated from a template /// due to an explicit instantiation declaration request /// (C++11 [temp.explicit]). TSK_ExplicitInstantiationDeclaration, /// This template specialization was instantiated from a template /// due to an explicit instantiation definition request /// (C++ [temp.explicit]). TSK_ExplicitInstantiationDefinition }; /// Determine whether this template specialization kind refers /// to an instantiation of an entity (as opposed to a non-template or /// an explicit specialization). inline bool isTemplateInstantiation(TemplateSpecializationKind Kind) { return Kind != TSK_Undeclared && Kind != TSK_ExplicitSpecialization; } /// True if this template specialization kind is an explicit /// specialization, explicit instantiation declaration, or explicit /// instantiation definition. inline bool isTemplateExplicitInstantiationOrSpecialization( TemplateSpecializationKind Kind) { switch (Kind) { case TSK_ExplicitSpecialization: case TSK_ExplicitInstantiationDeclaration: case TSK_ExplicitInstantiationDefinition: return true; case TSK_Undeclared: case TSK_ImplicitInstantiation: return false; } llvm_unreachable("bad template specialization kind"); } /// Thread storage-class-specifier. enum ThreadStorageClassSpecifier { TSCS_unspecified, /// GNU __thread. TSCS___thread, /// C++11 thread_local. Implies 'static' at block scope, but not at /// class scope. TSCS_thread_local, /// C11 _Thread_local. Must be combined with either 'static' or 'extern' /// if used at block scope. TSCS__Thread_local }; /// Storage classes. enum StorageClass { // These are legal on both functions and variables. SC_None, SC_Extern, SC_Static, SC_PrivateExtern, // These are only legal on variables. SC_Auto, SC_Register }; /// Checks whether the given storage class is legal for functions. inline bool isLegalForFunction(StorageClass SC) { return SC <= SC_PrivateExtern; } /// Checks whether the given storage class is legal for variables. inline bool isLegalForVariable(StorageClass SC) { return true; } /// In-class initialization styles for non-static data members. enum InClassInitStyle { ICIS_NoInit, ///< No in-class initializer. ICIS_CopyInit, ///< Copy initialization. ICIS_ListInit ///< Direct list-initialization. }; /// CallingConv - Specifies the calling convention that a function uses. enum CallingConv { CC_C, // __attribute__((cdecl)) CC_X86StdCall, // __attribute__((stdcall)) CC_X86FastCall, // __attribute__((fastcall)) CC_X86ThisCall, // __attribute__((thiscall)) CC_X86VectorCall, // __attribute__((vectorcall)) CC_X86Pascal, // __attribute__((pascal)) CC_Win64, // __attribute__((ms_abi)) CC_X86_64SysV, // __attribute__((sysv_abi)) CC_X86RegCall, // __attribute__((regcall)) CC_AAPCS, // __attribute__((pcs("aapcs"))) CC_AAPCS_VFP, // __attribute__((pcs("aapcs-vfp"))) CC_IntelOclBicc, // __attribute__((intel_ocl_bicc)) CC_SpirFunction, // default for OpenCL functions on SPIR target CC_OpenCLKernel, // inferred for OpenCL kernels CC_Swift, // __attribute__((swiftcall)) CC_PreserveMost, // __attribute__((preserve_most)) CC_PreserveAll, // __attribute__((preserve_all)) CC_AArch64VectorCall, // __attribute__((aarch64_vector_pcs)) }; /// Checks whether the given calling convention supports variadic /// calls. Unprototyped calls also use the variadic call rules. inline bool supportsVariadicCall(CallingConv CC) { switch (CC) { case CC_X86StdCall: case CC_X86FastCall: case CC_X86ThisCall: case CC_X86RegCall: case CC_X86Pascal: case CC_X86VectorCall: case CC_SpirFunction: case CC_OpenCLKernel: case CC_Swift: return false; default: return true; } } /// The storage duration for an object (per C++ [basic.stc]). enum StorageDuration { SD_FullExpression, ///< Full-expression storage duration (for temporaries). SD_Automatic, ///< Automatic storage duration (most local variables). SD_Thread, ///< Thread storage duration. SD_Static, ///< Static storage duration. SD_Dynamic ///< Dynamic storage duration. }; /// Describes the nullability of a particular type. enum class NullabilityKind : uint8_t { /// Values of this type can never be null. NonNull = 0, /// Values of this type can be null. Nullable, /// Whether values of this type can be null is (explicitly) /// unspecified. This captures a (fairly rare) case where we /// can't conclude anything about the nullability of the type even /// though it has been considered. Unspecified }; /// Return true if \p L has a weaker nullability annotation than \p R. The /// ordering is: Unspecified < Nullable < NonNull. inline bool hasWeakerNullability(NullabilityKind L, NullabilityKind R) { return uint8_t(L) > uint8_t(R); } /// Retrieve the spelling of the given nullability kind. llvm::StringRef getNullabilitySpelling(NullabilityKind kind, bool isContextSensitive = false); /// Kinds of parameter ABI. enum class ParameterABI { /// This parameter uses ordinary ABI rules for its type. Ordinary, /// This parameter (which must have pointer type) is a Swift /// indirect result parameter. SwiftIndirectResult, /// This parameter (which must have pointer-to-pointer type) uses /// the special Swift error-result ABI treatment. There can be at /// most one parameter on a given function that uses this treatment. SwiftErrorResult, /// This parameter (which must have pointer type) uses the special /// Swift context-pointer ABI treatment. There can be at /// most one parameter on a given function that uses this treatment. SwiftContext }; /// Assigned inheritance model for a class in the MS C++ ABI. Must match order /// of spellings in MSInheritanceAttr. enum class MSInheritanceModel { Single = 0, Multiple = 1, Virtual = 2, Unspecified = 3, }; llvm::StringRef getParameterABISpelling(ParameterABI kind); inline llvm::StringRef getAccessSpelling(AccessSpecifier AS) { switch (AS) { case AccessSpecifier::AS_public: return "public"; case AccessSpecifier::AS_protected: return "protected"; case AccessSpecifier::AS_private: return "private"; case AccessSpecifier::AS_none: return {}; } llvm_unreachable("Unknown AccessSpecifier"); } } // end namespace clang #endif // LLVM_CLANG_BASIC_SPECIFIERS_H
Upload File
Create Folder