diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-03-08 01:47:36 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-03-08 01:47:36 +0000 |
commit | 104ee00181f90735eaa945ac628d594e483edbcc (patch) | |
tree | 535a71adc1a987f8367468f76a7157bb33ed25ed /clang/test/SemaCXX/exceptions.cpp | |
parent | 3681e58d8b61134d81be28ad19e89d2f54f38f19 (diff) | |
download | bcm5719-llvm-104ee00181f90735eaa945ac628d594e483edbcc.tar.gz bcm5719-llvm-104ee00181f90735eaa945ac628d594e483edbcc.zip |
Downgrade errors when trying to catch a pointer or reference to
incomplete type to warnings; GCC (and EDG in GCC compatibility mode)
permit such handles. Fixes PR6527.
(For real this time)
llvm-svn: 97927
Diffstat (limited to 'clang/test/SemaCXX/exceptions.cpp')
-rw-r--r-- | clang/test/SemaCXX/exceptions.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/test/SemaCXX/exceptions.cpp b/clang/test/SemaCXX/exceptions.cpp index 924b48aad26..ab37e3c6446 100644 --- a/clang/test/SemaCXX/exceptions.cpp +++ b/clang/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 'struct A'}} - } catch(A *a) { // expected-error {{cannot catch pointer to incomplete type 'struct A'}} - } catch(A &a) { // expected-error {{cannot catch reference to incomplete type 'struct A'}} + } catch(A *a) { // expected-warning {{pointer to incomplete type 'struct A'}} + } catch(A &a) { // expected-warning {{reference to incomplete type 'struct A'}} } catch(Abstract) { // expected-error {{variable type 'Abstract' is an abstract class}} } catch(...) { int j = i; // expected-error {{use of undeclared identifier 'i'}} |