diff options
| author | Douglas Gregor <dgregor@apple.com> | 2010-07-08 20:27:32 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2010-07-08 20:27:32 +0000 |
| commit | eaff2cbbabc1a1e6b1cbf6d146376af5d7374dec (patch) | |
| tree | b4cb176b773cc044577d8b17e1c1cd74602acf36 /clang/test/SemaCXX/blocks-1.cpp | |
| parent | 0f54854a1d39480d2af9f47eef2a2b59379373a3 (diff) | |
| download | bcm5719-llvm-eaff2cbbabc1a1e6b1cbf6d146376af5d7374dec.tar.gz bcm5719-llvm-eaff2cbbabc1a1e6b1cbf6d146376af5d7374dec.zip | |
Allow C-style casts and reinterpret_casts between block pointers and
either integer values or other pointers. Fixes <rdar://problem/8134521>.
llvm-svn: 107905
Diffstat (limited to 'clang/test/SemaCXX/blocks-1.cpp')
| -rw-r--r-- | clang/test/SemaCXX/blocks-1.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/blocks-1.cpp b/clang/test/SemaCXX/blocks-1.cpp index d93997ad683..29de1e666ad 100644 --- a/clang/test/SemaCXX/blocks-1.cpp +++ b/clang/test/SemaCXX/blocks-1.cpp @@ -33,3 +33,13 @@ int main (int argc, const char * argv[]) { return 0; } + +namespace rdar8134521 { + void foo() { + int (^P)(int) = reinterpret_cast<int(^)(int)>(1); + P = (int(^)(int))(1); + + P = reinterpret_cast<int(^)(int)>((void*)1); + P = (int(^)(int))((void*)1); + } +} |

