]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/SemaCXX/unknown-anytype-blocks.cpp
Vendor import of clang trunk r154661:
[FreeBSD/FreeBSD.git] / test / SemaCXX / unknown-anytype-blocks.cpp
1 // RUN: %clang_cc1 -funknown-anytype -fblocks -fsyntax-only -verify -std=c++11 %s
2
3 namespace test1 {
4   __unknown_anytype (^foo)();
5   __unknown_anytype (^bar)();
6   int test() {
7     auto ret1 = (int)foo();
8     auto ret2 = bar(); // expected-error {{'bar' has unknown return type; cast the call to its declared return type}}
9     return ret1;
10   }
11 }