diff options
author | Hans Wennborg <hans@hanshq.net> | 2013-12-13 18:34:23 +0000 |
---|---|---|
committer | Hans Wennborg <hans@hanshq.net> | 2013-12-13 18:34:23 +0000 |
commit | 86be54cc80e58929a0f5fd7e6ffc178e6cdba143 (patch) | |
tree | 7d3be3030ba7b70480ef16cbb716972dd9b55c67 /clang/test/SemaCXX/reinterpret-cast.cpp | |
parent | 059021a36937788d4951b74a663f0a0621aa85bc (diff) | |
download | bcm5719-llvm-86be54cc80e58929a0f5fd7e6ffc178e6cdba143.tar.gz bcm5719-llvm-86be54cc80e58929a0f5fd7e6ffc178e6cdba143.zip |
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
Diffstat (limited to 'clang/test/SemaCXX/reinterpret-cast.cpp')
-rw-r--r-- | clang/test/SemaCXX/reinterpret-cast.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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<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}} } |