Skip to content

Commit c458e9e

Browse files
authored
[Clang] Add target triple to fix failing test (#104513)
#102757 erroneously removed the target triple required for the test to pass.
1 parent 9f1dc01 commit c458e9e

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

clang/test/SemaCXX/constexpr-vectors.cpp

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 %s -Wno-uninitialized -std=c++14 -fsyntax-only -verify
1+
// RUN: %clang_cc1 %s -triple x86_64-linux-gnu -Wno-uninitialized -std=c++14 -fsyntax-only -verify
22

33
// expected-no-diagnostics
44

@@ -156,11 +156,11 @@ void CharUsage() {
156156
constexpr auto a = FourCharsVecSize{6, 3, 2, 1} +
157157
FourCharsVecSize{12, 15, 5, 7};
158158
static_assert(a[0] == 18 && a[1] == 18 && a[2] == 7 && a[3] == 8, "");
159-
159+
160160
constexpr auto b = FourCharsVecSize{19, 15, 13, 12} -
161161
FourCharsVecSize{13, 14, 5, 3};
162162
static_assert(b[0] == 6 && b[1] == 1 && b[2] == 8 && b[3] == 9, "");
163-
163+
164164
constexpr auto c = FourCharsVecSize{8, 4, 2, 1} *
165165
FourCharsVecSize{3, 4, 5, 6};
166166
static_assert(c[0] == 24 && c[1] == 16 && c[2] == 10 && c[3] == 6, "");
@@ -175,13 +175,13 @@ void CharUsage() {
175175

176176
constexpr auto f = FourCharsVecSize{6, 3, 2, 1} + 3;
177177
static_assert(f[0] == 9 && f[1] == 6 && f[2] == 5 && f[3] == 4, "");
178-
178+
179179
constexpr auto g = FourCharsVecSize{19, 15, 12, 10} - 3;
180-
static_assert(g[0] == 16 && g[1] == 12 && g[2] == 9 && g[3] == 7, "");
180+
static_assert(g[0] == 16 && g[1] == 12 && g[2] == 9 && g[3] == 7, "");
181181

182182
constexpr auto h = FourCharsVecSize{8, 4, 2, 1} * 3;
183183
static_assert(h[0] == 24 && h[1] == 12 && h[2] == 6 && h[3] == 3, "");
184-
184+
185185
constexpr auto j = FourCharsVecSize{12, 15, 18, 21} / 3;
186186
static_assert(j[0] == 4 && j[1] == 5 && j[2] == 6 && j[3] == 7, "");
187187

@@ -193,7 +193,7 @@ void CharUsage() {
193193

194194
constexpr auto m = 20 - FourCharsVecSize{19, 15, 12, 10};
195195
static_assert(m[0] == 1 && m[1] == 5 && m[2] == 8 && m[3] == 10, "");
196-
196+
197197
constexpr auto n = 3 * FourCharsVecSize{8, 4, 2, 1};
198198
static_assert(n[0] == 24 && n[1] == 12 && n[2] == 6 && n[3] == 3, "");
199199

@@ -254,7 +254,7 @@ void CharUsage() {
254254

255255
constexpr auto E = FourCharsVecSize{1, 2, 3, 4} <= 3;
256256
static_assert(E[0] == -1 && E[1] == -1 && E[2] == -1 && E[3] == 0, "");
257-
257+
258258
constexpr auto F = FourCharsVecSize{1, 2, 3, 4} >= 3;
259259
static_assert(F[0] == 0 && F[1] == 0 && F[2] == -1 && F[3] == -1, "");
260260

@@ -267,7 +267,7 @@ void CharUsage() {
267267
constexpr auto I = FourCharsVecSize{1, 2, 3, 4} &
268268
FourCharsVecSize{4, 3, 2, 1};
269269
static_assert(I[0] == 0 && I[1] == 2 && I[2] == 2 && I[3] == 0, "");
270-
270+
271271
constexpr auto J = FourCharsVecSize{1, 2, 3, 4} ^
272272
FourCharsVecSize { 4, 3, 2, 1 };
273273
static_assert(J[0] == 5 && J[1] == 1 && J[2] == 1 && J[3] == 5, "");
@@ -288,7 +288,7 @@ void CharUsage() {
288288
constexpr auto O = FourCharsVecSize{5, 0, 6, 0} &&
289289
FourCharsVecSize{5, 5, 0, 0};
290290
static_assert(O[0] == 1 && O[1] == 0 && O[2] == 0 && O[3] == 0, "");
291-
291+
292292
constexpr auto P = FourCharsVecSize{5, 0, 6, 0} ||
293293
FourCharsVecSize{5, 5, 0, 0};
294294
static_assert(P[0] == 1 && P[1] == 1 && P[2] == 1 && P[3] == 0, "");
@@ -330,7 +330,7 @@ void CharUsage() {
330330
static_assert(ac[0] == 20 && ac[1] == 19 && ac[2] == 15 && ac[3] == 1, "");
331331

332332
constexpr auto ad = CmpBinOr(a, b);
333-
static_assert(ad[0] == 22 && ad[1] == 19 && ad[2] == 15 && ad[3] == 9, "");
333+
static_assert(ad[0] == 22 && ad[1] == 19 && ad[2] == 15 && ad[3] == 9, "");
334334

335335
constexpr auto ae = ~FourCharsVecSize{1, 2, 10, 20};
336336
static_assert(ae[0] == -2 && ae[1] == -3 && ae[2] == -11 && ae[3] == -21, "");
@@ -395,7 +395,7 @@ void CharExtVecUsage() {
395395

396396
constexpr auto r = FourCharsExtVec{19, 15, 12, 10} >>
397397
FourCharsExtVec{1, 1, 2, 2};
398-
static_assert(r[0] == 9 && r[1] == 7 && r[2] == 3 && r[3] == 2, "");
398+
static_assert(r[0] == 9 && r[1] == 7 && r[2] == 3 && r[3] == 2, "");
399399

400400
constexpr auto s = FourCharsExtVec{6, 3, 5, 10} << 1;
401401
static_assert(s[0] == 12 && s[1] == 6 && s[2] == 10 && s[3] == 20, "");
@@ -441,7 +441,7 @@ void CharExtVecUsage() {
441441

442442
constexpr auto E = FourCharsExtVec{1, 2, 3, 4} <= 3;
443443
static_assert(E[0] == -1 && E[1] == -1 && E[2] == -1 && E[3] == 0, "");
444-
444+
445445
constexpr auto F = FourCharsExtVec{1, 2, 3, 4} >= 3;
446446
static_assert(F[0] == 0 && F[1] == 0 && F[2] == -1 && F[3] == -1, "");
447447

@@ -462,7 +462,7 @@ void CharExtVecUsage() {
462462
constexpr auto K = FourCharsExtVec{1, 2, 3, 4} |
463463
FourCharsExtVec{4, 3, 2, 1};
464464
static_assert(K[0] == 5 && K[1] == 3 && K[2] == 3 && K[3] == 5, "");
465-
465+
466466
constexpr auto L = FourCharsExtVec{1, 2, 3, 4} & 3;
467467
static_assert(L[0] == 1 && L[1] == 2 && L[2] == 3 && L[3] == 0, "");
468468

@@ -549,7 +549,7 @@ void FloatUsage() {
549549
constexpr auto g = FourFloatsVecSize{19, 15, 12, 10} - 3;
550550
static_assert(g[0] == 1.600000e+01 && g[1] == 1.200000e+01 && g[2] == 9.000000e+00 && g[3] == 7.000000e+00, "");
551551

552-
constexpr auto h = FourFloatsVecSize{8, 4, 2, 1} * 3;
552+
constexpr auto h = FourFloatsVecSize{8, 4, 2, 1} * 3;
553553
static_assert(h[0] == 2.400000e+01 && h[1] == 1.200000e+01 && h[2] == 6.000000e+00 && h[3] == 3.000000e+00, "");
554554

555555
constexpr auto j = FourFloatsVecSize{12, 15, 18, 21} / 3;
@@ -593,7 +593,7 @@ void FloatUsage() {
593593

594594
constexpr auto C = FourFloatsVecSize{1, 2, 3, 4} < 3;
595595
static_assert(C[0] == -1 && C[1] == -1 && C[2] == 0 && C[3] == 0, "");
596-
596+
597597
constexpr auto D = FourFloatsVecSize{1, 2, 3, 4} > 3;
598598
static_assert(D[0] == 0 && D[1] == 0 && D[2] == 0 && D[3] == -1, "");
599599

@@ -607,7 +607,7 @@ void FloatUsage() {
607607
static_assert(G[0] == 0 && G[1] == 0 && G[2] == -1 && G[3] == 0, "");
608608

609609
constexpr auto H = FourFloatsVecSize{1, 2, 3, 4} != 3;
610-
static_assert(H[0] == -1 && H[1] == -1 && H[2] == 0 && H[3] == -1, "");
610+
static_assert(H[0] == -1 && H[1] == -1 && H[2] == 0 && H[3] == -1, "");
611611

612612
constexpr auto O = FourFloatsVecSize{5, 0, 6, 0} &&
613613
FourFloatsVecSize{5, 5, 0, 0};
@@ -655,7 +655,7 @@ void FloatVecUsage() {
655655
constexpr auto c = FourFloatsVecSize{8, 4, 2, 1} *
656656
FourFloatsVecSize{3, 4, 5, 6};
657657
static_assert(c[0] == 2.400000e+01 && c[1] == 1.600000e+01 && c[2] == 1.000000e+01 && c[3] == 6.000000e+00, "");
658-
658+
659659
constexpr auto d = FourFloatsVecSize{12, 12, 10, 10} /
660660
FourFloatsVecSize{6, 4, 5, 2};
661661
static_assert(d[0] == 2.000000e+00 && d[1] == 3.000000e+00 && d[2] == 2.000000e+00 && d[3] == 5.000000e+00, "");
@@ -741,14 +741,14 @@ void FloatVecUsage() {
741741
static_assert(R[0] == 1 && R[1] == 1 && R[2] == 1 && R[3] == 1, "");
742742

743743
constexpr auto T = CmpMul(a, b);
744-
static_assert(T[0] == 1.080000e+02 && T[1] == 1.800000e+01 && T[2] == 5.600000e+01 && T[3] == 7.200000e+01, "");
744+
static_assert(T[0] == 1.080000e+02 && T[1] == 1.800000e+01 && T[2] == 5.600000e+01 && T[3] == 7.200000e+01, "");
745745

746746
constexpr auto U = CmpDiv(a, b);
747747
static_assert(CmpF(U[0], a[0] / b[0]) && CmpF(U[1], a[1] / b[1]) && CmpF(U[2], a[2] / b[2]) && CmpF(U[3], a[3] / b[3]), "");
748748

749749
constexpr auto X = CmpAdd(a, b);
750750
static_assert(X[0] == 2.400000e+01 && X[1] == 1.900000e+01 && X[2] == 1.500000e+01 && X[3] == 1.700000e+01, "");
751-
751+
752752
constexpr auto Y = CmpSub(a, b);
753753
static_assert(Y[0] == 1.200000e+01 && Y[1] == 1.700000e+01 && Y[2] == -1.000000e+00 && Y[3] == -1.000000e+00, "");
754754

@@ -826,7 +826,7 @@ void BoolVecUsage() {
826826

827827
constexpr auto i = FourBoolsExtVec{true, false, true, false} ^
828828
FourBoolsExtVec { false, false, true, true };
829-
static_assert(i[0] == true && i[1] == false && i[2] == false && i[3] == true, "");
829+
static_assert(i[0] == true && i[1] == false && i[2] == false && i[3] == true, "");
830830

831831
constexpr auto j = !FourBoolsExtVec{true, false, true, false};
832832
static_assert(j[0] == false && j[1] == true && j[2] == false && j[3] == true, "");

0 commit comments

Comments
 (0)