repo.or.cz
/
llvm-project.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
history
|
raw
|
HEAD
[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git]
/
clang
/
test
/
SemaObjCXX
/
cstyle-cast.mm
blob
29a8404660c97746039411e418904a2fbc15ac2b
1
// RUN: %clang_cc1 -fsyntax-only -verify %s
2
3
@protocol P @end
4
@interface I @end
5
6
struct X { X(); };
7
8
void test1(X x) {
9
void *cft;
10
id oct = (id)cft;
11
12
Class ccct;
13
ccct = (Class)cft;
14
15
I* iict = (I*)cft;
16
17
id<P> qid = (id<P>)cft;
18
19
I<P> *ip = (I<P>*)cft;
20
21
(id)x; // expected-error {{cannot convert 'X' to 'id' without a conversion operator}}
22
23
id *pid = (id*)ccct;
24
25
id<P> *qpid = (id<P>*)ccct;
26
27
int **pii;
28
29
ccct = (Class)pii;
30
31
qpid = (id<P>*)pii;
32
33
iict = (I*)pii;
34
35
pii = (int **)ccct;
36
37
pii = (int **)qpid;
38
39
}
40