diff options
author | Douglas Gregor <dgregor@apple.com> | 2012-01-24 19:01:26 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2012-01-24 19:01:26 +0000 |
commit | ecd7b04ae7764179d40ee4e3e49c99d1fbcb4eff (patch) | |
tree | a47be8344cf22856f788c0eb31409ce8705974e5 /test/SemaCXX/exceptions.cpp | |
parent | cd0d56a523f877ffd1fe1575caf758b4357f1661 (diff) |
Promote the extension warning for attempts to catch a reference or
pointer to incomplete type from an ExtWarn to an error. We put the
ExtWarn in place as part of a workaround for Boost (PR6527), but it
(1) doesn't actually match a GCC extension and (2) has been fixed for
two years in Boost, and (3) causes us to emit code that fails badly at
run time, so it's a bad idea to keep it. Fixes PR11803.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148838 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/exceptions.cpp')
-rw-r--r-- | test/SemaCXX/exceptions.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/SemaCXX/exceptions.cpp b/test/SemaCXX/exceptions.cpp index 908ff38177..486d88eab7 100644 --- a/test/SemaCXX/exceptions.cpp +++ b/test/SemaCXX/exceptions.cpp @@ -12,8 +12,8 @@ void trys() { } catch(float i) { } catch(void v) { // expected-error {{cannot catch incomplete type 'void'}} } catch(A a) { // expected-error {{cannot catch incomplete type 'A'}} - } catch(A *a) { // expected-warning {{ISO C++ forbids catching a pointer to incomplete type 'A'}} - } catch(A &a) { // expected-warning {{ISO C++ forbids catching a reference to incomplete type 'A'}} + } catch(A *a) { // expected-error {{cannot catch pointer to incomplete type 'A'}} + } catch(A &a) { // expected-error {{cannot catch reference to incomplete type 'A'}} } catch(Abstract) { // expected-error {{variable type 'Abstract' is an abstract class}} } catch(...) { int j = i; // expected-error {{use of undeclared identifier 'i'}} |