Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / libcxx / test / std / utilities / intseq / intseq.make / make_integer_seq.verify.cpp
blobeb8faccff0dc314bf35563f2872c471607563cd8
1 //===----------------------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
9 // <utility>
11 // template<class T, T N>
12 // using make_integer_sequence = integer_sequence<T, 0, 1, ..., N-1>;
14 // UNSUPPORTED: c++03, c++11
16 // This test hangs during recursive template instantiation with libstdc++
17 // UNSUPPORTED: stdlib=libstdc++
19 #include <utility>
21 #include "test_macros.h"
23 typedef std::make_integer_sequence<int, -3> MakeSeqT;
25 // std::make_integer_sequence is implemented using a compiler builtin if available.
26 // this builtin has different diagnostic messages than the fallback implementation.
27 #if TEST_HAS_BUILTIN(__make_integer_seq)
28 MakeSeqT i; // expected-error@*:* {{integer sequences must have non-negative sequence length}}
29 #else
30 MakeSeqT i; // expected-error-re@*:* {{static assertion failed{{.*}}std::make_integer_sequence must have a non-negative sequence length}}
31 #endif