summaryrefslogtreecommitdiffstats
path: root/include/clang/Basic/ExceptionSpecificationType.h
diff options
context:
space:
mode:
authorSebastian Redl <sebastian.redl@getdesigned.at>2011-03-06 10:52:04 +0000
committerSebastian Redl <sebastian.redl@getdesigned.at>2011-03-06 10:52:04 +0000
commit8b5b4099c61a136e9a1714c4d8a593febe942268 (patch)
treea841ec99921f03ce9577a2216960103d96dfd95c /include/clang/Basic/ExceptionSpecificationType.h
parent5453d93ab8668f2d9d0bc02182695b02d207e32d (diff)
Reinstate r127112, "Propagate new-style exception spec information to ExtProtoInfo.", this time with the missing header.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127118 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/ExceptionSpecificationType.h')
-rw-r--r--include/clang/Basic/ExceptionSpecificationType.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/include/clang/Basic/ExceptionSpecificationType.h b/include/clang/Basic/ExceptionSpecificationType.h
new file mode 100644
index 0000000000..48621c73d7
--- /dev/null
+++ b/include/clang/Basic/ExceptionSpecificationType.h
@@ -0,0 +1,38 @@
+//===--- ExceptionSpecificationType.h ---------------------------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file defines the ExceptionSpecificationType enumeration and various
+// utility functions.
+//
+//===----------------------------------------------------------------------===//
+#ifndef LLVM_CLANG_BASIC_EXCEPTIONSPECIFICATIONTYPE_H
+#define LLVM_CLANG_BASIC_EXCEPTIONSPECIFICATIONTYPE_H
+
+namespace clang {
+
+/// \brief The various types of exception specifications that exist in C++0x.
+enum ExceptionSpecificationType {
+ EST_None, ///< no exception specification
+ EST_Dynamic, ///< throw() or throw(T1, T2)
+ EST_DynamicAny, ///< Microsoft throw(...) extension
+ EST_BasicNoexcept, ///< noexcept
+ EST_ComputedNoexcept ///< noexcept(expression)
+};
+
+inline bool isDynamicExceptionSpec(ExceptionSpecificationType ESpecType) {
+ return ESpecType == EST_Dynamic || ESpecType == EST_DynamicAny;
+}
+
+inline bool isNoexceptExceptionSpec(ExceptionSpecificationType ESpecType) {
+ return ESpecType == EST_BasicNoexcept || ESpecType == EST_ComputedNoexcept;
+}
+
+} // end namespace clang
+
+#endif // LLVM_CLANG_BASIC_EXCEPTIONSPECIFICATIONTYPE_H