Lines Matching defs:int
12 struct A { int a; struct a {}; }; // expected-note 2{{conflicting}} expected-note {{ambiguous}}
13 struct B { int a; struct a {}; }; // expected-note 2{{target}} expected-note {{ambiguous}}
24 typedef int type; // expected-note {{protected}}
28 typedef int type; // expected-note {{private}}
33 typedef int type; // expected-note {{private}}
34 friend class A<D, int>;
46 typedef int type;
66 int f(void*);
71 int k = f(p); // ok, finds A::f, even though type XS is a typedef-name
82 static int n; // expected-error {{static data member 'n' not allowed in anonymous struct}}
103 typedef int S; // expected-note {{found}}
141 template<int N> void g() { int arr[N != 1 ? 1 : -1]; }
145 static int i[];
148 template<typename T> int S<T>::i[] = { 1 };
151 g<sizeof (i) / sizeof (int)>();
153 template<> int S<int>::i[] = { 1, 2 };
154 template void S<int>::f(); // uses g<2>(), not g<1>().
158 static int arr[];
161 template<typename T> int R<T>::arr[1];
163 int arr[sizeof(arr) != sizeof(int) ? 1 : -1];
165 template<> int R<int>::arr[2];
166 template void R<int>::f();
171 typedef int B;
181 void g(int);
186 friend void f<>(int);
187 friend void h<>(int);
188 friend void g(int);
190 friend void i<>(int);
195 template<> void h(int) { A::z(); }
198 template<> void i(int) { A::z(); }
200 template<> void f(int) { M::A::z(); }
201 void g(int) { M::A::z(); } // expected-error {{private}}
208 int a;
209 int : 17;
210 int b;
216 int a;
218 int b;
235 void f(int, int);
241 int &operator+(const A&, const A&);
242 int &k = a + a;
287 template void test<int>(int*);
288 template void test<int>(ptr<int>);
294 p->template Y<int>::~Y<int>();
295 p->~Y<int>();
298 p->template ~Y<int>(); // expected-error 2{{no member named '~typename Y<int>'}}
301 template void test2(Y<int>*); // expected-note {{instantiation}}
302 template void test2(ptr<Y<int> >); // expected-note {{instantiation}}
304 void test3(int *p, ptr<int> q) {
305 typedef int Int;
306 p->~Int();
307 q->~Int();
308 p->Int::~Int();
309 q->Int::~Int();
315 void test4(int *p, ptr<int> q) {
316 p->~id<int>();
317 q->~id<int>();
318 p->id<int>::~id<int>();
319 q->id<int>::~id<int>();
320 p->template id<int>::~id<int>(); // expected-error {{expected unqualified-id}}
321 q->template id<int>::~id<int>(); // expected-error {{expected unqualified-id}}
322 p->A::template id<int>::~id<int>();
323 q->A::template id<int>::~id<int>();
329 struct X { X(); int n; int &r; };
330 int *p = &X().n; // expected-error {{taking the address of a temporary}}
331 int *q = &X().r;
339 template void f<int, int>();
340 template void f<int, char>(); // expected-note {{instantiation}}
345 void f(X<int> x) { x += 1; }
350 typedef int N; // expected-note {{previous}}
351 typedef int N; // expected-error {{redefinition}}
364 typedef int N;
367 typedef int N; // expected-note {{previous}}
368 typedef int N; // expected-error {{redefinition}}
433 void f(int n) {
434 int a[] = { n++, n++, n++ };
455 A::B<int> *b = a.get<A::B<int> >();
456 b->get<int>();
457 b->A::B<int>::get<int>();
458 b->A::B<int>::get<T>();
459 b->A::B<T>::get<int>(); // expected-error {{use 'template'}}
460 b->A::B<T>::template get<int>();
464 c->get<int>(); // expected-error {{use 'template'}}
465 c->template get<int>();
485 S<int> s;
490 const int ci = 0;
491 int *pi = 0;
492 const int *&rpci = pi; // expected-error {{cannot bind}}
566 struct A { int n; int a[4]; };
567 template<int> struct U {
568 typedef int type;
572 template<typename T, int N> void f(int n) {
574 g(__builtin_offsetof(A, n)).h<int>();
575 g(__builtin_offsetof(T, n)).h<int>();
580 int>(); // expected-error {{extension}}
581 g(__builtin_offsetof(A, a[N])).h<int>(); // expected-error {{extension}}
588 template<typename T = int> void f(int); // expected-error 0-1{{extension}} expected-note {{no known conversion}}
595 template void g(int); // ok
602 typedef int A[3];
619 const int a = 1 / 0; // expected-warning {{undefined}}
620 const int b = 1 / 0; // expected-warning {{undefined}}
621 int arr[b]; // expected-error +{{variable length arr}}
626 int a, b, c;
628 int f();
637 const int null = 0;
655 const int a = 1;
656 const volatile int b = 1;
657 int ax[a];
658 int bx[b]; // expected-error +{{variable length array}}
668 int T;
669 int f();
670 template<typename> int g();
674 int f();
675 template<typename> int g();
676 template<typename> int h();
679 int A::f() {
683 int A::g() {
688 int B<T>::f() {
692 int B<T>::g() {
696 int B<U>::h() {
702 namespace X { namespace Q { int n; } }
717 typedef int I;
718 typedef const int CI;
719 typedef volatile int VI;
720 void f(int *a, CI *b, VI *c) {
747 int stuff();
749 int f() {
753 static int k = stuff();
758 int g() {
760 int k = stuff(); // expected-note {{bypasses variable initialization}}
770 static int C;
773 int k = dr468::template A<int>::template B<char>::C;
784 X<int&> x; // expected-error {{undefined}}
785 X<int()> y; // expected-error {{undefined}}
807 template struct A<int>; // expected-note {{previous}}
808 template struct A<int>::B; // expected-error {{duplicate explicit instantiation}}
816 struct A { int n; };
819 struct D : B, C { int f() { return n; } };
823 struct F : E, B { int f() { return n; } };
828 struct H : B, G { int f() { return n; } }; // expected-error {{private}}
840 int g();
842 int g(); // expected-error {{cannot be overloaded}}
901 struct A { int n; };
906 int A::*a = &A::n;
907 int D::*b = a; // expected-error {{virtual base}}
909 extern int D::*c;
910 int A::*d = static_cast<int A::*>(c); // expected-error {{virtual base}}
940 template struct E<int>; // expected-note {{instantiation of}}
943 A<int> *B,
954 typedef int N;
961 extern int a;
964 int dr482::a = 0; // expected-warning {{extra qualification}}
968 extern int b;
972 int dr482::b = 0; // expected-warning {{extra qualification}}
981 namespace N { typedef int type; }
982 typedef int N::type; // expected-error {{typedef declarator cannot be qualified}}
996 int check1[__SCHAR_MAX__ >= 127 ? 1 : -1];
997 int check2[__SHRT_MAX__ >= 32767 ? 1 : -1];
998 int check3[__INT_MAX__ >= 32767 ? 1 : -1];
999 int check4[__LONG_MAX__ >= 2147483647 ? 1 : -1];
1000 int check5[__LONG_LONG_MAX__ >= 9223372036854775807 ? 1 : -1];
1006 int check1[__PTRDIFF_WIDTH__ >= 16 ? 1 : -1];
1007 int check2[__SIG_ATOMIC_WIDTH__ >= 8 ? 1 : -1];
1008 int check3[__SIZE_WIDTH__ >= 16 ? 1 : -1];
1009 int check4[__WCHAR_WIDTH__ >= 8 ? 1 : -1];
1010 int check5[__WINT_WIDTH__ >= 16 ? 1 : -1];
1050 int operator+(S, S);
1051 template<typename T> int f(S);
1053 template<typename T> int f();
1056 int a = operator+(s, s);
1057 int b = f<int>(s);
1062 int &f(...);
1065 int n[10];
1068 int &a = f(&g);
1069 int &b = f(&n);
1071 f<int[10]>(&n); // expected-error {{no match}}
1077 int operator+(int, E);
1078 int i[4 + e]; // expected-error 2{{variable length array}}
1083 void f(int);
1103 typedef int T;
1106 int f(T);
1107 int g(T);
1108 int h(X<T>);
1109 int X<T>::*i(); // expected-note {{previous}}
1110 int K::*j();
1119 typedef int U;
1120 friend int A::f(T);
1121 friend int A::g(U);
1122 friend int A::h(X<T>);
1126 friend int X<T>::*A::i(); // expected-error {{return type}}
1127 friend int K::*A::j(); // expected-error {{undeclared identifier 'K'; did you mean 'A::K'?}}
1131 friend int A::k<U>();
1172 operator int() { return T::error; }
1175 S<int> s;
1181 operator int() { return T::error; }
1183 S2<int> s2;
1188 struct A { int n; };
1189 struct B { volatile int n; };
1190 int check1[ __is_trivially_copyable(const int) ? 1 : -1];
1191 int check2[!__is_trivially_copyable(volatile int) ? 1 : -1];
1192 int check3[ __is_trivially_constructible(A, const A&) ? 1 : -1];
1194 int check4[ __is_trivially_constructible(B, const B&) ? 1 : -1];
1195 int check5[ __is_trivially_assignable(A, const A&) ? 1 : -1];
1197 int check6[ __is_trivially_assignable(B, const B&) ? 1 : -1];
1203 mutable int i;
1206 int S::*pm = &S::i;
1213 mutable int i;
1216 int S::*pm = &S::i;