diff options
author | Alex Lorenz <arphaman@gmail.com> | 2017-05-16 13:58:53 +0000 |
---|---|---|
committer | Alex Lorenz <arphaman@gmail.com> | 2017-05-16 13:58:53 +0000 |
commit | f1eb6badafec640a73d6bada228f7bbc74a4c22c (patch) | |
tree | 256cbe546476a05bdc20b04e3233a40f3e373c68 /test/SemaObjC | |
parent | b5e2ee2f62458c5f3f726fffed4a9c193b722c6f (diff) |
[Sema] Avoid duplicate -Wunguarded-availability warnings in nested functions
rdar://31862310
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@303170 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaObjC')
-rw-r--r-- | test/SemaObjC/unguarded-availability.m | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/test/SemaObjC/unguarded-availability.m b/test/SemaObjC/unguarded-availability.m index a83b839139..071a21ea1b 100644 --- a/test/SemaObjC/unguarded-availability.m +++ b/test/SemaObjC/unguarded-availability.m @@ -8,7 +8,7 @@ int func_10_11() AVAILABLE_10_11; // expected-note 4 {{'func_10_11' has been explicitly marked partial here}} #ifdef OBJCPP -// expected-note@+2 2 {{marked partial here}} +// expected-note@+2 6 {{marked partial here}} #endif int func_10_12() AVAILABLE_10_12; // expected-note 6 {{'func_10_12' has been explicitly marked partial here}} @@ -188,4 +188,19 @@ auto topLevelLambda = [] () { func_10_12(); }; +void functionInFunction() { + func_10_12(); // expected-warning{{'func_10_12' is only available on macOS 10.12 or newer}} expected-note{{@available}} + struct DontWarnTwice { + void f() { + func_10_12(); // expected-warning{{'func_10_12' is only available on macOS 10.12 or newer}} expected-note{{@available}} + } + }; + void([] () { + func_10_12(); // expected-warning{{'func_10_12' is only available on macOS 10.12 or newer}} expected-note{{@available}} + }); + (void)(^ { + func_10_12(); // expected-warning{{'func_10_12' is only available on macOS 10.12 or newer}} expected-note{{@available}} + }); +} + #endif |