[clang] [Clang] prevent recovery call expression from proceeding with explicit attributes and undeclared templates (PR #107786)

2024-09-24 Thread Oleksandr T. via cfe-commits
@@ -0,0 +1,32 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++20 %s + +namespace GH49093 { + class B { + public: +static int a() { return 0; } // expected-note {{member is declared here}} +decltype(a< 0 >(0)) test;// expected-error {{member 'a' used before its

[clang] [Clang] prevent recovery call expression from proceeding with explicit attributes and undeclared templates (PR #107786)

2024-09-24 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk deleted https://github.com/llvm/llvm-project/pull/107786 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] prevent recovery call expression from proceeding with explicit attributes and undeclared templates (PR #107786)

2024-09-23 Thread Oleksandr T. via cfe-commits
@@ -0,0 +1,32 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++20 %s + +namespace GH49093 { + class B { + public: +static int a() { return 0; } // expected-note {{member is declared here}} +decltype(a< 0 >(0)) test;// expected-error {{member 'a' used before its

[clang] [Clang] prevent recovery call expression from proceeding with explicit attributes and undeclared templates (PR #107786)

2024-09-23 Thread Oleksandr T. via cfe-commits
@@ -0,0 +1,32 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++20 %s + +namespace GH49093 { + class B { + public: +static int a() { return 0; } // expected-note {{member is declared here}} +decltype(a< 0 >(0)) test;// expected-error {{member 'a' used before its

[clang] [Clang] prevent recovery call expression from proceeding with explicit attributes and undeclared templates (PR #107786)

2024-09-23 Thread Oleksandr T. via cfe-commits
@@ -0,0 +1,32 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++20 %s + +namespace GH49093 { + class B { + public: +static int a() { return 0; } // expected-note {{member is declared here}} +decltype(a< 0 >(0)) test;// expected-error {{member 'a' used before its

[clang] [Clang] prevent recovery call expression from proceeding with explicit attributes and undeclared templates (PR #107786)

2024-09-23 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/107786 >From e9948a1004cc2b486a0422d83e88392754e9f7e9 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Mon, 23 Sep 2024 17:17:30 +0300 Subject: [PATCH] [Clang] prevent recovery call expression from proceeding with

[clang] [Clang] prevent recovery call expression from proceeding with explicit attributes and undeclared templates (PR #107786)

2024-09-23 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/107786 >From 19e6556e0fb0add28c502bb82543bcdf820c1877 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Mon, 23 Sep 2024 17:17:30 +0300 Subject: [PATCH 1/2] [Clang] prevent recovery call expression from proceeding w

[clang] [Clang] prevent recovery call expression from proceeding with explicit attributes and undeclared templates (PR #107786)

2024-09-23 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/107786 >From 19e6556e0fb0add28c502bb82543bcdf820c1877 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Mon, 23 Sep 2024 17:17:30 +0300 Subject: [PATCH] [Clang] prevent recovery call expression from proceeding with

[clang] [Clang] prevented assertion failure by handling integral to boolean conversions for boolean vectors (PR #108657)

2024-09-19 Thread Oleksandr T. via cfe-commits
@@ -51,6 +53,9 @@ static void test(void) { ivec4 -= ivec4; ivec4 |= ivec4; ivec4 += ptr; // expected-error {{cannot convert between vector and non-scalar values ('int4' (vector of 4 'int' values) and 'int *')}} + +bvec4 != 0; // expected-warning {{inequality co

[clang] [Clang] prevented assertion failure by handling integral to boolean conversions for boolean vectors (PR #108657)

2024-09-19 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/108657 >From 70d1be2a2a0f2f44cdd70bfb4397e7a36f1c9f30 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Sat, 14 Sep 2024 01:46:28 +0300 Subject: [PATCH 1/3] [Clang] prevented assertion failure by handling integral t

[clang] [Clang] prevent recovery call expression from proceeding with explicit attributes and undeclared templates (PR #107786)

2024-09-18 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/107786 >From 8774b4b073b5ebb52bdf35a7c44c613c6fcf56fc Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Fri, 13 Sep 2024 17:55:15 +0300 Subject: [PATCH] [Clang] prevent recovery call expression from proceeding with

[clang] [Clang] prevented assertion failure by handling integral to boolean conversions for boolean vectors (PR #108657)

2024-09-18 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/108657 >From 70d1be2a2a0f2f44cdd70bfb4397e7a36f1c9f30 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Sat, 14 Sep 2024 01:46:28 +0300 Subject: [PATCH 1/2] [Clang] prevented assertion failure by handling integral t

[clang] [Clang] prevented assertion failure by handling integral to boolean conversions for boolean vectors (PR #108657)

2024-09-17 Thread Oleksandr T. via cfe-commits
@@ -9868,7 +9868,12 @@ static bool tryVectorConvertAndSplat(Sema &S, ExprResult *scalar, // if necessary. CastKind scalarCast = CK_NoOp; - if (vectorEltTy->isIntegralType(S.Context)) { + if (vectorEltTy->isBooleanType()) { +if (scalarTy->isIntegralType(S.Context)) +

[clang] [Clang] prevented assertion failure by handling integral to boolean conversions for boolean vectors (PR #108657)

2024-09-17 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/108657 >From 70d1be2a2a0f2f44cdd70bfb4397e7a36f1c9f30 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Sat, 14 Sep 2024 01:46:28 +0300 Subject: [PATCH 1/2] [Clang] prevented assertion failure by handling integral t

[clang] [Clang] prevented assertion failure by handling integral to boolean conversions for boolean vectors (PR #108657)

2024-09-17 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/108657 >From 70d1be2a2a0f2f44cdd70bfb4397e7a36f1c9f30 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Sat, 14 Sep 2024 01:46:28 +0300 Subject: [PATCH 1/2] [Clang] prevented assertion failure by handling integral t

[clang] [Clang] prevent recovery call expression from proceeding with explicit attributes and undeclared templates (PR #107786)

2024-09-16 Thread Oleksandr T. via cfe-commits
a-tarasyuk wrote: @AaronBallman could you please review these changes? thanks https://github.com/llvm/llvm-project/pull/107786 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] prevent recovery call expression from proceeding with explicit attributes and undeclared templates (PR #107786)

2024-09-16 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/107786 >From 8774b4b073b5ebb52bdf35a7c44c613c6fcf56fc Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Fri, 13 Sep 2024 17:55:15 +0300 Subject: [PATCH] [Clang] prevent recovery call expression from proceeding with

[clang] [Clang] handle invalid close location in static assert declaration (PR #108701)

2024-09-16 Thread Oleksandr T. via cfe-commits
a-tarasyuk wrote: @AaronBallman Thanks for the review. If these changes seem fine, could someone merge them? I don't have the required permissions. thanks https://github.com/llvm/llvm-project/pull/108701 ___ cfe-commits mailing list cfe-commits@lists

[clang] [Clang] handle invalid close location in static assert declaration (PR #108701)

2024-09-15 Thread Oleksandr T. via cfe-commits
a-tarasyuk wrote: @zyn0217 Thanks for the detailed feedback. I considered handling it earlier and skipping the validation of the closing parenthesis, but I was concerned the message `"expected ';' after 'static_assert'"` might not be accurate in this case., I assumed `""` is a valid string, ev

[clang] [Clang] handle invalid close location in static assert declaration (PR #108701)

2024-09-15 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/108701 >From cbe06cf33277f904fe002db90d428a55b777ff5d Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Sat, 14 Sep 2024 17:02:01 +0300 Subject: [PATCH 1/3] [Clang] handle invalid close location in static assert dec

[clang] [Clang] handle invalid close location in static assert declaration (PR #108701)

2024-09-14 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk edited https://github.com/llvm/llvm-project/pull/108701 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] handle invalid close location in static assert declaration (PR #108701)

2024-09-14 Thread Oleksandr T. via cfe-commits
@@ -0,0 +1,5 @@ +// RUN: %clang_cc1 -std=c++2a -triple=x86_64-linux -fsyntax-only %s -verify a-tarasyuk wrote: The file refers to cxx26 —is it ok to add tests related to C++20 here?" https://github.com/llvm/llvm-project/pull/108701 __

[clang] [Clang] handle invalid close location in static assert declaration (PR #108701)

2024-09-14 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/108701 >From cbe06cf33277f904fe002db90d428a55b777ff5d Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Sat, 14 Sep 2024 17:02:01 +0300 Subject: [PATCH 1/2] [Clang] handle invalid close location in static assert dec

[clang] [Clang] handle invalid close location in static assert declaration (PR #108701)

2024-09-14 Thread Oleksandr T. via cfe-commits
a-tarasyuk wrote: > So this looks like a regression: https://gcc.godbolt.org/z/h6GexT18E @shafik https://gcc.godbolt.org/z/Ebvnjrc8e https://github.com/llvm/llvm-project/pull/108701 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists

[clang] [Clang] handle invalid close location in static assert declaration (PR #108701)

2024-09-14 Thread Oleksandr T. via cfe-commits
a-tarasyuk wrote: @cor3ntin when you get a chance, could you merge this? I don’t have the permissions. thanks! https://github.com/llvm/llvm-project/pull/108701 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mail

[clang] [Clang] handle invalid close location in static assert declaration (PR #108701)

2024-09-14 Thread Oleksandr T. via cfe-commits
@@ -1110,6 +1110,8 @@ Decl *Parser::ParseStaticAssertDeclaration(SourceLocation &DeclEnd) { } T.consumeClose(); + if (T.getCloseLocation().isInvalid()) +return nullptr; a-tarasyuk wrote: @cor3ntin Thanks for the review. I've added changes to omit re

[clang] [Clang] handle invalid close location in static assert declaration (PR #108701)

2024-09-14 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/108701 >From cbe06cf33277f904fe002db90d428a55b777ff5d Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Sat, 14 Sep 2024 17:02:01 +0300 Subject: [PATCH] [Clang] handle invalid close location in static assert declara

[clang] [Clang] handle invalid close location in static assert declaration (PR #108701)

2024-09-14 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk created https://github.com/llvm/llvm-project/pull/108701 Fixes #108687 >From 3e7e69e36e93f12c33ccdda9fea78e22cc9bdd84 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Sat, 14 Sep 2024 17:02:01 +0300 Subject: [PATCH] [Clang] handle invalid close location in static

[clang] [Clang] prevented assertion failure by handling integral to boolean conversions for boolean vectors (PR #108657)

2024-09-13 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/108657 >From 70d1be2a2a0f2f44cdd70bfb4397e7a36f1c9f30 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Sat, 14 Sep 2024 01:46:28 +0300 Subject: [PATCH] [Clang] prevented assertion failure by handling integral to bo

[clang] [Clang] prevented assertion failure by handling integral to boolean conversions for boolean vectors (PR #108657)

2024-09-13 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk created https://github.com/llvm/llvm-project/pull/108657 Fixes #108326 >From 70d1be2a2a0f2f44cdd70bfb4397e7a36f1c9f30 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Sat, 14 Sep 2024 01:46:28 +0300 Subject: [PATCH] [Clang] prevented assertion failure by handling

[clang] [Clang] prevent recovery call expression from proceeding with explicit attributes and undeclared templates (PR #107786)

2024-09-13 Thread Oleksandr T. via cfe-commits
a-tarasyuk wrote: @AaronBallman could you please review this PR when you have a chance? thanks https://github.com/llvm/llvm-project/pull/107786 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[clang] [Clang] prevent recovery call expression from proceeding with explicit attributes and undeclared templates (PR #107786)

2024-09-13 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/107786 >From 8774b4b073b5ebb52bdf35a7c44c613c6fcf56fc Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Fri, 13 Sep 2024 17:55:15 +0300 Subject: [PATCH] [Clang] prevent recovery call expression from proceeding with

[clang] [Clang] prevent recovery call expression from proceeding with explicit attributes and undeclared templates (PR #107786)

2024-09-12 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/107786 >From b50e49be3765c31b1c555384c41e1f528d529a88 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Mon, 9 Sep 2024 02:30:35 +0300 Subject: [PATCH] [Clang] prevent recovery call expression from proceeding with e

[clang] [Clang] prevent recovery call expression from proceeding with explicit attributes and undeclared templates (PR #107786)

2024-09-11 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/107786 >From b50e49be3765c31b1c555384c41e1f528d529a88 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Mon, 9 Sep 2024 02:30:35 +0300 Subject: [PATCH] [Clang] prevent recovery call expression from proceeding with e

[clang] [llvm] [Clang] restrict use of attribute names reserved by the C++ standard (PR #106036)

2024-09-10 Thread Oleksandr T. via cfe-commits
a-tarasyuk wrote: @AaronBallman oke, thanks for the update. https://github.com/llvm/llvm-project/pull/106036 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] prevent recovery call expression from proceeding with explicit attributes and undeclared templates (PR #107786)

2024-09-10 Thread Oleksandr T. via cfe-commits
a-tarasyuk wrote: @AaronBallman could you please review this fix? thanks https://github.com/llvm/llvm-project/pull/107786 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] prevent recovery call expression from proceeding with explicit attributes and undeclared templates (PR #107786)

2024-09-10 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/107786 >From b50e49be3765c31b1c555384c41e1f528d529a88 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Mon, 9 Sep 2024 02:30:35 +0300 Subject: [PATCH] [Clang] prevent recovery call expression from proceeding with e

[clang] [llvm] [Clang] restrict use of attribute names reserved by the C++ standard (PR #106036)

2024-09-09 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/106036 >From 8314ba1abc040c5403ec16cc531c822799689598 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Tue, 10 Sep 2024 02:35:43 +0300 Subject: [PATCH] [Clang] restrict use of attribute names reserved by the C++ st

[clang] [Clang] prevent recovery call expression from proceeding with explicit attributes and undeclared templates (PR #107786)

2024-09-09 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/107786 >From b50e49be3765c31b1c555384c41e1f528d529a88 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Mon, 9 Sep 2024 02:30:35 +0300 Subject: [PATCH] [Clang] prevent recovery call expression from proceeding with e

[clang] [Clang] prevent recovery call expression from proceeding with explicit attributes and undeclared templates (PR #107786)

2024-09-08 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk created https://github.com/llvm/llvm-project/pull/107786 Fixes #107047 Fixes #49093 >From b50e49be3765c31b1c555384c41e1f528d529a88 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Mon, 9 Sep 2024 02:30:35 +0300 Subject: [PATCH] [Clang] prevent recovery call expres

[clang] [Clang] restrict use of attribute names reserved by the C++ standard (PR #106036)

2024-09-02 Thread Oleksandr T. via cfe-commits
@@ -177,6 +177,26 @@ static bool isLanguageDefinedBuiltin(const SourceManager &SourceMgr, return false; } +static bool isReservedAttrName(Preprocessor &PP, IdentifierInfo *II) { a-tarasyuk wrote: @philnik777 @AaronBallman The reason I asked is that I recal

[clang] [Clang] restrict use of attribute names reserved by the C++ standard (PR #106036)

2024-09-02 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk deleted https://github.com/llvm/llvm-project/pull/106036 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] restrict use of attribute names reserved by the C++ standard (PR #106036)

2024-09-01 Thread Oleksandr T. via cfe-commits
@@ -177,6 +177,26 @@ static bool isLanguageDefinedBuiltin(const SourceManager &SourceMgr, return false; } +static bool isReservedAttrName(Preprocessor &PP, IdentifierInfo *II) { a-tarasyuk wrote: The reason I asked is that I recall clang has a predefined m

[clang] [Clang] restrict use of attribute names reserved by the C++ standard (PR #106036)

2024-09-01 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk deleted https://github.com/llvm/llvm-project/pull/106036 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] restrict use of attribute names reserved by the C++ standard (PR #106036)

2024-09-01 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk edited https://github.com/llvm/llvm-project/pull/106036 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] restrict use of attribute names reserved by the C++ standard (PR #106036)

2024-09-01 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk edited https://github.com/llvm/llvm-project/pull/106036 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] restrict use of attribute names reserved by the C++ standard (PR #106036)

2024-09-01 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk edited https://github.com/llvm/llvm-project/pull/106036 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] restrict use of attribute names reserved by the C++ standard (PR #106036)

2024-09-01 Thread Oleksandr T. via cfe-commits
@@ -177,6 +177,26 @@ static bool isLanguageDefinedBuiltin(const SourceManager &SourceMgr, return false; } +static bool isReservedAttrName(Preprocessor &PP, IdentifierInfo *II) { a-tarasyuk wrote: The reason I asked is that I recall clang has a predefined m

[clang] [Clang] restrict use of attribute names reserved by the C++ standard (PR #106036)

2024-08-31 Thread Oleksandr T. via cfe-commits
@@ -177,6 +177,26 @@ static bool isLanguageDefinedBuiltin(const SourceManager &SourceMgr, return false; } +static bool isReservedAttrName(Preprocessor &PP, IdentifierInfo *II) { a-tarasyuk wrote: @AaronBallman Thanks. Just to confirm, are future attribute

[clang] [Clang] restrict use of attribute names reserved by the C++ standard (PR #106036)

2024-08-30 Thread Oleksandr T. via cfe-commits
@@ -177,6 +177,26 @@ static bool isLanguageDefinedBuiltin(const SourceManager &SourceMgr, return false; } +static bool isReservedAttrName(Preprocessor &PP, IdentifierInfo *II) { a-tarasyuk wrote: @Sirraide @AaronBallman @cor3ntin In the context of avoiding

[clang] [Clang] restrict use of attribute names reserved by the C++ standard (PR #106036)

2024-08-30 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk deleted https://github.com/llvm/llvm-project/pull/106036 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] restrict use of attribute names reserved by the C++ standard (PR #106036)

2024-08-29 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk edited https://github.com/llvm/llvm-project/pull/106036 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] restrict use of attribute names reserved by the C++ standard (PR #106036)

2024-08-29 Thread Oleksandr T. via cfe-commits
@@ -177,6 +177,26 @@ static bool isLanguageDefinedBuiltin(const SourceManager &SourceMgr, return false; } +static bool isReservedAttrName(Preprocessor &PP, IdentifierInfo *II) { a-tarasyuk wrote: @Sirraide @AaronBallman In the context of avoiding hardcoded

[clang] [Clang] prevent assertion failure when converting vectors to int/float with invalid expressions (PR #105727)

2024-08-29 Thread Oleksandr T. via cfe-commits
a-tarasyuk wrote: could someone merge this if there are no concerns? thanks. https://github.com/llvm/llvm-project/pull/105727 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] prevent assertion failure when converting vectors to int/float with invalid expressions (PR #105727)

2024-08-29 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/105727 >From d8bed3f4db8056a6afa9bd7eae5d4a8361f83086 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Thu, 22 Aug 2024 23:25:31 +0300 Subject: [PATCH 1/2] [Clang] prevent assertion failure when converting vectors

[clang] [Clang] prevent assertion failure when converting vectors to int/float with invalid expressions (PR #105727)

2024-08-29 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/105727 >From d8bed3f4db8056a6afa9bd7eae5d4a8361f83086 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Thu, 22 Aug 2024 23:25:31 +0300 Subject: [PATCH 1/2] [Clang] prevent assertion failure when converting vectors

[clang] [Clang] prevent assertion failure when converting vectors to int/float with invalid expressions (PR #105727)

2024-08-28 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/105727 >From d8bed3f4db8056a6afa9bd7eae5d4a8361f83086 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Thu, 22 Aug 2024 23:25:31 +0300 Subject: [PATCH 1/2] [Clang] prevent assertion failure when converting vectors

[clang] [Clang] prevent assertion failure when converting vectors to int/float with invalid expressions (PR #105727)

2024-08-28 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/105727 >From d8bed3f4db8056a6afa9bd7eae5d4a8361f83086 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Thu, 22 Aug 2024 23:25:31 +0300 Subject: [PATCH 1/2] [Clang] prevent assertion failure when converting vectors

[clang] [Clang] prevent assertion failure when converting vectors to int/float with invalid expressions (PR #105727)

2024-08-28 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/105727 >From d8bed3f4db8056a6afa9bd7eae5d4a8361f83086 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Thu, 22 Aug 2024 23:25:31 +0300 Subject: [PATCH 1/2] [Clang] prevent assertion failure when converting vectors

[clang] [Clang] restrict use of attribute names reserved by the C++ standard (PR #106036)

2024-08-28 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/106036 >From 67e70c3abc2527d2f35abdc10ce2710dd9ebb918 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Mon, 26 Aug 2024 07:37:04 +0300 Subject: [PATCH] [Clang] restrict use of attribute names reserved by the C++ st

[clang] [Clang] prevent assertion failure when converting vectors to int/float with invalid expressions (PR #105727)

2024-08-27 Thread Oleksandr T. via cfe-commits
@@ -9888,6 +9888,9 @@ static ExprResult convertVector(Expr *E, QualType ElementType, Sema &S) { /// IntTy without losing precision. static bool canConvertIntToOtherIntTy(Sema &S, ExprResult *Int, QualType OtherIntTy) { + if (Int->get()->i

[clang] [Clang] prevent assertion failure when converting vectors to int/float with invalid expressions (PR #105727)

2024-08-27 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk edited https://github.com/llvm/llvm-project/pull/105727 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] prevent assertion failure when converting vectors to int/float with invalid expressions (PR #105727)

2024-08-27 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk edited https://github.com/llvm/llvm-project/pull/105727 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] prevent assertion failure when converting vectors to int/float with invalid expressions (PR #105727)

2024-08-27 Thread Oleksandr T. via cfe-commits
@@ -9888,6 +9888,9 @@ static ExprResult convertVector(Expr *E, QualType ElementType, Sema &S) { /// IntTy without losing precision. static bool canConvertIntToOtherIntTy(Sema &S, ExprResult *Int, QualType OtherIntTy) { + if (Int->get()->i

[clang] [Clang] prevent assertion failure when converting vectors to int/float with invalid expressions (PR #105727)

2024-08-27 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/105727 >From d8bed3f4db8056a6afa9bd7eae5d4a8361f83086 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Thu, 22 Aug 2024 23:25:31 +0300 Subject: [PATCH 1/2] [Clang] prevent assertion failure when converting vectors

[clang] [Clang] prevent assertion failure when converting vectors to int/float with invalid expressions (PR #105727)

2024-08-27 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/105727 >From d8bed3f4db8056a6afa9bd7eae5d4a8361f83086 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Thu, 22 Aug 2024 23:25:31 +0300 Subject: [PATCH 1/2] [Clang] prevent assertion failure when converting vectors

[clang] [Clang] prevent assertion failure when converting vectors to int/float with invalid expressions (PR #105727)

2024-08-26 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/105727 >From d8bed3f4db8056a6afa9bd7eae5d4a8361f83086 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Thu, 22 Aug 2024 23:25:31 +0300 Subject: [PATCH] [Clang] prevent assertion failure when converting vectors to i

[clang] [Clang] prevent assertion failure when converting vectors to int/float with invalid expressions (PR #105727)

2024-08-26 Thread Oleksandr T. via cfe-commits
a-tarasyuk wrote: @AaronBallman could you review these changes? https://github.com/llvm/llvm-project/issues/105486#issuecomment-2308879407 thanks https://github.com/llvm/llvm-project/pull/105727 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Clang] prevent assertion failure when converting vectors to int/float with invalid expressions (PR #105727)

2024-08-26 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/105727 >From d8bed3f4db8056a6afa9bd7eae5d4a8361f83086 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Thu, 22 Aug 2024 23:25:31 +0300 Subject: [PATCH] [Clang] prevent assertion failure when converting vectors to i

[clang] [Clang] restrict use of attribute names reserved by the C++ standard (PR #106036)

2024-08-26 Thread Oleksandr T. via cfe-commits
@@ -177,6 +177,26 @@ static bool isLanguageDefinedBuiltin(const SourceManager &SourceMgr, return false; } +static bool isReservedAttrName(Preprocessor &PP, IdentifierInfo *II) { a-tarasyuk wrote: @cor3ntin The [Attr.td](https://github.com/llvm/llvm-proje

[clang] [Clang] restrict use of attribute names reserved by the C++ standard (PR #106036)

2024-08-26 Thread Oleksandr T. via cfe-commits
@@ -177,6 +177,26 @@ static bool isLanguageDefinedBuiltin(const SourceManager &SourceMgr, return false; } +static bool isReservedAttrName(Preprocessor &PP, IdentifierInfo *II) { + const LangOptions &Lang = PP.getLangOpts(); + const StringRef Name = II->getName(); + + if

[clang] [Clang] restrict use of attribute names reserved by the C++ standard (PR #106036)

2024-08-25 Thread Oleksandr T. via cfe-commits
@@ -177,6 +177,26 @@ static bool isLanguageDefinedBuiltin(const SourceManager &SourceMgr, return false; } +static bool isReservedAttrName(Preprocessor &PP, IdentifierInfo *II) { a-tarasyuk wrote: > Can we tablegen that somehow? @cor3ntin Oke, I'll check..

[clang] [Clang] restrict use of attribute names reserved by the C++ standard (PR #106036)

2024-08-25 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk edited https://github.com/llvm/llvm-project/pull/106036 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] restrict use of attribute names reserved by the C++ standard (PR #106036)

2024-08-25 Thread Oleksandr T. via cfe-commits
@@ -177,6 +177,26 @@ static bool isLanguageDefinedBuiltin(const SourceManager &SourceMgr, return false; } +static bool isReservedAttrName(Preprocessor &PP, IdentifierInfo *II) { a-tarasyuk wrote: >From my, attribute names aren't typical language keywords,

[clang] [Clang] restrict use of attribute names reserved by the C++ standard (PR #106036)

2024-08-25 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk created https://github.com/llvm/llvm-project/pull/106036 Fixes #92196 https://eel.is/c++draft/macro.names#2 > A translation unit shall not #define or #undef names lexically identical to > keywords, to the identifiers listed in Table > [4](https://eel.is/c++draft/

[clang] [Clang] prevent assertion failure when converting vectors to int/float with invalid expressions (PR #105727)

2024-08-22 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/105727 >From d8bed3f4db8056a6afa9bd7eae5d4a8361f83086 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Thu, 22 Aug 2024 23:25:31 +0300 Subject: [PATCH] [Clang] prevent assertion failure when converting vectors to i

[clang] [Clang] prevent assertion failure when converting vectors to int/float with invalid expressions (PR #105727)

2024-08-22 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk created https://github.com/llvm/llvm-project/pull/105727 Fixes #105486 >From d8bed3f4db8056a6afa9bd7eae5d4a8361f83086 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Thu, 22 Aug 2024 23:25:31 +0300 Subject: [PATCH] [Clang] prevent assertion failure when convertin

[clang] [Clang] warn on discarded [[nodiscard]] function results after casting in C (PR #104677)

2024-08-18 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk deleted https://github.com/llvm/llvm-project/pull/104677 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] warn on discarded [[nodiscard]] function results after casting in C (PR #104677)

2024-08-18 Thread Oleksandr T. via cfe-commits
@@ -54,3 +54,9 @@ void test_missiles(void) { launch_missiles(); } +[[nodiscard]] int f3(); + +void f4() { a-tarasyuk wrote: @cor3ntin could you merge it once the CI passes? Thanks https://github.com/llvm/llvm-project/pull/104677 ___

[clang] [Clang] warn on discarded [[nodiscard]] function results after casting in C (PR #104677)

2024-08-18 Thread Oleksandr T. via cfe-commits
@@ -54,3 +54,9 @@ void test_missiles(void) { launch_missiles(); } +[[nodiscard]] int f3(); + +void f4() { a-tarasyuk wrote: @cor3ntin I've updated the test. Thanks for the review. https://github.com/llvm/llvm-project/pull/104677 ___

[clang] [Clang] warn on discarded [[nodiscard]] function results after casting in C (PR #104677)

2024-08-18 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/104677 >From cd7ce740464c9c46ab231cf773fd1cf28e3495eb Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Sat, 17 Aug 2024 19:43:45 +0300 Subject: [PATCH 1/2] [Clang] warn on discarded [[nodiscard]] function results a

[clang] [Clang] warn on discarded [[nodiscard]] function results after casting in C (PR #104677)

2024-08-18 Thread Oleksandr T. via cfe-commits
a-tarasyuk wrote: @cor3ntin Do you mean casting to `void` or declaring a `void` function? https://github.com/llvm/llvm-project/pull/104677 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[clang] [Clang] warn on discarded [[nodiscard]] function results after casting in C (PR #104677)

2024-08-17 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk created https://github.com/llvm/llvm-project/pull/104677 Fixes #104391 >From cd7ce740464c9c46ab231cf773fd1cf28e3495eb Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Sat, 17 Aug 2024 19:43:45 +0300 Subject: [PATCH] [Clang] warn on discarded [[nodiscard]] function

[clang] [Clang] fix crash by avoiding invalidation of extern main declaration during strictness checks (PR #104594)

2024-08-16 Thread Oleksandr T. via cfe-commits
@@ -78,12 +80,12 @@ namespace ns { extern "C" struct A { int main(); }; // ok namespace c { - extern "C" void main(); // expected-warning {{'main' should not be 'extern "C"'}} + extern "C" int main(); // expected-warning {{'main' should not be 'extern "C"'}} } extern "

[clang] [Clang] fix crash by avoiding invalidation of extern main declaration during strictness checks (PR #104594)

2024-08-16 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/104594 >From 9ffe47795d3fa25d6ac020b5cebace0c2e758285 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Fri, 16 Aug 2024 17:21:38 +0300 Subject: [PATCH 1/4] [Clang] fix crash by avoiding invalidation of extern main

[clang] [Clang] fix crash by avoiding invalidation of extern main declaration during strictness checks (PR #104594)

2024-08-16 Thread Oleksandr T. via cfe-commits
@@ -78,12 +80,12 @@ namespace ns { extern "C" struct A { int main(); }; // ok namespace c { - extern "C" void main(); // expected-warning {{'main' should not be 'extern "C"'}} + extern "C" int main(); // expected-warning {{'main' should not be 'extern "C"'}} } extern "

[clang] [Clang] fix crash by avoiding invalidation of extern main declaration during strictness checks (PR #104594)

2024-08-16 Thread Oleksandr T. via cfe-commits
a-tarasyuk wrote: @alexfh Please merge the PR as I lack the access. Thanks https://github.com/llvm/llvm-project/pull/104594 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] fix crash by avoiding invalidation of extern main declaration during strictness checks (PR #104594)

2024-08-16 Thread Oleksandr T. via cfe-commits
@@ -122,6 +119,26 @@ namespace ns2 { extern "C++" void main() {} // ok } +#elif TEST14 +extern "C" { + int main(); // expected-warning {{'main' should not be 'extern "C"'}} +} + +extern "C" int main(); // expected-warning {{'main' should not be 'extern "C"'}} + +#elif TEST

[clang] [Clang] fix crash by avoiding invalidation of extern main declaration during strictness checks (PR #104594)

2024-08-16 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/104594 >From 9ffe47795d3fa25d6ac020b5cebace0c2e758285 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Fri, 16 Aug 2024 17:21:38 +0300 Subject: [PATCH 1/3] [Clang] fix crash by avoiding invalidation of extern main

[clang] [Clang] fix crash by avoiding invalidation of extern main declaration during strictness checks (PR #104594)

2024-08-16 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/104594 >From 9ffe47795d3fa25d6ac020b5cebace0c2e758285 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Fri, 16 Aug 2024 17:21:38 +0300 Subject: [PATCH 1/2] [Clang] fix crash by avoiding invalidation of extern main

[clang] [Clang] fix crash by avoiding invalidation of extern main declaration during strictness checks (PR #104594)

2024-08-16 Thread Oleksandr T. via cfe-commits
@@ -264,6 +264,7 @@ Bug Fixes to C++ Support - Properly reject defaulted copy/move assignment operators that have a non-reference explicit object parameter. - Clang now properly handles the order of attributes in `extern` blocks. (#GH101990). - Fixed an assertion failure by p

[clang] [Clang] fix crash by avoiding invalidation of extern main declaration during strictness checks (PR #104594)

2024-08-16 Thread Oleksandr T. via cfe-commits
@@ -12233,7 +12233,6 @@ void Sema::CheckMain(FunctionDecl *FD, const DeclSpec &DS) { FD->getDeclContext()->getRedeclContext()->isTranslationUnit())) { Diag(FD->getLocation(), diag::ext_main_invalid_linkage_specification) << FD->getLanguageLinkage(); -FD-

[clang] [Clang] fix crash by avoiding invalidation of extern main declaration during strictness checks (PR #104594)

2024-08-16 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/104594 >From 9ffe47795d3fa25d6ac020b5cebace0c2e758285 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Fri, 16 Aug 2024 17:21:38 +0300 Subject: [PATCH 1/2] [Clang] fix crash by avoiding invalidation of extern main

[clang] [Clang] fix crash by avoiding invalidation of extern main declaration during strictness checks (PR #104594)

2024-08-16 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/104594 >From 9ffe47795d3fa25d6ac020b5cebace0c2e758285 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Fri, 16 Aug 2024 17:21:38 +0300 Subject: [PATCH] [Clang] fix crash by avoiding invalidation of extern main decl

[clang] [Clang] fix crash by avoiding invalidation of extern main declaration during strictness checks (PR #104594)

2024-08-16 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk created https://github.com/llvm/llvm-project/pull/104594 Fixes #104570 >From e1821933a1670353c396ada17b82d5bb41599c14 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Fri, 16 Aug 2024 17:21:38 +0300 Subject: [PATCH] [Clang] fix crash by avoiding invalidation of ex

[clang] [Clang] strengthen checks for 'main' function to meet [basic.start.main] p3 requirements (PR #101853)

2024-08-16 Thread Oleksandr T. via cfe-commits
@@ -12210,7 +12220,18 @@ bool Sema::CheckFunctionDeclaration(Scope *S, FunctionDecl *NewFD, return Redeclaration; } -void Sema::CheckMain(FunctionDecl* FD, const DeclSpec& DS) { +void Sema::CheckMain(FunctionDecl *FD, const DeclSpec &DS) { + // [basic.start.main]p3 + //

[clang] [Clang] prevent null explicit object argument from being deduced (PR #104328)

2024-08-15 Thread Oleksandr T. via cfe-commits
@@ -4462,6 +4462,9 @@ TemplateDeductionResult Sema::DeduceTemplateArguments( ParamTypesForArgChecking.push_back(ParamType); if (ParamIdx == 0 && HasExplicitObject) { +if (ObjectType.isNull()) + return TemplateDeductionResult::InvalidExplicitArgumen

[clang] [Clang] prevent null explicit object argument from being deduced (PR #104328)

2024-08-15 Thread Oleksandr T. via cfe-commits
a-tarasyuk wrote: @cor3ntin Thanks for the review. I've resolved conflicts. Could you merge it after the CI passes? Thanks https://github.com/llvm/llvm-project/pull/104328 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[clang] [Clang] prevent null explicit object argument from being deduced (PR #104328)

2024-08-15 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/104328 >From 432686be091dae7ff532028fd5c41f73862e0bd5 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Thu, 15 Aug 2024 01:43:15 +0300 Subject: [PATCH 1/2] [Clang] prevent null explicit object argument from being d

[clang] [Clang] handle both gnu and cpp11 attributes to ensure correct parsing inside extern block (PR #102864)

2024-08-15 Thread Oleksandr T. via cfe-commits
a-tarasyuk wrote: @AaronBallman Thanks for the review. I've resolved the conflicts. Could you merge it after the CI passes? Thanks https://github.com/llvm/llvm-project/pull/102864 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.l

  1   2   3   4   >