r254650 - Fix pass_object_size test on Windows.

George Burgess IV via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 3 13:15:23 PST 2015


Author: gbiv
Date: Thu Dec  3 15:15:22 2015
New Revision: 254650

URL: http://llvm.org/viewvc/llvm-project?rev=254650&view=rev
Log:
Fix pass_object_size test on Windows.

The tests were failing because the types of some member functions, when
printed, unexpectedly had "__attribute__((thiscall))" at the end. The
types in question were relatively unimportant to begin with, so they
were removed/replaced with regexes.


Modified:
    cfe/trunk/test/SemaCXX/pass-object-size.cpp

Modified: cfe/trunk/test/SemaCXX/pass-object-size.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/pass-object-size.cpp?rev=254650&r1=254649&r2=254650&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/pass-object-size.cpp (original)
+++ cfe/trunk/test/SemaCXX/pass-object-size.cpp Thu Dec  3 15:15:22 2015
@@ -46,7 +46,7 @@ void Assigns() {
 
   int (Members::*M)(void *);
   M = &Members::Foo; //expected-error{{cannot take address of function 'Foo' because parameter 1 has pass_object_size attribute}}
-  M = &Members::OvlFoo; //expected-error{{assigning to 'int (simple::Members::*)(void *)' from incompatible type '<overloaded function type>'}} expected-note at 18{{candidate address cannot be taken because parameter 1 has pass_object_size attribute}} expected-note at 19{{candidate function has different number of parameters (expected 1 but has 2)}}
+  M = &Members::OvlFoo; //expected-error-re{{assigning to '{{.*}}' from incompatible type '<overloaded function type>'}} expected-note at 18{{candidate address cannot be taken because parameter 1 has pass_object_size attribute}} expected-note at 19{{candidate function has different number of parameters (expected 1 but has 2)}}
 }
 
 } // namespace simple
@@ -66,13 +66,13 @@ template <typename T> struct Bar {
 
 void Decls() {
   int (*A)(void *) = &Foo<void*>; //expected-error{{address of overloaded function 'Foo' does not match required type 'int (void *)'}} expected-note at 56{{candidate address cannot be taken because parameter 1 has pass_object_size attribute}}
-  int (Bar<int>::*B)(void *) = &Bar<int>::Foo<double>; //expected-error{{address of overloaded function 'Foo' does not match required type 'int (void *)'}} expected-note at 62{{candidate address cannot be taken because parameter 1 has pass_object_size attribute}}
+  int (Bar<int>::*B)(void *) = &Bar<int>::Foo<double>; //expected-error{{address of overloaded function 'Foo' does not match required type}} expected-note at 62{{candidate address cannot be taken because parameter 1 has pass_object_size attribute}}
 }
 
 void Assigns() {
   int (*A)(void *);
   A = &Foo<void*>; // expected-error{{assigning to 'int (*)(void *)' from incompatible type '<overloaded function type>'}} expected-note at 56{{candidate address cannot be taken because parameter 1 has pass_object_size attribute}}
-  int (Bar<int>::*B)(void *) = &Bar<int>::Foo<double>; //expected-error{{address of overloaded function 'Foo' does not match required type 'int (void *)'}} expected-note at 62{{candidate address cannot be taken because parameter 1 has pass_object_size attribute}}
+  int (Bar<int>::*B)(void *) = &Bar<int>::Foo<double>; //expected-error{{address of overloaded function 'Foo' does not match required type}} expected-note at 62{{candidate address cannot be taken because parameter 1 has pass_object_size attribute}}
 }
 } // namespace templates
 




More information about the cfe-commits mailing list