Skip to content
Snippets Groups Projects
Commit 14f26085 authored by Alp Toker's avatar Alp Toker
Browse files

Test to ensure no old-style-cast warning is emitted for objc-arc __bridge casts

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196204 91177308-0d34-0410-b5e6-96231b3b80d8
parent 52de45a8
No related branches found
No related tags found
No related merge requests found
// RUN: %clang_cc1 -triple x86_64-apple-darwin11 -fsyntax-only -fobjc-arc -Wold-style-cast -verify %s
// expected-no-diagnostics
// We don't currently have a way to write ARC/C++ bridge casts in terms of C++
// casts, so ensure we don't emit an old-style-cast warning in these cases.
id test(void *opaqueInput) {
id someObjCObject = (__bridge id)opaqueInput;
void *someCFObject = (__bridge_retained void *)someObjCObject;
return (__bridge_transfer id)someCFObject;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment