• Home
  • Raw
  • Download

Lines Matching +full:overloaded +full:- +full:virtual

1 // RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++11
12 …((pass_object_size(1)))); // expected-error{{conflicting pass_object_size attributes on parameters…
23 …int (*A)(void *) = &Foo; //expected-error{{cannot take address of function 'Foo' because parameter… in Decls()
24 …int (*B)(void *) = Foo; //expected-error{{cannot take address of function 'Foo' because parameter … in Decls()
26-error{{address of overloaded function 'OvlFoo' does not match required type 'int (void *)'}} expe… in Decls()
27-error{{address of overloaded function 'OvlFoo' does not match required type 'int (void *)'}} expe… in Decls()
29 …int (*E)(void *) = &Statics::Foo; //expected-error{{cannot take address of function 'Foo' because … in Decls()
30-error{{address of overloaded function 'OvlFoo' does not match required type 'int (void *)'}} expe… in Decls()
32 …int (*G)(void *) = &Members::Foo; //expected-error{{cannot take address of function 'Foo' because … in Decls()
33-error{{address of overloaded function 'OvlFoo' does not match required type 'int (void *)'}} expe… in Decls()
38 …A = &Foo; //expected-error{{cannot take address of function 'Foo' because parameter 1 has pass_obj… in Assigns()
39 …A = Foo; //expected-error{{cannot take address of function 'Foo' because parameter 1 has pass_obje… in Assigns()
41-error{{assigning to 'int (*)(void *)' from incompatible type '<overloaded function type>'}} expec… in Assigns()
42-error{{assigning to 'int (*)(void *)' from incompatible type '<overloaded function type>'}} expec… in Assigns()
44 …A = &Statics::Foo; //expected-error{{cannot take address of function 'Foo' because parameter 1 has… in Assigns()
45-error{{assigning to 'int (*)(void *)' from incompatible type '<overloaded function type>'}} expec… in Assigns()
48 …M = &Members::Foo; //expected-error{{cannot take address of function 'Foo' because parameter 1 has… in Assigns()
49-error-re{{assigning to '{{.*}}' from incompatible type '<overloaded function type>'}} expected-no… in Assigns()
68 … = &Foo<void*>; //expected-error{{address of overloaded function 'Foo' does not match required typ… in Decls()
69 …&Bar<int>::Foo<double>; //expected-error{{address of overloaded function 'Foo' does not match requ… in Decls()
74 … &Foo<void*>; // expected-error{{assigning to 'int (*)(void *)' from incompatible type '<overloade… in Assigns()
75 …&Bar<int>::Foo<double>; //expected-error{{address of overloaded function 'Foo' does not match requ… in Assigns()
81 virtual void DoIt(void *const p __attribute__((pass_object_size(0))));
89 …; //expected-error{{non-virtual member function marked 'override' hides virtual member function}} …
98 …TakeFn(ObjSize); //expected-error{{cannot take address of function 'ObjSize' because parameter 2 h… in Check()
99 …TakeFn(&ObjSize); //expected-error{{cannot take address of function 'ObjSize' because parameter 2 … in Check()
100 …TakeFn(*ObjSize); //expected-error{{cannot take address of function 'ObjSize' because parameter 2 … in Check()
101 …TakeFn(*****ObjSize); //expected-error{{cannot take address of function 'ObjSize' because paramete… in Check()
102 …TakeFn(*****&ObjSize); //expected-error{{cannot take address of function 'ObjSize' because paramet… in Check()
104 …void (*P)(int, void *) = ****ObjSize; //expected-error{{cannot take address of function 'ObjSize' … in Check()
105 …P = ****ObjSize; //expected-error{{cannot take address of function 'ObjSize' because parameter 2 h… in Check()
107 …TakeFn((ObjSize)); //expected-error{{cannot take address of function 'ObjSize' because parameter 2… in Check()
108 …TakeFn((void*)ObjSize); //expected-error{{cannot take address of function 'ObjSize' because parame… in Check()
109 …TakeFn((decltype(P))((void*)ObjSize)); //expected-error{{cannot take address of function 'ObjSize'… in Check()
120 …(void)+[](void *const p __attribute__((pass_object_size(0)))) {}; //expected-error-re{{invalid arg… in Bar()
125 // Directly calling an address-of function expression (e.g. in (&foo)(args...))
126 // doesn't go through regular address-of-overload logic. This caused the above
133 …(&DirectAddrOf)(nullptr); //expected-error{{cannot take address of function 'DirectAddrOf' because… in Test()
134 …ted-error{{no matching function}} expected-note@129{{candidate address cannot be taken because par… in Test()