Debian Codegraph @

clang/test/SemaObjCXX/instantiate-property-access.mm

raw
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
2 // expected-no-diagnostics
3
4 class C {};
5 bool operator == (C c1, C c2);
6
7 bool operator == (C c1, int i);
8 bool operator == (int i, C c2);
9
10 C operator += (C c1, C c2);
11
12 enum TextureType { TextureType3D };
13
14 @interface Texture
15 @property int textureType;
16 @property C c;
17 @end
18
19 template <typename> class Framebuffer {
20 public:
21 Texture **color_attachment;
22 Framebuffer();
23 };
24
25 template <typename T> Framebuffer<T>::Framebuffer() {
26 (void)(color_attachment[0].textureType == TextureType3D);
27 color_attachment[0].textureType += 1;
28 (void)(color_attachment[0].c == color_attachment[0].c);
29 (void)(color_attachment[0].c == 1);
30 (void)(1 == color_attachment[0].c);
31 }
32
33 void foo() {
34 Framebuffer<int>();
35 }