summaryrefslogtreecommitdiff
path: root/include/clang/Basic
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2014-11-13 20:01:57 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2014-11-13 20:01:57 +0000
commit773d19cce43a660639a26fca94ca387c2faf4d39 (patch)
tree16e359819d823925ac23838fa87d1fabf779de23 /include/clang/Basic
parent8cfc35fd80d49139924dba5d544675c1ebae8efb (diff)
downloadclang-773d19cce43a660639a26fca94ca387c2faf4d39.tar.gz
PR21437, final part of DR1330: delay-parsing of exception-specifications. This
is a re-commit of Doug's r154844 (modernized and updated to fit into current Clang). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221918 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic')
-rw-r--r--include/clang/Basic/DiagnosticParseKinds.td2
-rw-r--r--include/clang/Basic/DiagnosticSemaKinds.td2
-rw-r--r--include/clang/Basic/ExceptionSpecificationType.h3
-rw-r--r--include/clang/Basic/TokenKinds.def1
4 files changed, 7 insertions, 1 deletions
diff --git a/include/clang/Basic/DiagnosticParseKinds.td b/include/clang/Basic/DiagnosticParseKinds.td
index eb03f5a3aa..6bf19108b1 100644
--- a/include/clang/Basic/DiagnosticParseKinds.td
+++ b/include/clang/Basic/DiagnosticParseKinds.td
@@ -496,6 +496,8 @@ def ext_ellipsis_exception_spec : Extension<
InGroup<Microsoft>;
def err_dynamic_and_noexcept_specification : Error<
"cannot have both throw() and noexcept() clause on the same function">;
+def err_except_spec_unparsed : Error<
+ "unexpected end of exception specification">;
def warn_cxx98_compat_noexcept_decl : Warning<
"noexcept specifications are incompatible with C++98">,
InGroup<CXX98Compat>, DefaultIgnore;
diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td
index 33e28c7b8b..4a528c4c36 100644
--- a/include/clang/Basic/DiagnosticSemaKinds.td
+++ b/include/clang/Basic/DiagnosticSemaKinds.td
@@ -1117,6 +1117,8 @@ def warn_missing_exception_specification : Warning<
"%0 is missing exception specification '%1'">;
def err_noexcept_needs_constant_expression : Error<
"argument to noexcept specifier must be a constant expression">;
+def err_exception_spec_not_parsed : Error<
+ "exception specification is not available until end of class definition">;
// C++ access checking
def err_class_redeclared_with_different_access : Error<
diff --git a/include/clang/Basic/ExceptionSpecificationType.h b/include/clang/Basic/ExceptionSpecificationType.h
index edd89ec709..132b5ba1e5 100644
--- a/include/clang/Basic/ExceptionSpecificationType.h
+++ b/include/clang/Basic/ExceptionSpecificationType.h
@@ -26,7 +26,8 @@ enum ExceptionSpecificationType {
EST_BasicNoexcept, ///< noexcept
EST_ComputedNoexcept, ///< noexcept(expression)
EST_Unevaluated, ///< not evaluated yet, for special member function
- EST_Uninstantiated ///< not instantiated yet
+ EST_Uninstantiated, ///< not instantiated yet
+ EST_Unparsed ///< not parsed yet
};
inline bool isDynamicExceptionSpec(ExceptionSpecificationType ESpecType) {
diff --git a/include/clang/Basic/TokenKinds.def b/include/clang/Basic/TokenKinds.def
index c96b8eb4d6..c63dea0fa5 100644
--- a/include/clang/Basic/TokenKinds.def
+++ b/include/clang/Basic/TokenKinds.def
@@ -117,6 +117,7 @@ TOK(eod) // End of preprocessing directive (end of line inside a
// directive).
TOK(code_completion) // Code completion marker
TOK(cxx_defaultarg_end) // C++ default argument end marker
+TOK(cxx_exceptspec_end) // C++ exception-specification end marker
// C99 6.4.9: Comments.
TOK(comment) // Comment (only in -E -C[C] mode)