Skip to content

Commit 9cd617c

Browse files
authored
[clang] Fix lit test failure caused by #70762 (#72928)
Lit test generates different outputs for usage of __int128_t in clang-armv8-quick environment. This patch adds triple to fix the lit failure. ``` Step 5 (ninja check 1) failure: 1 unexpected failures 38623 expected passes 71 expected failures 36752 unsupported tests (failure) ******************** TEST 'Clang :: Sema/code_align.c' FAILED ******************** Exit Code: 1 Command Output (stderr): -- RUN: at line 1: /home/tcwg-buildbot/worker/clang-armv8-quick/stage1/bin/clang -cc1 -internal-isystem /home/tcwg-buildbot/worker/clang-armv8-quick/stage1/lib/clang/18/include -nostdsysteminc -fsyntax-only -verify=expected,c-local -x c /home/tcwg-buildbot/worker/clang-armv8-quick/llvm/clang/test/Sema/code_align.c + /home/tcwg-buildbot/worker/clang-armv8-quick/stage1/bin/clang -cc1 + -internal-isystem + /home/tcwg-buildbot/worker/clang-armv8-quick/stage1/lib/clang/18/inclu + de -nostdsysteminc -fsyntax-only -verify=expected,c-local -x c + /home/tcwg-buildbot/worker/clang-armv8-quick/llvm/clang/test/Sema/code + _align.c error: 'c-local-error' diagnostics expected but not seen: File /home/tcwg-buildbot/worker/clang-armv8-quick/llvm/clang/test/Sema/code_align.c Line 79 (directive at /home/tcwg-buildbot/worker/clang-armv8-quick/llvm/clang/test/Sema/code_align.c:78): 'code_align' attribute requires an integer argument which is a constant power of two between 1 and 4096 inclusive; provided argument was (__int128_t)1311768467294899680ULL << 64 File /home/tcwg-buildbot/worker/clang-armv8-quick/llvm/clang/test/Sema/code_align.c Line 89 (directive at /home/tcwg-buildbot/worker/clang-armv8-quick/llvm/clang/test/Sema/code_align.c:88): 'code_align' attribute requires an integer argument which is a constant power of two between 1 and 4096 inclusive; provided argument was -(__int128_t)1311768467294899680ULL << 64 error: 'c-local-error' diagnostics seen but not expected: File /home/tcwg-buildbot/worker/clang-armv8-quick/llvm/clang/test/Sema/code_align.c Line 79: use of undeclared identifier '__int128_t' File /home/tcwg-buildbot/worker/clang-armv8-quick/llvm/clang/test/Sema/code_align.c Line 89: use of undeclared identifier '__int128_t' 4 errors generated. ```
1 parent 9d26c6b commit 9cd617c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

clang/test/Sema/code_align.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: %clang_cc1 -fsyntax-only -verify=expected,c-local -x c %s
2-
// RUN: %clang_cc1 -fsyntax-only -verify=expected,cpp-local -pedantic -x c++ -std=c++11 %s
1+
// RUN: %clang_cc1 -triple x86_64-pc-linux -fsyntax-only -verify=expected,c-local -x c %s
2+
// RUN: %clang_cc1 -triple x86_64-pc-linux -fsyntax-only -verify=expected,cpp-local -pedantic -x c++ -std=c++11 %s
33

44
void foo() {
55
int i;
@@ -131,7 +131,7 @@ void code_align_dependent() {
131131
[[clang::code_align(A)]] // OK
132132
for(int I=0; I<128; ++I) { bar(I); }
133133

134-
[[clang::code_align(A)]] // expected-note{{previous attribute is here}}
134+
[[clang::code_align(A)]] // cpp-local-note{{previous attribute is here}}
135135
[[clang::code_align(E)]] // cpp-local-error{{conflicting loop attribute 'code_align'}}
136136
for(int I=0; I<128; ++I) { bar(I); }
137137

@@ -147,15 +147,15 @@ void code_align_dependent() {
147147

148148
template<int ITMPL>
149149
void bar3() {
150-
[[clang::code_align(8)]] // expected-note{{previous attribute is here}}
150+
[[clang::code_align(8)]] // cpp-local-note{{previous attribute is here}}
151151
[[clang::code_align(ITMPL)]] // cpp-local-error{{conflicting loop attribute 'code_align'}} \
152152
// cpp-local-note@#temp-instantiation{{in instantiation of function template specialization 'bar3<4>' requested here}}
153153
for(int I=0; I<128; ++I) { bar(I); }
154154
}
155155

156156
template<int ITMPL1>
157157
void bar4() {
158-
[[clang::code_align(ITMPL1)]] // expected-note{{previous attribute is here}}
158+
[[clang::code_align(ITMPL1)]] // cpp-local-note{{previous attribute is here}}
159159
[[clang::code_align(32)]] // cpp-local-error{{conflicting loop attribute 'code_align'}} \
160160
// cpp-local-note@#temp-instantiation1{{in instantiation of function template specialization 'bar4<64>' requested here}}
161161
for(int I=0; I<128; ++I) { bar(I); }

0 commit comments

Comments
 (0)