diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-12-08 02:49:07 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-12-08 02:49:07 +0000 |
commit | 1f0155f24337194f4706f727db42f467244caa9e (patch) | |
tree | 967a086ef85d076431ae92fa4fe09afe0d1d50ea /include/clang/Basic/DiagnosticGroups.td | |
parent | f5457ae5ebdeb012f213018a46dfea196ea1a872 (diff) |
[c++1z] P0003R5: Removing dynamic exception specifications.
We continue to support dynamic exception specifications in C++1z as an
extension, but produce an error-by-default warning when we encounter one. This
allows users to opt back into the feature with a warning flag, and implicitly
opts system headers back into the feature should they happen to use it.
There is one semantic change implied by P0003R5 but not implemented here:
violating a throw() exception specification should now call std::terminate
directly instead of calling std::unexpected(), but since P0003R5 also removes
std::unexpected() and std::set_unexpected, and the default unexpected handler
calls std::terminate(), a conforming C++1z program cannot tell that we are
still calling it. The upside of this strategy is perfect backwards
compatibility; the downside is that we don't get the more efficient 'noexcept'
codegen for 'throw()'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289019 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/DiagnosticGroups.td')
-rw-r--r-- | include/clang/Basic/DiagnosticGroups.td | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/clang/Basic/DiagnosticGroups.td b/include/clang/Basic/DiagnosticGroups.td index e1e503737c..c1b831b771 100644 --- a/include/clang/Basic/DiagnosticGroups.td +++ b/include/clang/Basic/DiagnosticGroups.td @@ -97,6 +97,8 @@ def UnavailableDeclarations : DiagGroup<"unavailable-declarations">; def UnguardedAvailability : DiagGroup<"unguarded-availability">; // partial-availability is an alias of unguarded-availability. def : DiagGroup<"partial-availability", [UnguardedAvailability]>; +def DeprecatedDynamicExceptionSpec + : DiagGroup<"deprecated-dynamic-exception-spec">; def DeprecatedImplementations :DiagGroup<"deprecated-implementations">; def DeprecatedIncrementBool : DiagGroup<"deprecated-increment-bool">; def DeprecatedRegister : DiagGroup<"deprecated-register">; @@ -105,11 +107,15 @@ def DeprecatedWritableStr : DiagGroup<"deprecated-writable-strings", // FIXME: Why is DeprecatedImplementations not in this group? def Deprecated : DiagGroup<"deprecated", [DeprecatedAttributes, DeprecatedDeclarations, + DeprecatedDynamicExceptionSpec, DeprecatedIncrementBool, DeprecatedRegister, DeprecatedWritableStr]>, DiagCategory<"Deprecations">; +def DynamicExceptionSpec + : DiagGroup<"dynamic-exception-spec", [DeprecatedDynamicExceptionSpec]>; + def LibLTO : DiagGroup<"liblto">; def : DiagGroup<"disabled-optimization">; def : DiagGroup<"discard-qual">; |