From: George Burgess IV Date: Thu, 3 Dec 2015 21:15:22 +0000 (+0000) Subject: Fix pass_object_size test on Windows. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c11e13bcb3d4f959ac1c57c61af679dc8d586bee;p=clang 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254650 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/SemaCXX/pass-object-size.cpp b/test/SemaCXX/pass-object-size.cpp index a6040534b2..bec0c1c55f 100644 --- a/test/SemaCXX/pass-object-size.cpp +++ b/test/SemaCXX/pass-object-size.cpp @@ -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 ''}} expected-note@18{{candidate address cannot be taken because parameter 1 has pass_object_size attribute}} expected-note@19{{candidate function has different number of parameters (expected 1 but has 2)}} + M = &Members::OvlFoo; //expected-error-re{{assigning to '{{.*}}' from incompatible type ''}} expected-note@18{{candidate address cannot be taken because parameter 1 has pass_object_size attribute}} expected-note@19{{candidate function has different number of parameters (expected 1 but has 2)}} } } // namespace simple @@ -66,13 +66,13 @@ template struct Bar { void Decls() { int (*A)(void *) = &Foo; //expected-error{{address of overloaded function 'Foo' does not match required type 'int (void *)'}} expected-note@56{{candidate address cannot be taken because parameter 1 has pass_object_size attribute}} - int (Bar::*B)(void *) = &Bar::Foo; //expected-error{{address of overloaded function 'Foo' does not match required type 'int (void *)'}} expected-note@62{{candidate address cannot be taken because parameter 1 has pass_object_size attribute}} + int (Bar::*B)(void *) = &Bar::Foo; //expected-error{{address of overloaded function 'Foo' does not match required type}} expected-note@62{{candidate address cannot be taken because parameter 1 has pass_object_size attribute}} } void Assigns() { int (*A)(void *); A = &Foo; // expected-error{{assigning to 'int (*)(void *)' from incompatible type ''}} expected-note@56{{candidate address cannot be taken because parameter 1 has pass_object_size attribute}} - int (Bar::*B)(void *) = &Bar::Foo; //expected-error{{address of overloaded function 'Foo' does not match required type 'int (void *)'}} expected-note@62{{candidate address cannot be taken because parameter 1 has pass_object_size attribute}} + int (Bar::*B)(void *) = &Bar::Foo; //expected-error{{address of overloaded function 'Foo' does not match required type}} expected-note@62{{candidate address cannot be taken because parameter 1 has pass_object_size attribute}} } } // namespace templates