Fix failing -verify tests due to change in Clangs static_assert message.

Clang recently changed the way it outputs static assert diagnostics.
This patch fixes libc++'s -verify tests so they tolerate both the old
and new message format.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@313499 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Fiselier
2017-09-17 20:57:05 +00:00
parent ffe3715924
commit dfcb00a2c5
12 changed files with 41 additions and 41 deletions

View File

@@ -23,7 +23,7 @@ int main() {
using namespace fs;
using RIt = std::reverse_iterator<path::iterator>;
// expected-error@iterator:* {{static_assert failed "The specified iterator type cannot be used with reverse_iterator; Using stashing iterators with reverse_iterator causes undefined behavior"}}
// expected-error-re@iterator:* {{static_assert failed{{.*}} "The specified iterator type cannot be used with reverse_iterator; Using stashing iterators with reverse_iterator causes undefined behavior"}}
{
RIt r;
((void)r);

View File

@@ -36,7 +36,7 @@ int main() {
SPtr<2> s2(getFn<2>(), Deleter{}); // OK
SPtr<3> s3(nullptr, Deleter{}); // OK
}
// expected-error@memory:* 2 {{static_assert failed "default_delete cannot be instantiated for function types"}}
// expected-error-re@memory:* 2 {{static_assert failed{{.*}} "default_delete cannot be instantiated for function types"}}
{
SPtr<4> s4(getFn<4>()); // expected-note {{requested here}}
SPtr<5> s5(getFn<5>(), std::default_delete<FnType<5>>{}); // expected-note {{requested here}}

View File

@@ -22,7 +22,7 @@
int main() {
std::allocator<void> alloc;
// expected-error@tuple:* 4 {{static_assert failed "Attempted to construct a reference element in a tuple with an rvalue"}}
// expected-error-re@tuple:* 4 {{static_assert failed{{.*}} "Attempted to construct a reference element in a tuple with an rvalue"}}
// bind lvalue to rvalue
std::tuple<int const&> t(42); // expected-note {{requested here}}