1 //===--- ExceptionSpecificationType.h ---------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file defines the ExceptionSpecificationType enumeration and various
13 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_CLANG_BASIC_EXCEPTIONSPECIFICATIONTYPE_H
15 #define LLVM_CLANG_BASIC_EXCEPTIONSPECIFICATIONTYPE_H
19 /// \brief The various types of exception specifications that exist in C++0x.
20 enum ExceptionSpecificationType {
21 EST_None, ///< no exception specification
22 EST_DynamicNone, ///< throw()
23 EST_Dynamic, ///< throw(T1, T2)
24 EST_MSAny, ///< Microsoft throw(...) extension
25 EST_BasicNoexcept, ///< noexcept
26 EST_ComputedNoexcept, ///< noexcept(expression)
27 EST_Delayed ///< not known yet
30 inline bool isDynamicExceptionSpec(ExceptionSpecificationType ESpecType) {
31 return ESpecType >= EST_DynamicNone && ESpecType <= EST_MSAny;
34 inline bool isNoexceptExceptionSpec(ExceptionSpecificationType ESpecType) {
35 return ESpecType == EST_BasicNoexcept || ESpecType == EST_ComputedNoexcept;
38 } // end namespace clang
40 #endif // LLVM_CLANG_BASIC_EXCEPTIONSPECIFICATIONTYPE_H