https://github.com/smanna12 updated https://github.com/llvm/llvm-project/pull/72928
>From 55d5f22645b8f76c4daf15f220974e2b00a0157b Mon Sep 17 00:00:00 2001 From: "Manna, Soumi" <soumi.ma...@intel.com> Date: Mon, 20 Nov 2023 16:19:37 -0800 Subject: [PATCH 1/3] [clang] Fix lit test failure caused by https://github.com/llvm/llvm-project/pull/70762 --- clang/test/Sema/code_align.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/clang/test/Sema/code_align.c b/clang/test/Sema/code_align.c index 539c0c0b0f1ccfb..003bc08b87482c9 100644 --- a/clang/test/Sema/code_align.c +++ b/clang/test/Sema/code_align.c @@ -75,7 +75,7 @@ void foo1(int A) [[clang::code_align(9223372036854775808)]] for(int I=0; I<256; ++I) { bar(I); } - // expected-error@+1{{'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}} + // cpp-local-error@+1{{'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}} [[clang::code_align((__int128_t)0x1234567890abcde0ULL << 64)]] for(int I=0; I<256; ++I) { bar(I); } @@ -85,7 +85,6 @@ void foo1(int A) // cpp-local-error@+3{{expression is not an integral constant expression}} // cpp-local-note@+2{{left shift of negative value -1311768467294899680}} - // c-local-error@+1{{'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}} [[clang::code_align(-(__int128_t)0x1234567890abcde0ULL << 64)]] for(int I=0; I<256; ++I) { bar(I); } @@ -127,7 +126,7 @@ void code_align_dependent() { [[clang::code_align(A)]] // OK for(int I=0; I<128; ++I) { bar(I); } - [[clang::code_align(A)]] // expected-note{{previous attribute is here}} + [[clang::code_align(A)]] // cpp-local-note{{previous attribute is here}} [[clang::code_align(E)]] // cpp-local-error{{conflicting loop attribute 'code_align'}} for(int I=0; I<128; ++I) { bar(I); } @@ -143,7 +142,7 @@ void code_align_dependent() { template<int ITMPL> void bar3() { - [[clang::code_align(8)]] // expected-note{{previous attribute is here}} + [[clang::code_align(8)]] // cpp-local-note{{previous attribute is here}} [[clang::code_align(ITMPL)]] // cpp-local-error{{conflicting loop attribute 'code_align'}} \ // cpp-local-note@#temp-instantiation{{in instantiation of function template specialization 'bar3<4>' requested here}} for(int I=0; I<128; ++I) { bar(I); } @@ -151,7 +150,7 @@ void bar3() { template<int ITMPL1> void bar4() { - [[clang::code_align(ITMPL1)]] // expected-note{{previous attribute is here}} + [[clang::code_align(ITMPL1)]] // cpp-local-note{{previous attribute is here}} [[clang::code_align(32)]] // cpp-local-error{{conflicting loop attribute 'code_align'}} \ // cpp-local-note@#temp-instantiation1{{in instantiation of function template specialization 'bar4<64>' requested here}} for(int I=0; I<128; ++I) { bar(I); } >From 2216a57d8cd17f93a16f045333ab0c92121217a0 Mon Sep 17 00:00:00 2001 From: "Manna, Soumi" <soumi.ma...@intel.com> Date: Mon, 20 Nov 2023 20:20:26 -0800 Subject: [PATCH 2/3] Add triple --- clang/test/Sema/code_align.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/clang/test/Sema/code_align.c b/clang/test/Sema/code_align.c index 003bc08b87482c9..94ca85a2fe200cf 100644 --- a/clang/test/Sema/code_align.c +++ b/clang/test/Sema/code_align.c @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -fsyntax-only -verify=expected,c-local -x c %s -// RUN: %clang_cc1 -fsyntax-only -verify=expected,cpp-local -pedantic -x c++ -std=c++11 %s +// RUN: %clang_cc1 -triple=x86_64-unknown-linux -fsyntax-only -verify=expected,c-local -x c %s +// RUN: %clang_cc1 -triple=x86_64-unknown-linux -fsyntax-only -verify=expected,cpp-local -pedantic -x c++ -std=c++11 %s void foo() { int i; @@ -75,7 +75,7 @@ void foo1(int A) [[clang::code_align(9223372036854775808)]] for(int I=0; I<256; ++I) { bar(I); } - // cpp-local-error@+1{{'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}} + // expected-error@+1{{'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}} [[clang::code_align((__int128_t)0x1234567890abcde0ULL << 64)]] for(int I=0; I<256; ++I) { bar(I); } @@ -85,6 +85,7 @@ void foo1(int A) // cpp-local-error@+3{{expression is not an integral constant expression}} // cpp-local-note@+2{{left shift of negative value -1311768467294899680}} + // c-local-error@+1{{'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}} [[clang::code_align(-(__int128_t)0x1234567890abcde0ULL << 64)]] for(int I=0; I<256; ++I) { bar(I); } >From 0643606db858820f45494c14dc61f1248d5fbd8f Mon Sep 17 00:00:00 2001 From: "Manna, Soumi" <soumi.ma...@intel.com> Date: Mon, 20 Nov 2023 20:52:51 -0800 Subject: [PATCH 3/3] Fix test --- clang/test/Sema/code_align.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clang/test/Sema/code_align.c b/clang/test/Sema/code_align.c index 94ca85a2fe200cf..8e4e2fdeb6a4502 100644 --- a/clang/test/Sema/code_align.c +++ b/clang/test/Sema/code_align.c @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -triple=x86_64-unknown-linux -fsyntax-only -verify=expected,c-local -x c %s -// RUN: %clang_cc1 -triple=x86_64-unknown-linux -fsyntax-only -verify=expected,cpp-local -pedantic -x c++ -std=c++11 %s +// RUN: %clang_cc1 -triple x86_64-pc-linux -fsyntax-only -verify=expected,c-local -x c %s +// RUN: %clang_cc1 -triple x86_64-pc-linux -fsyntax-only -verify=expected,cpp-local -pedantic -x c++ -std=c++11 %s void foo() { int i; _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits