[clang] [C23] Handle type compatibility of unnamed records (PR #141783)

2025-05-28 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon approved this pull request. https://github.com/llvm/llvm-project/pull/141783 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C23] Handle type compatibility of unnamed records (PR #141783)

2025-05-28 Thread Mariya Podchishchaeva via cfe-commits
@@ -359,3 +359,29 @@ struct alignment { // c17-error {{redefinition of 'alignment'}} \ c23-error {{type 'struct alignment' has a member with an attribute which currently causes the types to be treated as though they are incompatible}} int x; }; + +//

[clang] Add sycl_external attribute (PR #140282)

2025-05-27 Thread Mariya Podchishchaeva via cfe-commits
@@ -12909,6 +12909,10 @@ bool ASTContext::DeclMustBeEmitted(const Decl *D) { if (D->hasAttr()) return false; + if (LangOpts.SYCLIsDevice && + (!D->hasAttr() || !D->hasAttr())) Fznamznon wrote: Shouldn't that be ```suggestion if (LangOpts.SYCLI

[clang] [win][clang] Align scalar deleting destructors with MSABI (PR #139566)

2025-05-27 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: Ping. https://github.com/llvm/llvm-project/pull/139566 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Cleanup and optimize DiagnoseAssignmentEnum (PR #141471)

2025-05-27 Thread Mariya Podchishchaeva via cfe-commits
Timm =?utf-8?q?B=C3=A4der?= Message-ID: In-Reply-To: https://github.com/Fznamznon approved this pull request. That looks great imo https://github.com/llvm/llvm-project/pull/141471 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists

[clang] Sycl builtin kernel name (PR #140230)

2025-05-16 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon created https://github.com/llvm/llvm-project/pull/140230 None >From eeea84b4989b4497cc804f403258b986c09cf5ab Mon Sep 17 00:00:00 2001 From: Elizabeth Andrews Date: Thu, 8 Aug 2024 18:05:48 -0700 Subject: [PATCH 1/5] [SYCL] Add support for __builtin_sycl_kernel_name

[clang] Sycl builtin kernel name (PR #140230)

2025-05-16 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon closed https://github.com/llvm/llvm-project/pull/140230 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix parsing of expressions of the form (T())[/*...*/] (PR #140053)

2025-05-16 Thread Mariya Podchishchaeva via cfe-commits
@@ -692,6 +692,86 @@ ExprResult Parser::ParseLambdaExpression() { return ParseLambdaExpressionAfterIntroducer(Intro); } +bool Parser::IsLambdaAfterTypeCast() { + assert(getLangOpts().CPlusPlus && Tok.is(tok::l_square) && + "Not at the start of a possible lambda expr

[clang] [Clang] Fix Sema::checkArgCount for 0-arg functions (PR #139638)

2025-05-13 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon approved this pull request. A couple of nits, otherwise LGTM https://github.com/llvm/llvm-project/pull/139638 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[clang] [Clang] Fix Sema::checkArgCount for 0-arg functions (PR #139638)

2025-05-13 Thread Mariya Podchishchaeva via cfe-commits
@@ -52,7 +52,7 @@ static bool CheckWasmBuiltinArgIsInteger(Sema &S, CallExpr *E, } bool SemaWasm::BuiltinWasmRefNullExtern(CallExpr *TheCall) { - if (TheCall->getNumArgs() != 0) + if (SemaRef.checkArgCount(TheCall, 0)) Fznamznon wrote: ```suggestion if (S

[clang] [Clang] Fix Sema::checkArgCount for 0-arg functions (PR #139638)

2025-05-13 Thread Mariya Podchishchaeva via cfe-commits
@@ -168,7 +168,7 @@ bool Sema::checkArgCount(CallExpr *Call, unsigned DesiredArgCount) { Fznamznon wrote: Maybe also assert that `ArgCount > 0`? In case `checkArgCountAtLeast` becomes broken. https://github.com/llvm/llvm-project/pull/139638 _

[clang] [Clang] Fix Sema::checkArgCount for 0-arg functions (PR #139638)

2025-05-13 Thread Mariya Podchishchaeva via cfe-commits
@@ -62,12 +62,8 @@ bool SemaWasm::BuiltinWasmRefNullExtern(CallExpr *TheCall) { bool SemaWasm::BuiltinWasmRefNullFunc(CallExpr *TheCall) { ASTContext &Context = getASTContext(); - if (TheCall->getNumArgs() != 0) { -Diag(TheCall->getBeginLoc(), diag::err_typecheck_call_t

[clang] [Clang] Fix Sema::checkArgCount for 0-arg functions (PR #139638)

2025-05-13 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon edited https://github.com/llvm/llvm-project/pull/139638 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [win][clang] Align scalar deleting destructors with MSABI (PR #139566)

2025-05-12 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon edited https://github.com/llvm/llvm-project/pull/139566 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [win][clang] Align scalar deleting destructors with MSABI (PR #139566)

2025-05-12 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon edited https://github.com/llvm/llvm-project/pull/139566 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [win][clang] Align scalar deleting destructors with MSABI (PR #139566)

2025-05-12 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon created https://github.com/llvm/llvm-project/pull/139566 While working on vector deleting destructors support (GH19772), I noticed that MSVC produces different code in scalar deleting destructor body depending on whether class defined its own operator delete. In MS

[clang] [clang] Compound Literal Statement Constant Expression Assertion Fix (PR #139479)

2025-05-12 Thread Mariya Podchishchaeva via cfe-commits
@@ -7220,6 +7220,17 @@ Sema::BuildCompoundLiteralExpr(SourceLocation LParenLoc, TypeSourceInfo *TInfo, if (auto ILE = dyn_cast(LiteralExpr)) for (unsigned i = 0, j = ILE->getNumInits(); i != j; i++) { Expr *Init = ILE->getInit(i); +// C99 6.5.2.5 +

[clang] [clang] Compound Literal Statement Constant Expression Assertion Fix (PR #139479)

2025-05-12 Thread Mariya Podchishchaeva via cfe-commits
@@ -7220,6 +7220,17 @@ Sema::BuildCompoundLiteralExpr(SourceLocation LParenLoc, TypeSourceInfo *TInfo, if (auto ILE = dyn_cast(LiteralExpr)) for (unsigned i = 0, j = ILE->getNumInits(); i != j; i++) { Expr *Init = ILE->getInit(i); +// C99 6.5.2.5 +

[clang] [OpenMP] Fix crash when diagnosing dist_schedule (PR #139277)

2025-05-09 Thread Mariya Podchishchaeva via cfe-commits
@@ -105,3 +105,11 @@ int main(int argc, char **argv) { return (tmain(argc) + tmain(argv[0][0])); // expected-note {{in instantiation of function template specialization 'tmain' requested here}} expected-note {{in instantiation of function template specialization 'tmain' re

[clang] [OpenMP] Fix crash when diagnosing dist_schedule (PR #139277)

2025-05-09 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon edited https://github.com/llvm/llvm-project/pull/139277 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Warn about deprecated volatile-qualified return types (PR #137899)

2025-05-05 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon approved this pull request. That looks good to me unless @shafik has any additional concerns. https://github.com/llvm/llvm-project/pull/137899 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[clang] [clang] Warn about deprecated volatile-qualified return types (PR #137899)

2025-05-05 Thread Mariya Podchishchaeva via cfe-commits
@@ -231,6 +231,13 @@ namespace DeprecatedVolatile { a = c = a; b += a; } + + volatile struct amber jurassic(); Fznamznon wrote: Yeah, these are what I meant. Thanks! https://github.com/llvm/llvm-project/pull/137899 _

[clang] [clang] Warn about deprecated volatile-qualified return types (PR #137899)

2025-05-05 Thread Mariya Podchishchaeva via cfe-commits
@@ -5056,13 +5056,13 @@ static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state, S.Diag(DeclType.Loc, diag::err_func_returning_qualified_void) << T; } else diagnoseRedundantReturnTypeQualifiers(S, T, D, chunkIndex); - -//

[clang] [C23] Disable diagnostic on struct defn in prototype (PR #138516)

2025-05-05 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon approved this pull request. https://github.com/llvm/llvm-project/pull/138516 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C] Modify -Wdefault-const-init (PR #137961)

2025-04-30 Thread Mariya Podchishchaeva via cfe-commits
@@ -1,28 +1,23 @@ -// RUN: %clang_cc1 -fsyntax-only -verify=c,unsafe -Wdefault-const-init %s -// RUN: %clang_cc1 -fsyntax-only -verify=c,unsafe -Wc++-compat %s -// RUN: %clang_cc1 -fsyntax-only -verify=unsafe %s -// RUN: %clang_cc1 -fsyntax-only -verify=c -Wdefault-const-init -Wn

[clang] [clang] Warn about deprecated volatile-qualified return types (PR #137899)

2025-04-30 Thread Mariya Podchishchaeva via cfe-commits
@@ -5056,13 +5056,13 @@ static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state, S.Diag(DeclType.Loc, diag::err_func_returning_qualified_void) << T; } else diagnoseRedundantReturnTypeQualifiers(S, T, D, chunkIndex); - -//

[clang] [clang] Warn about deprecated volatile-qualified return types (PR #137899)

2025-04-30 Thread Mariya Podchishchaeva via cfe-commits
@@ -231,6 +231,13 @@ namespace DeprecatedVolatile { a = c = a; b += a; } + + volatile struct amber jurassic(); Fznamznon wrote: As I can see, if the return type is not a struct/class, the warning is issued. Could you please add a test case with vol

[clang] [clang] Warn about deprecated volatile-qualified return types (PR #137899)

2025-04-30 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon edited https://github.com/llvm/llvm-project/pull/137899 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Warn about deprecated volatile-qualified return types (PR #137899)

2025-04-30 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon commented: Thank you for the fix, could you please also add a release note? https://github.com/llvm/llvm-project/pull/137899 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/lis

[clang] [clang][NFC] Avoid a duplicate variable in SemaExprCXX.cpp (PR #137464)

2025-04-30 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon closed https://github.com/llvm/llvm-project/pull/137464 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Avoid a duplicate variable in SemaExprCXX.cpp (PR #137464)

2025-04-26 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon created https://github.com/llvm/llvm-project/pull/137464 None >From e6d3f185e8e5dffa65856391e4d709c167f96805 Mon Sep 17 00:00:00 2001 From: Mariya Podchishchaeva Date: Sat, 26 Apr 2025 18:28:44 +0200 Subject: [PATCH] [clang][NFC] Avoid a duplicate variable in SemaE

[clang] [clang] Implement StmtPrinter for EmbedExpr (PR #135957)

2025-04-18 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon closed https://github.com/llvm/llvm-project/pull/135957 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement StmtPrinter for EmbedExpr (PR #135957)

2025-04-17 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon updated https://github.com/llvm/llvm-project/pull/135957 >From b194133f44768a61a7af6486dc40deae2de73f9a Mon Sep 17 00:00:00 2001 From: "Podchishchaeva, Mariya" Date: Wed, 16 Apr 2025 05:59:24 -0700 Subject: [PATCH 1/6] [clang] Implement StmtPrinter for EmbedExpr Tr

[clang] [clang] Handle instantiated members to determine visibility (PR #136128)

2025-04-17 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: > Libcxx tests failed. I'll check them tomorrow. IMO they fail now in all PRs https://github.com/llvm/llvm-project/pull/136128 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

[clang] [clang] Implement StmtPrinter for EmbedExpr (PR #135957)

2025-04-17 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon edited https://github.com/llvm/llvm-project/pull/135957 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement StmtPrinter for EmbedExpr (PR #135957)

2025-04-17 Thread Mariya Podchishchaeva via cfe-commits
@@ -435,6 +435,7 @@ ExprResult Parser::createEmbedExpr() { ExprResult Res; ASTContext &Context = Actions.getASTContext(); SourceLocation StartLoc = ConsumeAnnotationToken(); + Fznamznon wrote: ```suggestion ``` https://github.com/llvm/llvm-project/pull/

[clang] [clang] Implement StmtPrinter for EmbedExpr (PR #135957)

2025-04-17 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon updated https://github.com/llvm/llvm-project/pull/135957 >From b194133f44768a61a7af6486dc40deae2de73f9a Mon Sep 17 00:00:00 2001 From: "Podchishchaeva, Mariya" Date: Wed, 16 Apr 2025 05:59:24 -0700 Subject: [PATCH 1/6] [clang] Implement StmtPrinter for EmbedExpr Tr

[clang] [clang] Implement StmtPrinter for EmbedExpr (PR #135957)

2025-04-16 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon updated https://github.com/llvm/llvm-project/pull/135957 >From b194133f44768a61a7af6486dc40deae2de73f9a Mon Sep 17 00:00:00 2001 From: "Podchishchaeva, Mariya" Date: Wed, 16 Apr 2025 05:59:24 -0700 Subject: [PATCH 1/2] [clang] Implement StmtPrinter for EmbedExpr Tr

[clang] [clang] Implement StmtPrinter for EmbedExpr (PR #135957)

2025-04-16 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon edited https://github.com/llvm/llvm-project/pull/135957 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement StmtPrinter for EmbedExpr (PR #135957)

2025-04-16 Thread Mariya Podchishchaeva via cfe-commits
@@ -4049,5 +4050,13 @@ void Preprocessor::HandleEmbedDirective(SourceLocation HashLoc, Token &EmbedTok, if (Callbacks) Callbacks->EmbedDirective(HashLoc, Filename, isAngled, MaybeFileRef, *Params); - HandleEmbedDirectiveImpl(HashLoc, *Param

[clang] [clang] Implement StmtPrinter for EmbedExpr (PR #135957)

2025-04-16 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: This might also fix https://github.com/llvm/llvm-project/issues/107869 since a similar fix was proposed earlier to fix it. I don't have any experience with clangd to verify though. https://github.com/llvm/llvm-project/pull/135957 __

[clang] [clang] Implement StmtPrinter for EmbedExpr (PR #135957)

2025-04-16 Thread Mariya Podchishchaeva via cfe-commits
@@ -136,3 +136,43 @@ constexpr struct HasChar c = { c-error {{constexpr initializer evaluates to 255 which is not exactly representable in type 'signed char'}} }; + +#if __cplusplus +namespace std { +typedef decltype(sizeof(int)) size_t; + +tem

[clang] [clang] Implement StmtPrinter for EmbedExpr (PR #135957)

2025-04-16 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon created https://github.com/llvm/llvm-project/pull/135957 Tries to avoid memory leaks caused by saving filename earlier by allocating memory in the preprocessor. Fixes https://github.com/llvm/llvm-project/issues/132641 >From b194133f44768a61a7af6486dc40deae2de73f9a

[clang] [Clang] [Sema] Fix a crash when a `friend` function is redefined as deleted (PR #135679)

2025-04-15 Thread Mariya Podchishchaeva via cfe-commits
@@ -271,3 +271,33 @@ void operators() { if (to_int_int) {} // expected-error {{attempt to use a deleted function: deleted (TO, operator bool)}} static_cast(to_int_int); // expected-error {{static_cast from 'TO' to 'bool' uses deleted function: deleted (TO, operator bool)}}

[clang] [MS][clang] Revert vector deleting destructors support (PR #135611)

2025-04-15 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: @zmodem , @DKLoehr , please feel free to hit the submit button once the pre-commit is green. The revert was not clean, so I would prefer to wait for it. I'm feeling ill and may end up offline after some time. https://github.com/llvm/llvm-project/pull/135611 ___

[clang] [Clang] [Sema] Fix a crash when a `friend` function is redefined as deleted (PR #135679)

2025-04-15 Thread Mariya Podchishchaeva via cfe-commits
@@ -271,3 +271,33 @@ void operators() { if (to_int_int) {} // expected-error {{attempt to use a deleted function: deleted (TO, operator bool)}} static_cast(to_int_int); // expected-error {{static_cast from 'TO' to 'bool' uses deleted function: deleted (TO, operator bool)}}

[clang] [Clang] [Sema] Fix a crash when a `friend` function is redefined as deleted (PR #135679)

2025-04-15 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon approved this pull request. https://github.com/llvm/llvm-project/pull/135679 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [MS][clang] Revert vector deleting destructors support (PR #135611)

2025-04-14 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: The clang format concerns were in main branch before I came in, so I think they can be ignored. https://github.com/llvm/llvm-project/pull/135611 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/ma

[clang] [MS][clang] Revert vector deleting destructors support (PR #135611)

2025-04-14 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon created https://github.com/llvm/llvm-project/pull/135611 Finding operator delete[] is still problematic, without it the extension is a security hazard, so reverting until the problem with operator delete[] is figured out. >From 460d4807104c925232def63b516853f9ee22

[clang] [MS][clang] Make sure vector deleting dtor calls correct operator delete (PR #133950)

2025-04-14 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: I'm working on a revert of the extension. https://github.com/llvm/llvm-project/pull/133950 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Reject character devices in #embed for now (PR #135370)

2025-04-11 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: Oh no, I didn't pick up the test https://github.com/llvm/llvm-project/pull/135370 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Reject character devices in #embed for now (PR #135370)

2025-04-11 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: I'm not sure what to say in the release note. Sorry folks, we never really supported these but now we reject to be safe? https://github.com/llvm/llvm-project/pull/135370 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://

[clang] [MS][clang] Make sure vector deleting dtor calls correct operator delete (PR #133950)

2025-04-11 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: Yeah, but this is kind of expected. Otherwise it is unclear how to emit vector deleting destructor body. Should we fallback to calling something, like MSVC does? See https://github.com/llvm/llvm-project/pull/135041#issuecomment-2790227622 for example. https://github.com/llvm

[clang] [clang] Reject character devices in #embed for now (PR #135370)

2025-04-11 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon updated https://github.com/llvm/llvm-project/pull/135370 >From 49e347a73709661fcf3a4805f38cfa2d78e3a196 Mon Sep 17 00:00:00 2001 From: "Podchishchaeva, Mariya" Date: Fri, 11 Apr 2025 06:46:00 -0700 Subject: [PATCH 1/4] [clang] Reject character devices in #embed for

[clang] [clang] Reject character devices in #embed for now (PR #135370)

2025-04-11 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon updated https://github.com/llvm/llvm-project/pull/135370 >From 49e347a73709661fcf3a4805f38cfa2d78e3a196 Mon Sep 17 00:00:00 2001 From: "Podchishchaeva, Mariya" Date: Fri, 11 Apr 2025 06:46:00 -0700 Subject: [PATCH 1/3] [clang] Reject character devices in #embed for

[clang] [clang] Reject character devices in #embed for now (PR #135370)

2025-04-11 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: > on Windows we could use something like COM1 on Windows. How would that look like? https://github.com/llvm/llvm-project/pull/135370 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[clang] [C23] Fix failed assertions with invalid #embed parameters (PR #135368)

2025-04-11 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon approved this pull request. Thanks! https://github.com/llvm/llvm-project/pull/135368 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Reject character devices in #embed for now (PR #135370)

2025-04-11 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon created https://github.com/llvm/llvm-project/pull/135370 See https://github.com/llvm/llvm-project/issues/126629 . Right not they are not supported properly and support requires modifying several layers of LLVM. For now simply reject them while proper support is bei

[clang] [SYCL] Basic code generation for SYCL kernel caller offload entry point functions. (PR #133030)

2025-04-10 Thread Mariya Podchishchaeva via cfe-commits
@@ -0,0 +1,186 @@ +// RUN: %clang_cc1 -fsycl-is-host -emit-llvm -triple x86_64-unknown-linux-gnu %s -o - | FileCheck --check-prefixes=CHECK-HOST,CHECK-HOST-LINUX %s +// RUN: %clang_cc1 -fsycl-is-device -emit-llvm -aux-triple x86_64-unknown-linux-gnu -triple amdgcn-amd-amdhsa %s

[clang] [MS][clang] Make sure vector deleting dtor calls correct operator delete (PR #133950)

2025-04-10 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: Looking... Does not reproduce without c++20. https://github.com/llvm/llvm-project/pull/133950 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [MS][clang] Error about ambiguous operator delete[] only when required (PR #135041)

2025-04-10 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon updated https://github.com/llvm/llvm-project/pull/135041 >From 9e923b1fe683dea499f7557a48d97aa6d2469c07 Mon Sep 17 00:00:00 2001 From: "Podchishchaeva, Mariya" Date: Wed, 9 Apr 2025 09:02:17 -0700 Subject: [PATCH 1/4] [MS][clang] Error about ambigous operator delete

[clang] [MS][clang] Error about ambiguous operator delete[] only when required (PR #135041)

2025-04-10 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: I'm concerned though, that MSVC calls SOME destructor and doesn't error out which seems like a bug. See https://godbolt.org/z/q8znTG5aa . https://github.com/llvm/llvm-project/pull/135041 ___ cfe-commits mailing list cfe-commits@lists.

[clang] [MS][clang] Error about ambiguous operator delete[] only when required (PR #135041)

2025-04-10 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon edited https://github.com/llvm/llvm-project/pull/135041 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [SYCL] Basic code generation for SYCL kernel caller offload entry point functions. (PR #133030)

2025-04-10 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon approved this pull request. I don't think I have anything to add to the existing feedback. https://github.com/llvm/llvm-project/pull/133030 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[clang] [MS][clang] Error about ambiguous operator delete[] only when required (PR #135041)

2025-04-10 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon closed https://github.com/llvm/llvm-project/pull/135041 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [MS][clang] Error about ambiguous operator delete[] only when required (PR #135041)

2025-04-10 Thread Mariya Podchishchaeva via cfe-commits
@@ -13,10 +15,41 @@ struct Bar { struct Baz { virtual ~Baz() {} - static void operator delete[](void* ptr) = delete; // expected-note {{explicitly marked deleted here}} + static void operator delete[](void* ptr) = delete; // expected-note {{explicitly marked deleted here

[clang] [MS][clang] Error about ambiguous operator delete[] only when required (PR #135041)

2025-04-10 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon updated https://github.com/llvm/llvm-project/pull/135041 >From 9e923b1fe683dea499f7557a48d97aa6d2469c07 Mon Sep 17 00:00:00 2001 From: "Podchishchaeva, Mariya" Date: Wed, 9 Apr 2025 09:02:17 -0700 Subject: [PATCH 1/5] [MS][clang] Error about ambigous operator delete

[clang] [MS][clang] Error about ambiguous operator delete[] only when required (PR #135041)

2025-04-10 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: Alternatively we can silently fallback to calling scalar operator delete whose presence is enforced by diagnoistics (i.e call SOMETHING in the vector deleting destructor like MSVC does) so we don't crash while emitting the destructor and rely on new[]/delete[] diagnostics. ht

[clang] [MS][clang] Error about ambiguous operator delete[] only when required (PR #135041)

2025-04-10 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon updated https://github.com/llvm/llvm-project/pull/135041 >From 9e923b1fe683dea499f7557a48d97aa6d2469c07 Mon Sep 17 00:00:00 2001 From: "Podchishchaeva, Mariya" Date: Wed, 9 Apr 2025 09:02:17 -0700 Subject: [PATCH 1/2] [MS][clang] Error about ambigous operator delete

[clang] [MS][clang] Make sure vector deleting dtor calls correct operator delete (PR #133950)

2025-04-09 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: I posted a PR with a potential fix. https://github.com/llvm/llvm-project/pull/133950 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [MS][clang] Error about ambiguous operator delete[] only when required (PR #135041)

2025-04-09 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon created https://github.com/llvm/llvm-project/pull/135041 And issue was reported in https://github.com/llvm/llvm-project/pull/133950 . Since we don't always emit vector deleting dtors, only error out about ambiguous operator delete[] when it will be required for vec

[clang] [MS][clang] Make sure vector deleting dtor calls correct operator delete (PR #133950)

2025-04-08 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: @DKLoehr , does clang that is being used also have https://github.com/llvm/llvm-project/pull/134357 in? https://github.com/llvm/llvm-project/pull/133950 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[clang] [SYCL] Basic code generation for SYCL kernel caller offload entry point functions. (PR #133030)

2025-04-07 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon edited https://github.com/llvm/llvm-project/pull/133030 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] emit -Wunused-variable warning for unused structured bindings without the [[maybe_unused]] attribute (PR #127061)

2025-04-05 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon approved this pull request. https://github.com/llvm/llvm-project/pull/127061 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reland [MS][clang] Add support for vector deleting destructors (PR #133451)

2025-04-05 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon closed https://github.com/llvm/llvm-project/pull/133451 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Correctly diagnose incomplete arrays with static storage in C (PR #134374)

2025-04-05 Thread Mariya Podchishchaeva via cfe-commits
@@ -319,6 +319,9 @@ Improvements to Clang's diagnostics - ``-Wc++98-compat`` no longer diagnoses use of ``__auto_type`` or ``decltype(auto)`` as though it was the extension for ``auto``. (#GH47900) +- Now correctly diagnose use of a tentative definition of an array with stat

[clang] [clang] Introduce "binary" StringLiteral for #embed data (PR #127629)

2025-04-05 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: Ooops, I'll fix the bots quickly https://github.com/llvm/llvm-project/pull/127629 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [MS][clang] Fix crash on deletion of array of pointers (PR #134088)

2025-04-05 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon created https://github.com/llvm/llvm-project/pull/134088 Sometimes a non-array delete is treated as delete[] when input pointer is pointer to array. With vector deleting destructors support we now generate a virtual destructor call instead of simple loop over the e

[clang] Reland [MS][clang] Add support for vector deleting destructors (PR #133451)

2025-04-04 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: The original patch has been reviewed before, so I'll proceed with the merge. Feel free to do any post commit comments that I'll be happy to apply. https://github.com/llvm/llvm-project/pull/133451 ___ cfe-commits mailing list cfe-commi

[clang] [clang] Handle Binary StingLiteral kind in one more place (PR #132201)

2025-04-04 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon created https://github.com/llvm/llvm-project/pull/132201 The bots are upset by https://github.com/llvm/llvm-project/pull/127629 . Fix that. >From 9e2314fc9f0514abc230e97c06f6866b91fd4871 Mon Sep 17 00:00:00 2001 From: "Podchishchaeva, Mariya" Date: Thu, 20 Mar 202

[clang] [clang] Do not diagnose unused deleted operator delete[] (PR #134357)

2025-04-04 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon created https://github.com/llvm/llvm-project/pull/134357 For vector deleting dtors support we now also search and save operator delete[]. Avoid diagnosing deleted operator delete[] when doing that because vector deleting dtors are only called when delete[] is prese

[clang] Correctly diagnose incomplete arrays with static storage in C (PR #134374)

2025-04-04 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon approved this pull request. I'm not super familiar with the affected area, but it looks good to me https://github.com/llvm/llvm-project/pull/134374 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[clang] Correctly diagnose incomplete arrays with static storage in C (PR #134374)

2025-04-04 Thread Mariya Podchishchaeva via cfe-commits
@@ -3,16 +3,15 @@ -struct foo; // c-note 5 {{forward declaration of 'struct foo'}} \ +struct foo; // c-note 4 {{forward declaration of 'struct foo'}} \ cxx-note 3 {{forward declaration of 'foo'}} void b; // expected-error {{variable has incomplete type 'v

[clang] [clang] Do not diagnose unused deleted operator delete[] (PR #134357)

2025-04-04 Thread Mariya Podchishchaeva via cfe-commits
@@ -2878,7 +2878,7 @@ class CXXDestructorDecl : public CXXMethodDecl { static CXXDestructorDecl *CreateDeserialized(ASTContext &C, GlobalDeclID ID); void setOperatorDelete(FunctionDecl *OD, Expr *ThisArg); - void setOperatorArrayDelete(FunctionDecl *OD, Expr *ThisArg); +

[clang] [clang] Do not diagnose unused deleted operator delete[] (PR #134357)

2025-04-04 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon closed https://github.com/llvm/llvm-project/pull/134357 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Do not diagnose unused deleted operator delete[] (PR #134357)

2025-04-04 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: > LGTM but do we need a release note? No, it is a regression caused by a patch committed a couple of days ago. https://github.com/llvm/llvm-project/pull/134357 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

[clang] [clang] Do not diagnose unused deleted operator delete[] (PR #134357)

2025-04-04 Thread Mariya Podchishchaeva via cfe-commits
@@ -2878,7 +2878,7 @@ class CXXDestructorDecl : public CXXMethodDecl { static CXXDestructorDecl *CreateDeserialized(ASTContext &C, GlobalDeclID ID); void setOperatorDelete(FunctionDecl *OD, Expr *ThisArg); - void setOperatorArrayDelete(FunctionDecl *OD, Expr *ThisArg); +

[clang] [MS][clang] Fix crash on deletion of array of pointers (PR #134088)

2025-04-04 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon closed https://github.com/llvm/llvm-project/pull/134088 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [MS][clang] Fix crash on deletion of array of pointers (PR #134088)

2025-04-03 Thread Mariya Podchishchaeva via cfe-commits
@@ -2033,6 +2033,9 @@ llvm::Value *MicrosoftCXXABI::EmitVirtualDestructorCall( ThisTy = D->getDestroyedType(); } + while (const ArrayType *ATy = ThisTy->getAsArrayTypeUnsafe()) Fznamznon wrote: Thanks for the catch! Yeah, I knew it drops qualifiers. I

[clang] [MS][clang] Fix crash on deletion of array of pointers (PR #134088)

2025-04-03 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon updated https://github.com/llvm/llvm-project/pull/134088 >From 0d2b22f9af7868ec7b1f8b908fd61b791ea8434b Mon Sep 17 00:00:00 2001 From: "Podchishchaeva, Mariya" Date: Wed, 2 Apr 2025 06:35:12 -0700 Subject: [PATCH 1/2] [MS][clang] Fix crash on deletion of array of po

[clang] [MS][clang] Make sure vector deleting dtor calls correct operator delete (PR #133950)

2025-04-02 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon closed https://github.com/llvm/llvm-project/pull/133950 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reland [MS][clang] Add support for vector deleting destructors (PR #133451)

2025-03-28 Thread Mariya Podchishchaeva via cfe-commits
@@ -7976,6 +7976,8 @@ void CodeGenModule::requireVectorDestructorDefinition(const CXXRecordDecl *RD) { auto *NewFn = llvm::Function::Create( cast(VDEntry->getValueType()), llvm::Function::ExternalLinkage, VDName, &getModule()); +SetFunctionAttributes(Ve

[clang] Reland [MS][clang] Add support for vector deleting destructors (PR #133451)

2025-03-28 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon updated https://github.com/llvm/llvm-project/pull/133451 >From fdab7da3d6dd98bcc7961625f01bea0a6eb07388 Mon Sep 17 00:00:00 2001 From: "Podchishchaeva, Mariya" Date: Fri, 28 Mar 2025 06:28:32 -0700 Subject: [PATCH 1/3] Revert "Revert "[MS][clang] Add support for vec

[clang] Reland [MS][clang] Add support for vector deleting destructors (PR #133451)

2025-03-28 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon created https://github.com/llvm/llvm-project/pull/133451 Whereas it is UB in terms of the standard to delete an array of objects via pointer whose static type doesn't match its dynamic type, MSVC supports an extension allowing to do it. Aside from array deletion not

[clang] [MS][clang] Add support for vector deleting destructors (PR #126240)

2025-03-28 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: Soo, I restored all the attributes on vector deleting destructor and the calling convention (so they are the same as in non-failing case) and the crash is gone. I'll put a PR reapplying the patch soon. The reduction helped a lot, thanks! https://github.com/llvm/llvm-project/p

[clang] [MS][clang] Add support for vector deleting destructors (PR #126240)

2025-03-27 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: Removing `static ` from `newUnicodeStringArray` also makes the crash go away... https://github.com/llvm/llvm-project/pull/126240 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cf

[clang] [MS][clang] Add support for vector deleting destructors (PR #126240)

2025-03-27 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: Thank you for your help @rnk @zmodem ! https://github.com/llvm/llvm-project/pull/126240 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [MS][clang] Add support for vector deleting destructors (PR #126240)

2025-03-26 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: I reduced main code to ``` #include "unicode/filteredbrk.h" #include using namespace icu; int main(int argc, const char** argv) { UErrorCode status = U_ZERO_ERROR; //BreakIterator* bi = BreakIterator::createWordInstance(root, status); // Any iterator will do, make sure fi

[clang] [SYCL] Basic code generation for SYCL kernel caller offload entry point functions. (PR #133030)

2025-03-26 Thread Mariya Podchishchaeva via cfe-commits
@@ -3303,6 +3303,27 @@ void CodeGenModule::EmitDeferred() { CurDeclsToEmit.swap(DeferredDeclsToEmit); for (GlobalDecl &D : CurDeclsToEmit) { +// Functions declared with the sycl_kernel_entry_point attribute are +// emitted normally during host compilation. During d

[clang] [SYCL] Basic code generation for SYCL kernel caller offload entry point functions. (PR #133030)

2025-03-26 Thread Mariya Podchishchaeva via cfe-commits
@@ -229,6 +229,12 @@ class CodeGenTypes { const CGFunctionInfo &arrangeBuiltinFunctionCall(QualType resultType, const CallArgList &args); + /// A SYCL device kernel function is a free standing function with + /// spir_kern

  1   2   3   4   5   6   7   8   9   >