summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2013-12-13 18:34:23 +0000
committerHans Wennborg <hans@hanshq.net>2013-12-13 18:34:23 +0000
commit0209f562837691b5d5aefb775f0c571d9e7283da (patch)
tree5f66c7e67afc3ae2746ad69515a6870adf0033db
parent665c732fb4e8d24228f0ff0dc19415eb9e61147f (diff)
downloadclang-0209f562837691b5d5aefb775f0c571d9e7283da.tar.gz
clang-0209f562837691b5d5aefb775f0c571d9e7283da.tar.bz2
clang-0209f562837691b5d5aefb775f0c571d9e7283da.tar.xz
Tighten test regexes checking for __attribute__((thiscall)) on function types.
The tests were perhaps made too relaxed in r197164 when we switched to the new MinGW ABI. This makes sure we check explicitly for an optional thiscall attribute and nothing else. We should still look into whether we should print these attributes at all in these cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197252 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/CXX/class.access/p6.cpp2
-rw-r--r--test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p1.cpp2
-rw-r--r--test/CXX/expr/expr.const/p3-0x.cpp2
-rw-r--r--test/CXX/expr/expr.mptr.oper/p5.cpp28
-rw-r--r--test/CXX/expr/expr.mptr.oper/p6-0x.cpp8
-rw-r--r--test/CXX/expr/expr.unary/expr.unary.op/p4.cpp2
-rw-r--r--test/CXX/temp/temp.arg/temp.arg.nontype/p5.cpp2
-rw-r--r--test/SemaCXX/addr-of-overloaded-function.cpp16
-rw-r--r--test/SemaCXX/const-cast.cpp2
-rw-r--r--test/SemaCXX/cstyle-cast.cpp4
-rw-r--r--test/SemaCXX/functional-cast.cpp4
-rw-r--r--test/SemaCXX/reinterpret-cast.cpp6
-rw-r--r--test/SemaCXX/static-cast.cpp2
-rw-r--r--test/SemaTemplate/explicit-instantiation.cpp2
-rw-r--r--test/SemaTemplate/instantiate-method.cpp2
-rw-r--r--test/SemaTemplate/temp_arg_nontype.cpp2
16 files changed, 43 insertions, 43 deletions
diff --git a/test/CXX/class.access/p6.cpp b/test/CXX/class.access/p6.cpp
index 30a59acfab..5007263a35 100644
--- a/test/CXX/class.access/p6.cpp
+++ b/test/CXX/class.access/p6.cpp
@@ -177,7 +177,7 @@ namespace test8 {
};
void test(A &a) {
- if (a) return; // expected-error-re {{'operator void *(class test8::A::*)(void) {{.*}}const' is a private member of 'test8::A'}}
+ if (a) return; // expected-error-re {{'operator void *(class test8::A::*)(void){{( __attribute__\(\(thiscall\)\))?}} const' is a private member of 'test8::A'}}
}
}
diff --git a/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p1.cpp b/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p1.cpp
index a0c12c8141..08fefdc91f 100644
--- a/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p1.cpp
+++ b/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p1.cpp
@@ -73,7 +73,7 @@ template <typename T> T gt(T t) { return t; }
struct S {
template<typename T> constexpr T f(); // expected-warning {{C++1y}}
template <typename T>
- T g() const; // expected-note-re {{candidate template ignored: could not match 'T () {{.*}}const' against 'char (){{.*}}'}}
+ T g() const; // expected-note-re {{candidate template ignored: could not match 'T (){{( __attribute__\(\(thiscall\)\))?}} const' against 'char (){{( __attribute__\(\(thiscall\)\))?}}'}}
};
// explicit specialization can differ in constepxr
diff --git a/test/CXX/expr/expr.const/p3-0x.cpp b/test/CXX/expr/expr.const/p3-0x.cpp
index f98af411e0..d9d84853eb 100644
--- a/test/CXX/expr/expr.const/p3-0x.cpp
+++ b/test/CXX/expr/expr.const/p3-0x.cpp
@@ -97,7 +97,7 @@ template <bool B> int f() { return B; } // expected-note {{candidate template ig
template int f<&S::operator int>(); // expected-error {{does not refer to a function template}}
template int f<(bool)&S::operator int>();
-int n = Val<bool, &S::operator int>::value; // expected-error-re {{conversion from 'int (S::*)() {{.*}}const' to 'bool' is not allowed in a converted constant expression}}
+int n = Val<bool, &S::operator int>::value; // expected-error-re {{conversion from 'int (S::*)(){{( __attribute__\(\(thiscall\)\))?}} const' to 'bool' is not allowed in a converted constant expression}}
namespace NonConstLValue {
struct S {
diff --git a/test/CXX/expr/expr.mptr.oper/p5.cpp b/test/CXX/expr/expr.mptr.oper/p5.cpp
index 3a5e42c36d..c26b30d43d 100644
--- a/test/CXX/expr/expr.mptr.oper/p5.cpp
+++ b/test/CXX/expr/expr.mptr.oper/p5.cpp
@@ -24,19 +24,19 @@ void test_object_cvquals(void (X0::*pm)(),
(p->*pmv)();
(p->*pmcv)();
- (pc->*pm)(); // expected-error-re{{call to pointer to member function of type 'void (){{.*}}' drops 'const' qualifier}}
+ (pc->*pm)(); // expected-error-re{{call to pointer to member function of type 'void (){{( __attribute__\(\(thiscall\)\))?}}' drops 'const' qualifier}}
(pc->*pmc)();
- (pc->*pmv)(); // expected-error-re{{call to pointer to member function of type 'void () {{.*}}volatile' drops 'const' qualifier}}
+ (pc->*pmv)(); // expected-error-re{{call to pointer to member function of type 'void (){{( __attribute__\(\(thiscall\)\))?}} volatile' drops 'const' qualifier}}
(pc->*pmcv)();
- (pv->*pm)(); // expected-error-re{{call to pointer to member function of type 'void (){{.*}}' drops 'volatile' qualifier}}
- (pv->*pmc)(); // expected-error-re{{call to pointer to member function of type 'void () {{.*}}const' drops 'volatile' qualifier}}
+ (pv->*pm)(); // expected-error-re{{call to pointer to member function of type 'void (){{( __attribute__\(\(thiscall\)\))?}}' drops 'volatile' qualifier}}
+ (pv->*pmc)(); // expected-error-re{{call to pointer to member function of type 'void (){{( __attribute__\(\(thiscall\)\))?}} const' drops 'volatile' qualifier}}
(pv->*pmv)();
(pv->*pmcv)();
- (pcv->*pm)(); // expected-error-re{{call to pointer to member function of type 'void (){{.*}}' drops 'const volatile' qualifiers}}
- (pcv->*pmc)(); // expected-error-re{{call to pointer to member function of type 'void () {{.*}}const' drops 'volatile' qualifier}}
- (pcv->*pmv)(); // expected-error-re{{call to pointer to member function of type 'void () {{.*}}volatile' drops 'const' qualifier}}
+ (pcv->*pm)(); // expected-error-re{{call to pointer to member function of type 'void (){{( __attribute__\(\(thiscall\)\))?}}' drops 'const volatile' qualifiers}}
+ (pcv->*pmc)(); // expected-error-re{{call to pointer to member function of type 'void (){{( __attribute__\(\(thiscall\)\))?}} const' drops 'volatile' qualifier}}
+ (pcv->*pmv)(); // expected-error-re{{call to pointer to member function of type 'void (){{( __attribute__\(\(thiscall\)\))?}} volatile' drops 'const' qualifier}}
(pcv->*pmcv)();
(o.*pm)();
@@ -44,18 +44,18 @@ void test_object_cvquals(void (X0::*pm)(),
(o.*pmv)();
(o.*pmcv)();
- (oc.*pm)(); // expected-error-re{{call to pointer to member function of type 'void (){{.*}}' drops 'const' qualifier}}
+ (oc.*pm)(); // expected-error-re{{call to pointer to member function of type 'void (){{( __attribute__\(\(thiscall\)\))?}}' drops 'const' qualifier}}
(oc.*pmc)();
- (oc.*pmv)(); // expected-error-re{{call to pointer to member function of type 'void () {{.*}}volatile' drops 'const' qualifier}}
+ (oc.*pmv)(); // expected-error-re{{call to pointer to member function of type 'void (){{( __attribute__\(\(thiscall\)\))?}} volatile' drops 'const' qualifier}}
(oc.*pmcv)();
- (ov.*pm)(); // expected-error-re{{call to pointer to member function of type 'void (){{.*}}' drops 'volatile' qualifier}}
- (ov.*pmc)(); // expected-error-re{{call to pointer to member function of type 'void () {{.*}}const' drops 'volatile' qualifier}}
+ (ov.*pm)(); // expected-error-re{{call to pointer to member function of type 'void (){{( __attribute__\(\(thiscall\)\))?}}' drops 'volatile' qualifier}}
+ (ov.*pmc)(); // expected-error-re{{call to pointer to member function of type 'void (){{( __attribute__\(\(thiscall\)\))?}} const' drops 'volatile' qualifier}}
(ov.*pmv)();
(ov.*pmcv)();
- (ocv.*pm)(); // expected-error-re{{call to pointer to member function of type 'void (){{.*}}' drops 'const volatile' qualifiers}}
- (ocv.*pmc)(); // expected-error-re{{call to pointer to member function of type 'void () {{.*}}const' drops 'volatile' qualifier}}
- (ocv.*pmv)(); // expected-error-re{{call to pointer to member function of type 'void () {{.*}}volatile' drops 'const' qualifier}}
+ (ocv.*pm)(); // expected-error-re{{call to pointer to member function of type 'void (){{( __attribute__\(\(thiscall\)\))?}}' drops 'const volatile' qualifiers}}
+ (ocv.*pmc)(); // expected-error-re{{call to pointer to member function of type 'void (){{( __attribute__\(\(thiscall\)\))?}} const' drops 'volatile' qualifier}}
+ (ocv.*pmv)(); // expected-error-re{{call to pointer to member function of type 'void (){{( __attribute__\(\(thiscall\)\))?}} volatile' drops 'const' qualifier}}
(ocv.*pmcv)();
}
diff --git a/test/CXX/expr/expr.mptr.oper/p6-0x.cpp b/test/CXX/expr/expr.mptr.oper/p6-0x.cpp
index db12a9d7a7..b1823e59ff 100644
--- a/test/CXX/expr/expr.mptr.oper/p6-0x.cpp
+++ b/test/CXX/expr/expr.mptr.oper/p6-0x.cpp
@@ -22,13 +22,13 @@ void test(X *xp, int (X::*pmf)(int), int (X::*l_pmf)(int) &,
// Lvalue ref-qualifier.
(lvalue<X>().*l_pmf)(17);
- (xvalue<X>().*l_pmf)(17); // expected-error-re{{pointer-to-member function type 'int (X::*)(int) {{.*}}&' can only be called on an lvalue}}
- (prvalue<X>().*l_pmf)(17); // expected-error-re{{pointer-to-member function type 'int (X::*)(int) {{.*}}&' can only be called on an lvalue}}
+ (xvalue<X>().*l_pmf)(17); // expected-error-re{{pointer-to-member function type 'int (X::*)(int){{( __attribute__\(\(thiscall\)\))?}} &' can only be called on an lvalue}}
+ (prvalue<X>().*l_pmf)(17); // expected-error-re{{pointer-to-member function type 'int (X::*)(int){{( __attribute__\(\(thiscall\)\))?}} &' can only be called on an lvalue}}
(xp->*l_pmf)(17);
// Rvalue ref-qualifier.
- (lvalue<X>().*r_pmf)(17); // expected-error-re{{pointer-to-member function type 'int (X::*)(int) {{.*}}&&' can only be called on an rvalue}}
+ (lvalue<X>().*r_pmf)(17); // expected-error-re{{pointer-to-member function type 'int (X::*)(int){{( __attribute__\(\(thiscall\)\))?}} &&' can only be called on an rvalue}}
(xvalue<X>().*r_pmf)(17);
(prvalue<X>().*r_pmf)(17);
- (xp->*r_pmf)(17); // expected-error-re{{pointer-to-member function type 'int (X::*)(int) {{.*}}&&' can only be called on an rvalue}}
+ (xp->*r_pmf)(17); // expected-error-re{{pointer-to-member function type 'int (X::*)(int){{( __attribute__\(\(thiscall\)\))?}} &&' can only be called on an rvalue}}
}
diff --git a/test/CXX/expr/expr.unary/expr.unary.op/p4.cpp b/test/CXX/expr/expr.unary/expr.unary.op/p4.cpp
index 575225bfda..9babf8728c 100644
--- a/test/CXX/expr/expr.unary/expr.unary.op/p4.cpp
+++ b/test/CXX/expr/expr.unary/expr.unary.op/p4.cpp
@@ -7,7 +7,7 @@ namespace test0 {
template<typename T> void g(T);
void test() {
- foo(&g<int>); // expected-error-re {{can't form member pointer of type 'void (test0::A::*)(int){{.*}}' without '&' and class name}}
+ foo(&g<int>); // expected-error-re {{can't form member pointer of type 'void (test0::A::*)(int){{( __attribute__\(\(thiscall\)\))?}}' without '&' and class name}}
}
};
}
diff --git a/test/CXX/temp/temp.arg/temp.arg.nontype/p5.cpp b/test/CXX/temp/temp.arg/temp.arg.nontype/p5.cpp
index 9e5300d4ba..e87153b9ef 100644
--- a/test/CXX/temp/temp.arg/temp.arg.nontype/p5.cpp
+++ b/test/CXX/temp/temp.arg/temp.arg.nontype/p5.cpp
@@ -184,7 +184,7 @@ namespace pointer_to_member_function {
template<int (Y::*)(int)> struct X0 {}; // expected-note{{template parameter is declared here}}
X0<&Y::f> x0a;
X0<&Y::g> x0b;
- X0<&Y::h> x0c; // expected-error-re{{non-type template argument of type 'float (pointer_to_member_function::Y::*)(float){{.*}}' cannot be converted to a value of type 'int (pointer_to_member_function::Y::*)(int){{.*}}'}}
+ X0<&Y::h> x0c; // expected-error-re{{non-type template argument of type 'float (pointer_to_member_function::Y::*)(float){{( __attribute__\(\(thiscall\)\))?}}' cannot be converted to a value of type 'int (pointer_to_member_function::Y::*)(int){{( __attribute__\(\(thiscall\)\))?}}'}}
}
// -- For a non-type template-parameter of type pointer to data member,
diff --git a/test/SemaCXX/addr-of-overloaded-function.cpp b/test/SemaCXX/addr-of-overloaded-function.cpp
index 0249b5706f..358fe8d5b0 100644
--- a/test/SemaCXX/addr-of-overloaded-function.cpp
+++ b/test/SemaCXX/addr-of-overloaded-function.cpp
@@ -220,20 +220,20 @@ namespace test1 {
void QualifierTest() {
void (Qualifiers::*X)();
- X = &Qualifiers::C; // expected-error-re {{assigning to 'void (test1::Qualifiers::*)(){{.*}}' from incompatible type 'void (test1::Qualifiers::*)() {{.*}}const': different qualifiers (none vs const)}}
- X = &Qualifiers::V; // expected-error-re{{assigning to 'void (test1::Qualifiers::*)(){{.*}}' from incompatible type 'void (test1::Qualifiers::*)() {{.*}}volatile': different qualifiers (none vs volatile)}}
- X = &Qualifiers::R; // expected-error-re{{assigning to 'void (test1::Qualifiers::*)(){{.*}}' from incompatible type 'void (test1::Qualifiers::*)() {{.*}}restrict': different qualifiers (none vs restrict)}}
- X = &Qualifiers::CV; // expected-error-re{{assigning to 'void (test1::Qualifiers::*)(){{.*}}' from incompatible type 'void (test1::Qualifiers::*)() {{.*}}const volatile': different qualifiers (none vs const and volatile)}}
- X = &Qualifiers::CR; // expected-error-re{{assigning to 'void (test1::Qualifiers::*)(){{.*}}' from incompatible type 'void (test1::Qualifiers::*)() {{.*}}const restrict': different qualifiers (none vs const and restrict)}}
- X = &Qualifiers::VR; // expected-error-re{{assigning to 'void (test1::Qualifiers::*)(){{.*}}' from incompatible type 'void (test1::Qualifiers::*)() {{.*}}volatile restrict': different qualifiers (none vs volatile and restrict)}}
- X = &Qualifiers::CVR; // expected-error-re{{assigning to 'void (test1::Qualifiers::*)(){{.*}}' from incompatible type 'void (test1::Qualifiers::*)() {{.*}}const volatile restrict': different qualifiers (none vs const, volatile, and restrict)}}
+ X = &Qualifiers::C; // expected-error-re {{assigning to 'void (test1::Qualifiers::*)(){{( __attribute__\(\(thiscall\)\))?}}' from incompatible type 'void (test1::Qualifiers::*)(){{( __attribute__\(\(thiscall\)\))?}} const': different qualifiers (none vs const)}}
+ X = &Qualifiers::V; // expected-error-re{{assigning to 'void (test1::Qualifiers::*)(){{( __attribute__\(\(thiscall\)\))?}}' from incompatible type 'void (test1::Qualifiers::*)(){{( __attribute__\(\(thiscall\)\))?}} volatile': different qualifiers (none vs volatile)}}
+ X = &Qualifiers::R; // expected-error-re{{assigning to 'void (test1::Qualifiers::*)(){{( __attribute__\(\(thiscall\)\))?}}' from incompatible type 'void (test1::Qualifiers::*)(){{( __attribute__\(\(thiscall\)\))?}} restrict': different qualifiers (none vs restrict)}}
+ X = &Qualifiers::CV; // expected-error-re{{assigning to 'void (test1::Qualifiers::*)(){{( __attribute__\(\(thiscall\)\))?}}' from incompatible type 'void (test1::Qualifiers::*)(){{( __attribute__\(\(thiscall\)\))?}} const volatile': different qualifiers (none vs const and volatile)}}
+ X = &Qualifiers::CR; // expected-error-re{{assigning to 'void (test1::Qualifiers::*)(){{( __attribute__\(\(thiscall\)\))?}}' from incompatible type 'void (test1::Qualifiers::*)(){{( __attribute__\(\(thiscall\)\))?}} const restrict': different qualifiers (none vs const and restrict)}}
+ X = &Qualifiers::VR; // expected-error-re{{assigning to 'void (test1::Qualifiers::*)(){{( __attribute__\(\(thiscall\)\))?}}' from incompatible type 'void (test1::Qualifiers::*)(){{( __attribute__\(\(thiscall\)\))?}} volatile restrict': different qualifiers (none vs volatile and restrict)}}
+ X = &Qualifiers::CVR; // expected-error-re{{assigning to 'void (test1::Qualifiers::*)(){{( __attribute__\(\(thiscall\)\))?}}' from incompatible type 'void (test1::Qualifiers::*)(){{( __attribute__\(\(thiscall\)\))?}} const volatile restrict': different qualifiers (none vs const, volatile, and restrict)}}
}
struct Dummy {
void N() {};
};
- void (Qualifiers::*X)() = &Dummy::N; // expected-error-re{{cannot initialize a variable of type 'void (test1::Qualifiers::*)(){{.*}}' with an rvalue of type 'void (test1::Dummy::*)(){{.*}}': different classes ('test1::Qualifiers' vs 'test1::Dummy')}}
+ void (Qualifiers::*X)() = &Dummy::N; // expected-error-re{{cannot initialize a variable of type 'void (test1::Qualifiers::*)(){{( __attribute__\(\(thiscall\)\))?}}' with an rvalue of type 'void (test1::Dummy::*)(){{( __attribute__\(\(thiscall\)\))?}}': different classes ('test1::Qualifiers' vs 'test1::Dummy')}}
}
template <typename T> class PR16561 {
diff --git a/test/SemaCXX/const-cast.cpp b/test/SemaCXX/const-cast.cpp
index b58184fe5a..cb9937c50d 100644
--- a/test/SemaCXX/const-cast.cpp
+++ b/test/SemaCXX/const-cast.cpp
@@ -60,7 +60,7 @@ short *bad_const_cast_test(char const *volatile *const volatile *var)
// Function pointers.
f fp2 = const_cast<f>(fp1); // expected-error {{const_cast to 'f' (aka 'int (*)(int)'), which is not a reference, pointer-to-object, or pointer-to-data-member}}
void (A::*mfn)() = 0;
- (void)const_cast<void (A::*)()>(mfn); // expected-error-re {{const_cast to 'void (A::*)(){{.*}}', which is not a reference, pointer-to-object, or pointer-to-data-member}}
+ (void)const_cast<void (A::*)()>(mfn); // expected-error-re {{const_cast to 'void (A::*)(){{( __attribute__\(\(thiscall\)\))?}}', which is not a reference, pointer-to-object, or pointer-to-data-member}}
(void)const_cast<int&&>(0); // expected-error {{const_cast from rvalue to reference type 'int &&'}} expected-warning {{C++11}}
return **var3;
}
diff --git a/test/SemaCXX/cstyle-cast.cpp b/test/SemaCXX/cstyle-cast.cpp
index bd0525f7f4..afac6a137e 100644
--- a/test/SemaCXX/cstyle-cast.cpp
+++ b/test/SemaCXX/cstyle-cast.cpp
@@ -227,6 +227,6 @@ void memptrs()
void (structure::*psf)() = 0;
(void)(int (structure::*)())(psf);
- (void)(void (structure::*)())(psi); // expected-error-re {{C-style cast from 'const int structure::*' to 'void (structure::*)(){{.*}}' is not allowed}}
- (void)(int structure::*)(psf); // expected-error-re {{C-style cast from 'void (structure::*)(){{.*}}' to 'int structure::*' is not allowed}}
+ (void)(void (structure::*)())(psi); // expected-error-re {{C-style cast from 'const int structure::*' to 'void (structure::*)(){{( __attribute__\(\(thiscall\)\))?}}' is not allowed}}
+ (void)(int structure::*)(psf); // expected-error-re {{C-style cast from 'void (structure::*)(){{( __attribute__\(\(thiscall\)\))?}}' to 'int structure::*' is not allowed}}
}
diff --git a/test/SemaCXX/functional-cast.cpp b/test/SemaCXX/functional-cast.cpp
index 338c957a5f..f5ca76c38c 100644
--- a/test/SemaCXX/functional-cast.cpp
+++ b/test/SemaCXX/functional-cast.cpp
@@ -305,8 +305,8 @@ void memptrs()
(void)structureimfp(psf);
typedef void (structure::*structurevmfp)();
- (void)structurevmfp(psi); // expected-error-re {{functional-style cast from 'const int structure::*' to 'structurevmfp' (aka 'void (structure::*)(){{.*}}') is not allowed}}
- (void)structureimp(psf); // expected-error-re {{functional-style cast from 'void (structure::*)(){{.*}}' to 'structureimp' (aka 'int structure::*') is not allowed}}
+ (void)structurevmfp(psi); // expected-error-re {{functional-style cast from 'const int structure::*' to 'structurevmfp' (aka 'void (structure::*)(){{( __attribute__\(\(thiscall\)\))?}}') is not allowed}}
+ (void)structureimp(psf); // expected-error-re {{functional-style cast from 'void (structure::*)(){{( __attribute__\(\(thiscall\)\))?}}' to 'structureimp' (aka 'int structure::*') is not allowed}}
}
// ---------------- misc ------------------
diff --git a/test/SemaCXX/reinterpret-cast.cpp b/test/SemaCXX/reinterpret-cast.cpp
index b9c53530a7..4284032d9b 100644
--- a/test/SemaCXX/reinterpret-cast.cpp
+++ b/test/SemaCXX/reinterpret-cast.cpp
@@ -96,12 +96,12 @@ void memptrs()
void (structure::*psf)() = 0;
(void)reinterpret_cast<int (structure::*)()>(psf);
- (void)reinterpret_cast<void (structure::*)()>(psi); // expected-error-re {{reinterpret_cast from 'const int structure::*' to 'void (structure::*)(){{.*}}' is not allowed}}
- (void)reinterpret_cast<int structure::*>(psf); // expected-error-re {{reinterpret_cast from 'void (structure::*)(){{.*}}' to 'int structure::*' is not allowed}}
+ (void)reinterpret_cast<void (structure::*)()>(psi); // expected-error-re {{reinterpret_cast from 'const int structure::*' to 'void (structure::*)(){{( __attribute__\(\(thiscall\)\))?}}' is not allowed}}
+ (void)reinterpret_cast<int structure::*>(psf); // expected-error-re {{reinterpret_cast from 'void (structure::*)(){{( __attribute__\(\(thiscall\)\))?}}' to 'int structure::*' is not allowed}}
// Cannot cast from integers to member pointers, not even the null pointer
// literal.
- (void)reinterpret_cast<void (structure::*)()>(0); // expected-error-re {{reinterpret_cast from 'int' to 'void (structure::*)(){{.*}}' is not allowed}}
+ (void)reinterpret_cast<void (structure::*)()>(0); // expected-error-re {{reinterpret_cast from 'int' to 'void (structure::*)(){{( __attribute__\(\(thiscall\)\))?}}' is not allowed}}
(void)reinterpret_cast<int structure::*>(0); // expected-error {{reinterpret_cast from 'int' to 'int structure::*' is not allowed}}
}
diff --git a/test/SemaCXX/static-cast.cpp b/test/SemaCXX/static-cast.cpp
index 8cd27a13a0..03ee160ca3 100644
--- a/test/SemaCXX/static-cast.cpp
+++ b/test/SemaCXX/static-cast.cpp
@@ -192,6 +192,6 @@ namespace PR6072 {
(void)static_cast<void (A::*)()>(&B::f);
(void)static_cast<void (B::*)()>(&B::f);
(void)static_cast<void (C::*)()>(&B::f);
- (void)static_cast<void (D::*)()>(&B::f); // expected-error-re{{address of overloaded function 'f' cannot be static_cast to type 'void (PR6072::D::*)(){{.*}}'}}
+ (void)static_cast<void (D::*)()>(&B::f); // expected-error-re{{address of overloaded function 'f' cannot be static_cast to type 'void (PR6072::D::*)(){{( __attribute__\(\(thiscall\)\))?}}'}}
}
}
diff --git a/test/SemaTemplate/explicit-instantiation.cpp b/test/SemaTemplate/explicit-instantiation.cpp
index 5748f662dc..c28c5d1831 100644
--- a/test/SemaTemplate/explicit-instantiation.cpp
+++ b/test/SemaTemplate/explicit-instantiation.cpp
@@ -16,7 +16,7 @@ struct X0 {
}
T* f0(T*, T*) { return T(); } // expected-warning{{expression which evaluates to zero treated as a null pointer constant of type 'int *'}}
- template <typename U> T f0(T, U) { return T(); } // expected-note-re {{candidate template ignored: could not match 'int (int, U){{.*}}' against 'int (int) {{.*}}const'}} \
+ template <typename U> T f0(T, U) { return T(); } // expected-note-re {{candidate template ignored: could not match 'int (int, U){{( __attribute__\(\(thiscall\)\))?}}' against 'int (int){{( __attribute__\(\(thiscall\)\))?}} const'}} \
// expected-note {{candidate template ignored: could not match 'int' against 'int *'}}
};
diff --git a/test/SemaTemplate/instantiate-method.cpp b/test/SemaTemplate/instantiate-method.cpp
index 55b4c6501b..58cb897955 100644
--- a/test/SemaTemplate/instantiate-method.cpp
+++ b/test/SemaTemplate/instantiate-method.cpp
@@ -178,7 +178,7 @@ namespace PR7022 {
namespace SameSignatureAfterInstantiation {
template<typename T> struct S {
void f(T *); // expected-note {{previous}}
- void f(const T*); // expected-error-re {{multiple overloads of 'f' instantiate to the same signature 'void (const int *){{.*}}'}}
+ void f(const T*); // expected-error-re {{multiple overloads of 'f' instantiate to the same signature 'void (const int *){{( __attribute__\(\(thiscall\)\))?}}'}}
};
S<const int> s; // expected-note {{instantiation}}
}
diff --git a/test/SemaTemplate/temp_arg_nontype.cpp b/test/SemaTemplate/temp_arg_nontype.cpp
index 2921a055c5..91b0c6e765 100644
--- a/test/SemaTemplate/temp_arg_nontype.cpp
+++ b/test/SemaTemplate/temp_arg_nontype.cpp
@@ -82,7 +82,7 @@ struct Z {
template<int (Z::*pmf)(int)> struct A6; // expected-note{{template parameter is declared here}}
A6<&Z::foo> *a17_1;
A6<&Z::bar> *a17_2;
-A6<&Z::baz> *a17_3; // expected-error-re{{non-type template argument of type 'double (Z::*)(double){{.*}}' cannot be converted to a value of type 'int (Z::*)(int){{.*}}'}}
+A6<&Z::baz> *a17_3; // expected-error-re{{non-type template argument of type 'double (Z::*)(double){{( __attribute__\(\(thiscall\)\))?}}' cannot be converted to a value of type 'int (Z::*)(int){{( __attribute__\(\(thiscall\)\))?}}'}}
template<int Z::*pm> struct A7; // expected-note{{template parameter is declared here}}