summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/exceptions.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-03-08 01:47:36 +0000
committerDouglas Gregor <dgregor@apple.com>2010-03-08 01:47:36 +0000
commit104ee00181f90735eaa945ac628d594e483edbcc (patch)
tree535a71adc1a987f8367468f76a7157bb33ed25ed /clang/test/SemaCXX/exceptions.cpp
parent3681e58d8b61134d81be28ad19e89d2f54f38f19 (diff)
downloadbcm5719-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.cpp4
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'}}
OpenPOWER on IntegriCloud