Fix static assert diagnostic checks in i386

llvm-svn: 349252
This commit is contained in:
Eric Fiselier 2018-12-15 05:18:56 +00:00
parent 3ac031bb8f
commit 241c73b191
5 changed files with 5 additions and 5 deletions

View File

@ -20,6 +20,6 @@ int main()
{
typedef std::pair<int, double> P;
std::tuple_element<2, P>::type foo; // expected-note {{requested here}}
// expected-error-re@utility:* {{static_assert failed{{( due to requirement '2UL < 2')?}} "Index out of bounds in std::tuple_element<std::pair<T1, T2>>"}}
// expected-error-re@utility:* {{static_assert failed{{( due to requirement '2U[L]{0,2} < 2')?}} "Index out of bounds in std::tuple_element<std::pair<T1, T2>>"}}
}
}

View File

@ -31,6 +31,6 @@ int main()
{
typedef std::variant<int, double> T;
std::variant_alternative<2, T>::type foo; // expected-note {{requested here}}
// expected-error-re@variant:* {{static_assert failed{{( due to requirement '2UL < sizeof...\(_Types\)')?}} "Index out of bounds in std::variant_alternative<>"}}
// expected-error-re@variant:* {{static_assert failed{{( due to requirement '2U[L]{0,2} < sizeof...\(_Types\)')?}} "Index out of bounds in std::variant_alternative<>"}}
}
}

View File

@ -31,6 +31,6 @@ int main()
typedef std::array<T, 3> C;
C c = {1, 2, 3.5};
std::get<3>(c) = 5.5; // expected-note {{requested here}}
// expected-error-re@array:* {{static_assert failed{{( due to requirement '3UL < 3UL')?}} "Index out of bounds in std::get<> (std::array)"}}
// expected-error-re@array:* {{static_assert failed{{( due to requirement '3U[L]{0,2} < 3U[L]{0,2}')?}} "Index out of bounds in std::get<> (std::array)"}}
}
}

View File

@ -30,6 +30,6 @@ int main()
typedef double T;
typedef std::array<T, 3> C;
std::tuple_element<3, C> foo; // expected-note {{requested here}}
// expected-error-re@array:* {{static_assert failed{{( due to requirement '3UL < 3UL')?}} "Index out of bounds in std::tuple_element<> (std::array)"}}
// expected-error-re@array:* {{static_assert failed{{( due to requirement '3U[L]{0,2} < 3U[L]{0,2}')?}} "Index out of bounds in std::tuple_element<> (std::array)"}}
}
}

View File

@ -25,7 +25,7 @@
int main ()
{
std::span<int, 2> s; // expected-error-re@span:* {{static_assert failed{{( due to requirement '2L == 0')?}} "Can't default construct a statically sized span with size > 0"}}
std::span<int, 2> s; // expected-error-re@span:* {{static_assert failed{{( due to requirement '2[LL]{0,2} == 0')?}} "Can't default construct a statically sized span with size > 0"}}
// TODO: This is what I want:
// eXpected-error {{no matching constructor for initialization of 'std::span<int, 2>'}}