summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/exceptions.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-03-07 23:28:27 +0000
committerDouglas Gregor <dgregor@apple.com>2010-03-07 23:28:27 +0000
commit254bba409557a721b294f0ce064fb3e7744fc394 (patch)
tree6e452b37f6a8dde2b55d0c05618b8a475e3be964 /clang/test/SemaCXX/exceptions.cpp
parent281c486e1bf02b9354a3781d861cebfbf877a75e (diff)
downloadbcm5719-llvm-254bba409557a721b294f0ce064fb3e7744fc394.tar.gz
bcm5719-llvm-254bba409557a721b294f0ce064fb3e7744fc394.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. llvm-svn: 97925
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