mirror of
https://github.com/intel/llvm.git
synced 2026-01-13 19:08:21 +08:00
Fix two failing -verify tests to tolerate old and new clang versions
llvm-svn: 313502
This commit is contained in:
@@ -29,18 +29,18 @@ int main()
|
||||
any a;
|
||||
|
||||
// expected-error@any:* {{binding value of type 'const TestType' to reference to type 'TestType' drops 'const' qualifier}}
|
||||
// expected-error-re@any:* {{static_assert failed {{.*}} "ValueType is required to be a const lvalue reference or a CopyConstructible type"}}
|
||||
// expected-error-re@any:* {{static_assert failed{{.*}} "ValueType is required to be a const lvalue reference or a CopyConstructible type"}}
|
||||
any_cast<TestType &>(static_cast<any const&>(a)); // expected-note {{requested here}}
|
||||
|
||||
// expected-error@any:* {{cannot cast from lvalue of type 'const TestType' to rvalue reference type 'TestType &&'; types are not compatible}}
|
||||
// expected-error-re@any:* {{static_assert failed {{.*}} "ValueType is required to be a const lvalue reference or a CopyConstructible type"}}
|
||||
// expected-error-re@any:* {{static_assert failed{{.*}} "ValueType is required to be a const lvalue reference or a CopyConstructible type"}}
|
||||
any_cast<TestType &&>(static_cast<any const&>(a)); // expected-note {{requested here}}
|
||||
|
||||
// expected-error@any:* {{binding value of type 'const TestType2' to reference to type 'TestType2' drops 'const' qualifier}}
|
||||
// expected-error-re@any:* {{static_assert failed {{.*}} "ValueType is required to be a const lvalue reference or a CopyConstructible type"}}
|
||||
// expected-error-re@any:* {{static_assert failed{{.*}} "ValueType is required to be a const lvalue reference or a CopyConstructible type"}}
|
||||
any_cast<TestType2 &>(static_cast<any const&&>(a)); // expected-note {{requested here}}
|
||||
|
||||
// expected-error@any:* {{cannot cast from lvalue of type 'const TestType2' to rvalue reference type 'TestType2 &&'; types are not compatible}}
|
||||
// expected-error-re@any:* {{static_assert failed {{.*}} "ValueType is required to be a const lvalue reference or a CopyConstructible type"}}
|
||||
// expected-error-re@any:* {{static_assert failed{{.*}} "ValueType is required to be a const lvalue reference or a CopyConstructible type"}}
|
||||
any_cast<TestType2 &&>(static_cast<any const&&>(a)); // expected-note {{requested here}}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ int main()
|
||||
#if TEST_STD_VER >= 11
|
||||
{
|
||||
std::forward<A&>(source()); // expected-note {{requested here}}
|
||||
// expected-error-re@type_traits:* 1 {{static_assert failed {{.*}} "can not forward an rvalue as an lvalue"}}
|
||||
// expected-error-re@type_traits:* 1 {{static_assert failed{{.*}} "can not forward an rvalue as an lvalue"}}
|
||||
}
|
||||
#else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user