diff options
Diffstat (limited to 'test/SemaCXX/blocks.cpp')
-rw-r--r-- | test/SemaCXX/blocks.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/SemaCXX/blocks.cpp b/test/SemaCXX/blocks.cpp index 4fd9941a2e..adbff553e6 100644 --- a/test/SemaCXX/blocks.cpp +++ b/test/SemaCXX/blocks.cpp @@ -48,16 +48,23 @@ namespace radar8382559 { int test3() { __attribute__((__blocks__(byref))) bool hasProperty = false; + bool has = true; + bool (^b)() = ^ { func(hasProperty); if (hasProperty) hasProperty = 0; + if (has) + hasProperty = 1; return hasProperty; }; func(hasProperty); + func(has); b(); if (hasProperty) hasProperty = 1; + if (has) + has = 2; return hasProperty = 1; } } |