diff options
Diffstat (limited to 'include/clang/Basic/Specifiers.h')
-rw-r--r-- | include/clang/Basic/Specifiers.h | 35 |
1 files changed, 32 insertions, 3 deletions
diff --git a/include/clang/Basic/Specifiers.h b/include/clang/Basic/Specifiers.h index eb3fc65..0b80939 100644 --- a/include/clang/Basic/Specifiers.h +++ b/include/clang/Basic/Specifiers.h @@ -131,8 +131,8 @@ namespace clang { OK_ObjCSubscript }; - // \brief Describes the kind of template specialization that a - // particular template specialization declaration represents. + /// \brief 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. @@ -154,6 +154,13 @@ namespace clang { TSK_ExplicitInstantiationDefinition }; + /// \brief 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; + } + /// \brief Thread storage-class-specifier. enum ThreadStorageClassSpecifier { TSCS_unspecified, @@ -200,18 +207,40 @@ namespace clang { /// \brief CallingConv - Specifies the calling convention that a function uses. enum CallingConv { - CC_Default, CC_C, // __attribute__((cdecl)) CC_X86StdCall, // __attribute__((stdcall)) CC_X86FastCall, // __attribute__((fastcall)) CC_X86ThisCall, // __attribute__((thiscall)) CC_X86Pascal, // __attribute__((pascal)) + CC_X86_64Win64, // __attribute__((ms_abi)) + CC_X86_64SysV, // __attribute__((sysv_abi)) CC_AAPCS, // __attribute__((pcs("aapcs"))) CC_AAPCS_VFP, // __attribute__((pcs("aapcs-vfp"))) CC_PnaclCall, // __attribute__((pnaclcall)) CC_IntelOclBicc // __attribute__((intel_ocl_bicc)) }; + /// \brief Checks whether the given calling convention is callee-cleanup. + inline bool isCalleeCleanup(CallingConv CC) { + switch (CC) { + case CC_X86StdCall: + case CC_X86FastCall: + case CC_X86ThisCall: + case CC_X86Pascal: + return true; + default: + return false; + } + } + + /// \brief 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. + }; } // end namespace clang #endif // LLVM_CLANG_BASIC_SPECIFIERS_H |