From 86be54cc80e58929a0f5fd7e6ffc178e6cdba143 Mon Sep 17 00:00:00 2001 From: Hans Wennborg Date: Fri, 13 Dec 2013 18:34:23 +0000 Subject: 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. llvm-svn: 197252 --- clang/test/SemaCXX/reinterpret-cast.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'clang/test/SemaCXX/reinterpret-cast.cpp') diff --git a/clang/test/SemaCXX/reinterpret-cast.cpp b/clang/test/SemaCXX/reinterpret-cast.cpp index b9c53530a72..4284032d9ba 100644 --- a/clang/test/SemaCXX/reinterpret-cast.cpp +++ b/clang/test/SemaCXX/reinterpret-cast.cpp @@ -96,12 +96,12 @@ void memptrs() void (structure::*psf)() = 0; (void)reinterpret_cast(psf); - (void)reinterpret_cast(psi); // expected-error-re {{reinterpret_cast from 'const int structure::*' to 'void (structure::*)(){{.*}}' is not allowed}} - (void)reinterpret_cast(psf); // expected-error-re {{reinterpret_cast from 'void (structure::*)(){{.*}}' to 'int structure::*' is not allowed}} + (void)reinterpret_cast(psi); // expected-error-re {{reinterpret_cast from 'const int structure::*' to 'void (structure::*)(){{( __attribute__\(\(thiscall\)\))?}}' is not allowed}} + (void)reinterpret_cast(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(0); // expected-error-re {{reinterpret_cast from 'int' to 'void (structure::*)(){{.*}}' is not allowed}} + (void)reinterpret_cast(0); // expected-error-re {{reinterpret_cast from 'int' to 'void (structure::*)(){{( __attribute__\(\(thiscall\)\))?}}' is not allowed}} (void)reinterpret_cast(0); // expected-error {{reinterpret_cast from 'int' to 'int structure::*' is not allowed}} } -- cgit v1.2.3