diff options
author | David Majnemer <david.majnemer@gmail.com> | 2016-06-11 01:25:04 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2016-06-11 01:25:04 +0000 |
commit | 5d321e63c02c0399739d4f48695086b7dc2306db (patch) | |
tree | 230c1cd013c92d92990c40fda9e9706ed3342ddc /clang/test/SemaCXX/ms-exception-spec.cpp | |
parent | 959a8c974df3c0b9240172b685cd1563171b30a0 (diff) | |
download | bcm5719-llvm-5d321e63c02c0399739d4f48695086b7dc2306db.tar.gz bcm5719-llvm-5d321e63c02c0399739d4f48695086b7dc2306db.zip |
[Sema] Return an appropriate result from CheckSpecifiedExceptionType
We shouldn't return true from CheckSpecifiedExceptionType if
the record type is incomplete and -fms-extensions is engaged. Otherwise
we will have an incomplete AST.
llvm-svn: 272447
Diffstat (limited to 'clang/test/SemaCXX/ms-exception-spec.cpp')
-rw-r--r-- | clang/test/SemaCXX/ms-exception-spec.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/test/SemaCXX/ms-exception-spec.cpp b/clang/test/SemaCXX/ms-exception-spec.cpp index 81e04dd54df..07633791b9f 100644 --- a/clang/test/SemaCXX/ms-exception-spec.cpp +++ b/clang/test/SemaCXX/ms-exception-spec.cpp @@ -1,8 +1,9 @@ -// RUN: %clang_cc1 %s -fsyntax-only -verify -fms-extensions +// RUN: %clang_cc1 %s -fsyntax-only -verify -fms-extensions -fexceptions -fcxx-exceptions void f() throw(...) { } namespace PR28080 { -struct S; // expected-note {{forward declaration}} -void fn() throw(S); // expected-warning {{incomplete type}} +struct S; // expected-note {{forward declaration}} +void fn() throw(S); // expected-warning {{incomplete type}} expected-note{{previous declaration}} +void fn() throw(); // expected-warning {{does not match previous declaration}} } |