diff options
| author | Akira Hatanaka <ahatanaka@apple.com> | 2019-01-23 00:55:48 +0000 |
|---|---|---|
| committer | Akira Hatanaka <ahatanaka@apple.com> | 2019-01-23 00:55:48 +0000 |
| commit | 957accaef0f02660b95f49c9d3d36e5f67b0454c (patch) | |
| tree | f7ce73a25026079db76d866dc940a9fc21d9cc5a /clang/test | |
| parent | 7a3108ff0f9a24cb8d80e708371d8520d8af6ab5 (diff) | |
| download | bcm5719-llvm-957accaef0f02660b95f49c9d3d36e5f67b0454c.tar.gz bcm5719-llvm-957accaef0f02660b95f49c9d3d36e5f67b0454c.zip | |
[Sema][ObjC] Check whether a DelayedDiagnosticPool has been pushed
before adding a delayed diagnostic to DelayedDiagnostics.
This fixes an assertion failure in Sema::DelayedDiagnostics::add that
was caused by the changes made in r141037.
rdar://problem/42782323
llvm-svn: 351911
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/SemaObjCXX/arc-0x.mm | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/SemaObjCXX/arc-0x.mm b/clang/test/SemaObjCXX/arc-0x.mm index 391fc47f342..d0f3284a180 100644 --- a/clang/test/SemaObjCXX/arc-0x.mm +++ b/clang/test/SemaObjCXX/arc-0x.mm @@ -101,3 +101,13 @@ namespace rdar12078752 { __autoreleasing auto o3 = o; } } + +namespace test_err_arc_array_param_no_ownership { + template <class T> + void func(T a) {} + + void test() { + func([](A *a[]){}); // expected-error{{must explicitly describe intended ownership of an object array parameter}} + func(^(A *a[]){}); // expected-error{{must explicitly describe intended ownership of an object array parameter}} + } +} |

