[clang] [clang][Sema] Fix false positive -Wshadow with structured binding captures (PR #157667)

2025-09-18 Thread Mariya Podchishchaeva via cfe-commits
@@ -8479,8 +8479,11 @@ void Sema::CheckShadow(NamedDecl *D, NamedDecl *ShadowedDecl, if (isa(D) && NewDC && isa(NewDC)) { if (const auto *RD = dyn_cast(NewDC->getParent())) { if (RD->isLambda() && OldDC->Encloses(NewDC->getLexicalParent())) { -if (const aut

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

2025-09-17 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon closed 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] Fix crash in 'malloc' referring to function without a argument (PR #159371)

2025-09-17 Thread Mariya Podchishchaeva via cfe-commits
@@ -29,3 +29,9 @@ __attribute__ ((__format_arg__(2))) // expected-error {{'__format_arg__' attribu void test (int, ...); void __attribute__ ((alloc_size (2, 3))) *test2(int, ...); // expected-error {{'alloc_size' attribute parameter 1 is out of bounds}} + +void gh159080_a(vo

[clang] [clang][Parse] use consistent Scope::ScopeFlags enum values [NFC] (PR #159275)

2025-09-17 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon approved this pull request. Thanks! https://github.com/llvm/llvm-project/pull/159275 ___ 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-09-17 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: I spoke offline with @tahonermann last week and gave another week for review. I'm going to proceed with the merge. Please feel free to do post commit review! https://github.com/llvm/llvm-project/pull/139566 ___ cfe-commits mailing lis

[clang] Fix crash in 'malloc' referring to function without a argument (PR #159371)

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

[clang] Fix crash in 'malloc' referring to function without a argument (PR #159371)

2025-09-17 Thread Mariya Podchishchaeva via cfe-commits
@@ -347,6 +347,9 @@ Bug Fixes in This Version ``-Wshadow`` and show uncaptured-local warnings with ``-Wshadow-all``. (#GH68605) - Fixed a failed assertion with a negative limit parameter value inside of ``__has_embed``. (#GH157842) +- Fixed an assertion when an improper us

[clang] Fix crash in 'malloc' referring to function without a argument (PR #159371)

2025-09-17 Thread Mariya Podchishchaeva via cfe-commits
@@ -347,6 +347,9 @@ Bug Fixes in This Version ``-Wshadow`` and show uncaptured-local warnings with ``-Wshadow-all``. (#GH68605) - Fixed a failed assertion with a negative limit parameter value inside of ``__has_embed``. (#GH157842) +- Fixed an assertion when an improper us

[clang] Fix crash in 'malloc' referring to function without a argument (PR #159371)

2025-09-17 Thread Mariya Podchishchaeva via cfe-commits
@@ -29,3 +29,9 @@ __attribute__ ((__format_arg__(2))) // expected-error {{'__format_arg__' attribu void test (int, ...); void __attribute__ ((alloc_size (2, 3))) *test2(int, ...); // expected-error {{'alloc_size' attribute parameter 1 is out of bounds}} + +void gh159080_a(vo

[clang] [Sema][AArch64] Emit error for mismatched VLs on streaming mode transitions (PR #159131)

2025-09-17 Thread Mariya Podchishchaeva via cfe-commits
@@ -3768,12 +3770,26 @@ void Sema::checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto, if (!IsCalleeStreamingCompatible && (CallerFnType == SemaARM::ArmStreamingCompatible || ((CallerFnType == SemaARM::ArmStreaming) ^ IsCalleeStreaming))) { -

[clang] [Sema][AArch64] Emit error for mismatched VLs on streaming mode transitions (PR #159131)

2025-09-17 Thread Mariya Podchishchaeva via cfe-commits
@@ -3768,12 +3770,26 @@ void Sema::checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto, if (!IsCalleeStreamingCompatible && (CallerFnType == SemaARM::ArmStreamingCompatible || ((CallerFnType == SemaARM::ArmStreaming) ^ IsCalleeStreaming))) { -

[clang] [clang][ExprConst] Assert that EvaluateAsInitializer has non-null VD (PR #159274)

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

[clang] [clang][sema][NFC] Use a for-range loop in checkBuiltinVerboseTrap (PR #159114)

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

[clang] [clang][sema][NFC] Clean up builtin arg checking functions (PR #158615)

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

[clang] [Sema] Fix missing warnings for unused args with invalid printf specs. (PR #158514)

2025-09-15 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon commented: I'm not sure we want this more chatty? It is kind of obvious that for an invalid format specifier the data argument wont be used. Adding more reviewers https://github.com/llvm/llvm-project/pull/158514 ___ cfe-co

[clang] [clang][ExprConst] Reject unary vector shuffles (PR #158589)

2025-09-15 Thread Mariya Podchishchaeva via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/Fznamznon approved this pull request. Thank you for the fix, I think it looks good. Can we add a release note so the users know it is not supported yet and will be rejected for now? https://github.com

[clang] [clang][sema][NFC] Clean up builtin arg checking functions (PR #158615)

2025-09-15 Thread Mariya Podchishchaeva via cfe-commits
@@ -5886,23 +5886,27 @@ bool Sema::BuiltinOSLogFormat(CallExpr *TheCall) { return false; } -bool Sema::BuiltinConstantArg(CallExpr *TheCall, int ArgNum, +bool Sema::BuiltinConstantArg(CallExpr *TheCall, unsigned ArgNum, llvm::APSInt &Result) {

[clang] [clang][sema][NFC] Clean up builtin arg checking functions (PR #158615)

2025-09-15 Thread Mariya Podchishchaeva via cfe-commits
@@ -5886,23 +5886,27 @@ bool Sema::BuiltinOSLogFormat(CallExpr *TheCall) { return false; } -bool Sema::BuiltinConstantArg(CallExpr *TheCall, int ArgNum, +bool Sema::BuiltinConstantArg(CallExpr *TheCall, unsigned ArgNum, llvm::APSInt &Result) {

[clang] [clang][Sema] Fix false positive -Wshadow with structured binding captures (PR #157667)

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

[clang] [clang] Fix static local variables in consteval functions (PR #156933)

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

[clang] [clang][Sema] Fix false positive -Wshadow with structured binding captures (PR #157667)

2025-09-13 Thread Mariya Podchishchaeva via cfe-commits
@@ -0,0 +1,72 @@ +// RUN: %clang_cc1 -verify -fsyntax-only -std=c++20 -Wshadow %s +// RUN: %clang_cc1 -verify=all -fsyntax-only -std=c++20 -Wshadow-all %s + +// Test for issue #68605: Inconsistent shadow warnings for lambda capture of structured bindings. +// +// The issue was t

[clang] [clang][Sema] Fix false positive -Wshadow with structured binding captures (PR #157667)

2025-09-13 Thread Mariya Podchishchaeva via cfe-commits
@@ -8566,8 +8580,10 @@ void Sema::DiagnoseShadowingLambdaDecls(const LambdaScopeInfo *LSI) { const NamedDecl *ShadowedDecl = Shadow.ShadowedDecl; // Try to avoid the warning when the shadowed decl isn't captured. const DeclContext *OldDC = ShadowedDecl->getDeclCont

[clang] [clang] Fix static local variables in consteval functions (PR #156933)

2025-09-13 Thread Mariya Podchishchaeva via cfe-commits
@@ -432,7 +443,8 @@ void CodeGenFunction::EmitStaticVarDecl(const VarDecl &D, bool isCudaSharedVar = getLangOpts().CUDA && getLangOpts().CUDAIsDevice && D.hasAttr(); // If this value has an initializer, emit it. - if (D.getInit() && !isCudaSharedVa

[clang] [clang] Fix static local variables in consteval functions (PR #156933)

2025-09-13 Thread Mariya Podchishchaeva via cfe-commits
@@ -432,7 +443,8 @@ void CodeGenFunction::EmitStaticVarDecl(const VarDecl &D, bool isCudaSharedVar = getLangOpts().CUDA && getLangOpts().CUDAIsDevice && D.hasAttr(); // If this value has an initializer, emit it. - if (D.getInit() && !isCudaSharedVa

[clang] [clang] Fix static local variables in consteval functions (PR #156933)

2025-09-13 Thread Mariya Podchishchaeva via cfe-commits
@@ -432,7 +443,8 @@ void CodeGenFunction::EmitStaticVarDecl(const VarDecl &D, bool isCudaSharedVar = getLangOpts().CUDA && getLangOpts().CUDAIsDevice && D.hasAttr(); // If this value has an initializer, emit it. - if (D.getInit() && !isCudaSharedVa

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

2025-09-13 Thread Mariya Podchishchaeva via cfe-commits
@@ -1580,29 +1580,85 @@ namespace { } }; + // This function implements generation of scalar deleting destructor body for + // the case when the destructor also accepts an implicit flag. Right now only + // Microsoft ABI requires deleting destructors to accept implicit

[clang] [clang] Fix static local variables in consteval functions (PR #156933)

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

[clang] [clang] Fix static local variables in consteval functions (PR #156933)

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

[clang] [clang][Sema] Fix false positive -Wshadow with structured binding captures (PR #157667)

2025-09-12 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon approved this pull request. Just style nits, otherwise LGTM https://github.com/llvm/llvm-project/pull/157667 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

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

2025-09-12 Thread Mariya Podchishchaeva via cfe-commits
@@ -8546,10 +8546,12 @@ class Sema final : public SemaBase { bool Diagnose = true); FunctionDecl *FindUsualDeallocationFunction(SourceLocation StartLoc, ImplicitDeallocationParameters, -

[clang] [clang][Sema] Fix false positive -Wshadow with structured binding captures (PR #157667)

2025-09-12 Thread Mariya Podchishchaeva via cfe-commits
@@ -8508,18 +8511,29 @@ void Sema::CheckShadow(NamedDecl *D, NamedDecl *ShadowedDecl, return; } } - if (const auto *VD = dyn_cast(ShadowedDecl); - VD && VD->hasLocalStorage()) { -// A variable can't shadow a local variable in an en

[clang] [clang] Fix assertion with invalid limit parameter value (PR #157896)

2025-09-12 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon created https://github.com/llvm/llvm-project/pull/157896 If a negative value was given we would fail to skip till the end of the directive and trip a failed assertion. Fixes https://github.com/llvm/llvm-project/issues/157842 >From 08342b79112f25748b95b0a5983703ffe

[clang] [clang] Fix static local variables in consteval functions (PR #156933)

2025-09-12 Thread Mariya Podchishchaeva via cfe-commits
@@ -4461,8 +4461,14 @@ void CodeGenModule::EmitGlobalDefinition(GlobalDecl GD, llvm::GlobalValue *GV) { return EmitGlobalFunctionDefinition(GD, GV); } - if (const auto *VD = dyn_cast(D)) + if (const auto *VD = dyn_cast(D)) { +if (VD->isStaticLocal() && !getContext

[clang] [clang][Sema] Fix false positive -Wshadow with structured binding captures (PR #157667)

2025-09-12 Thread Mariya Podchishchaeva via cfe-commits
@@ -8508,18 +8511,29 @@ void Sema::CheckShadow(NamedDecl *D, NamedDecl *ShadowedDecl, return; } } - if (const auto *VD = dyn_cast(ShadowedDecl); - VD && VD->hasLocalStorage()) { -// A variable can't shadow a local variable in an en

[clang] [clang] Fix assertion with invalid embed limit parameter value (PR #157896)

2025-09-12 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon closed https://github.com/llvm/llvm-project/pull/157896 ___ 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-09-12 Thread Mariya Podchishchaeva via cfe-commits
@@ -2021,7 +2028,10 @@ llvm::Value *MicrosoftCXXABI::EmitVirtualDestructorCall( ASTContext &Context = getContext(); llvm::Value *ImplicitParam = llvm::ConstantInt::get( llvm::IntegerType::getInt32Ty(CGF.getLLVMContext()), - DtorType == Dtor_Deleting); + (Dto

[clang] [clang] Emit initializers for static const/constexpr variables once they're met (PR #156933)

2025-09-12 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon updated https://github.com/llvm/llvm-project/pull/156933 >From 3885133c5a2bafb8654f7b60e016c058705a21ee Mon Sep 17 00:00:00 2001 From: "Podchishchaeva, Mariya" Date: Thu, 4 Sep 2025 10:17:23 -0700 Subject: [PATCH 1/3] [clang] Emit static const/constexpr variables on

[clang] [clang] Fix static local variables in consteval functions (PR #156933)

2025-09-12 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: > That makes sense. I think the cleaner way of handling it is probably to just > fit it into the existing lazy-emission system, DeferredDeclsToEmit I've tried to do that. Thanks for the suggestion. I also added a test with a self referential initializer, which with the previou

[clang] [clang][Sema] Fix false positive -Wshadow with structured binding captures (PR #157667)

2025-09-12 Thread Mariya Podchishchaeva via cfe-commits
@@ -8410,6 +8410,7 @@ NamedDecl *Sema::getShadowedDeclaration(const VarDecl *D, return nullptr; NamedDecl *ShadowedDecl = R.getFoundDecl(); + Fznamznon wrote: Seems unrelated. ```suggestion ``` https://github.com/llvm/llvm-project/pull/157667 _

[clang] [clang][CodeGen][MSVC] Return vector types from methods indirectly (PR #157365)

2025-09-08 Thread Mariya Podchishchaeva via cfe-commits
@@ -1168,15 +1168,20 @@ static bool isTrivialForMSVC(const CXXRecordDecl *RD, QualType Ty, } bool MicrosoftCXXABI::classifyReturnType(CGFunctionInfo &FI) const { - const CXXRecordDecl *RD = FI.getReturnType()->getAsCXXRecordDecl(); - if (!RD) -return false; - - bool is

[clang] [clang][CodeGen][MSVC] Return vector types from methods indirectly (PR #157365)

2025-09-08 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon commented: Hi, thank you for the patch. I wonder if it can make clang ABI incompatible with its previous versions? Perhaps it makes sense to put the new behavior under `-fclang-abi-compat` flag. https://github.com/llvm/llvm-project/pull/157365 _

[clang] [clang] Look through parens around reinterpret_cast to emit a warning (PR #157033)

2025-09-07 Thread Mariya Podchishchaeva via cfe-commits
@@ -167,6 +167,9 @@ void dereference_reinterpret_cast() { (void)reinterpret_cast(d); // expected-warning {{reinterpret_cast from 'double' to 'float &' has undefined behavior}} (void)*reinterpret_cast(&d); // expected-warning {{dereference of type 'float *' that was reint

[clang] [clang] Look through parens around reinterpret_cast to emit a warning (PR #157033)

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

[clang] [clang] Look through parens around reinterpret_cast to emit a warning (PR #157033)

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

[clang] [clang] Look through parens around reinterpret_cast to emit a warning (PR #157033)

2025-09-05 Thread Mariya Podchishchaeva via cfe-commits
@@ -167,6 +167,9 @@ void dereference_reinterpret_cast() { (void)reinterpret_cast(d); // expected-warning {{reinterpret_cast from 'double' to 'float &' has undefined behavior}} (void)*reinterpret_cast(&d); // expected-warning {{dereference of type 'float *' that was reint

[clang] [clang] Emit initializers for static const/constexpr variables once they're met (PR #156933)

2025-09-04 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: > Why does this help with initializing things in consteval functions? It seems once codegen meets an odr use of the variable, it doesn't emit the initializer, only the global variable itself. Then while emitting some function's body it meets the variable declaration, and if it

[clang] [clang] Emit initializers for static const/constexpr variables once they're met (PR #156933)

2025-09-04 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon created https://github.com/llvm/llvm-project/pull/156933 Do not wait until the body of the function is met. This helps with initializing static variables in conseval functions. Fixes https://github.com/llvm/llvm-project/issues/82994 >From 3885133c5a2bafb8654f7b60e

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

2025-09-04 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: > The conflict in ReleaseNotes has to be fixed. I am happy to have this > compatibility fixed since we ran into it at some point. I am guessing that > reviews can be slower during summer. Maybe @aganea or @efriedma-quic could > have a look (again). The conflicts has been fixe

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

2025-09-04 Thread Mariya Podchishchaeva via cfe-commits
@@ -34,6 +34,24 @@ latest release, please see the `Clang Web Site `_ or the Potentially Breaking Changes +- Scalar deleting destructor support has been aligned with MSVC when + targeting the MSVC ABI. Clang previously impl

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

2025-09-04 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon updated https://github.com/llvm/llvm-project/pull/139566 >From 1b0b6242e5749e776f02581ba8600d853bfef322 Mon Sep 17 00:00:00 2001 From: "Podchishchaeva, Mariya" Date: Mon, 12 May 2025 07:25:57 -0700 Subject: [PATCH 01/18] [win][clang] Align scalar deleting destructor

[clang] [clang][initlist] handle incomplete array type in Constant Expr Calculation (PR #155080)

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

[clang] [Sema] Allow zero-size allocations for -Walloc-size (PR #155793)

2025-08-28 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: Hi, thanks for the fix. I that is going to fix https://github.com/llvm/llvm-project/issues/155633 , you can also add ``Fixes #155633`` to the PR desc and merging this PR will close the issue automatically. https://github.com/llvm/llvm-project/pull/155793

[clang] [clang] Optimize EmbedExpr child iterator callback (PR #155803)

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

[clang] [clang] Make sure EvalInfo pointer isn't null (PR #155563)

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

[clang] [clang][initlist] handle incomplete array type in Constant Expr Calculation (PR #155080)

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

[clang] [clang] Make sure EvalInfo pointer isn't null (PR #155563)

2025-08-27 Thread Mariya Podchishchaeva via cfe-commits
@@ -391,3 +391,10 @@ void ghissue109095() { _Static_assert(i == c[0]); // expected-error {{static assertion expression is not an integral constant expression}}\ // expected-note {{initializer of 'i' is not a constant expression}} } + +typedef bo

[clang] [clang][initlist] handle incomplete array type in Constant Expr Calculation (PR #155080)

2025-08-27 Thread Mariya Podchishchaeva via cfe-commits
@@ -4029,10 +4029,12 @@ findSubobject(EvalInfo &Info, const Expr *E, const CompleteObject &Obj, LastField = nullptr; if (ObjType->isArrayType()) { // Next subobject is an array element. - const ConstantArrayType *CAT = Info.Ctx.getAsConstantArrayType(ObjType

[clang] [clang] Make sure EvalInfo pointer isn't null (PR #155563)

2025-08-27 Thread Mariya Podchishchaeva via cfe-commits
@@ -391,3 +391,10 @@ void ghissue109095() { _Static_assert(i == c[0]); // expected-error {{static assertion expression is not an integral constant expression}}\ // expected-note {{initializer of 'i' is not a constant expression}} } + +typedef bo

[clang] [Clang][Sema] Reject unsupported opencl address space attributes in SYCL and HLSL (PR #152528)

2025-08-19 Thread Mariya Podchishchaeva via cfe-commits
=?utf-8?q?M=C3=A9sz=C3=A1ros?= Gergely , =?utf-8?q?M=C3=A9sz=C3=A1ros?= Gergely ,Gergely Meszaros ,Gergely Meszaros Message-ID: In-Reply-To: https://github.com/Fznamznon approved this pull request. Thanks! https://github.com/llvm/llvm-project/pull/152528

[clang] [SYCL] SYCL host kernel launch support for the sycl_kernel_entry_point attribute. (PR #152403)

2025-08-18 Thread Mariya Podchishchaeva via cfe-commits
@@ -79,6 +88,14 @@ int main() { // CHECK-HOST-LINUX-NEXT: %kernelFunc = alloca %class.anon, align 4 // CHECK-HOST-LINUX-NEXT: %coerce.dive = getelementptr inbounds nuw %class.anon, ptr %kernelFunc, i32 0, i32 0 // CHECK-HOST-LINUX-NEXT: store i32 %kernelFunc.coerce, ptr

[clang] [SYCL] SYCL host kernel launch support for the sycl_kernel_entry_point attribute. (PR #152403)

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

[clang] [Clang] improve -Wstring-concatenation to warn on every missing comma in initializer lists (PR #154018)

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

[clang] [Clang] improve -Wstring-concatenation to warn on every missing comma in initializer lists (PR #154018)

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

[clang] [Clang] improve -Wstring-concatenation to warn on every missing comma in initializer lists (PR #154018)

2025-08-18 Thread Mariya Podchishchaeva via cfe-commits
@@ -168,3 +168,17 @@ const char *extra_parens_to_suppress_warning[] = { "promise"), "shared_future" }; + +const char *multiple_missing_commas[] = { +"1", +"2" // expected-note {{place parentheses around the string literal to silence warning}} +"3", // expe

[clang] [Clang] improve -Wstring-concatenation to warn on every missing comma in initializer lists (PR #154018)

2025-08-18 Thread Mariya Podchishchaeva via cfe-commits
@@ -14708,7 +14708,16 @@ void Sema::CheckCompleteVariableDeclaration(VarDecl *var) { isa(var->getInit())) { const auto *ILE = cast(var->getInit()); unsigned NumInits = ILE->getNumInits(); -if (NumInits > 2) +if (NumInits > 2) { + auto concatenatedPar

[clang] [Clang][Sema] Reject unsupported opencl address space attributes in SYCL and HLSL (PR #152528)

2025-08-18 Thread Mariya Podchishchaeva via cfe-commits
=?utf-8?q?Mészáros?= Gergely , =?utf-8?q?Mészáros?= Gergely ,Gergely Meszaros Message-ID: In-Reply-To: @@ -0,0 +1,25 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -x c++ -fsycl-is-host -verify %s +// RUN: %clang_cc1 -fsyntax-only -x c++ -fsy

[clang] [Clang][NFC] Clarify some SourceManager related code (PR #153527)

2025-08-18 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon approved this pull request. as someone dealing with c/c++ I don't really get why 0 column number is invalid, but that is already clearer, thanks https://github.com/llvm/llvm-project/pull/153527 ___ cfe-commits mailing list

[clang] [Clang] Do not consider a variadic function ellipsis part of a default arg (PR #153496)

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

[clang] [Clang][NFC] Clarify some SourceManager related code (PR #153527)

2025-08-14 Thread Mariya Podchishchaeva via cfe-commits
@@ -1095,6 +1095,8 @@ prepareAndFilterRanges(const SmallVectorImpl &Ranges, unsigned StartColumn = SM.getExpansionColumnNumber(Begin); unsigned EndColumn = SM.getExpansionColumnNumber(End); +assert(StartColumn && "StartColumn has a value of 0"); F

[clang] [Clang] Do not consider a variadic function ellipsis part of a default arg (PR #153496)

2025-08-14 Thread Mariya Podchishchaeva via cfe-commits
@@ -6,3 +6,15 @@ void f(...) { } void h(int n..., int m); // expected-error {{expected ')'}} expected-note {{to match}} + + +namespace GH153445 { +void f(int = {}...); + +struct S { + void f(int = {}...); + void g(int...); +}; + +void S::g(int = {}...) {} F

[clang] [Clang] Do not consider a variadic function ellipsis part of a default arg (PR #153496)

2025-08-14 Thread Mariya Podchishchaeva via cfe-commits
@@ -206,6 +206,8 @@ Bug Fixes to C++ Support casts that are guaranteed to fail (#GH137518). - Fix bug rejecting partial specialization of variable templates with auto NTTPs (#GH118190). - Fix a crash when using ``explicit(bool)`` in pre-C++11 language modes. (#GH152729) +-

[clang] [Clang] Fixed a crash when parsing #embed parameters with unmatched closing brackets (PR #152877)

2025-08-11 Thread Mariya Podchishchaeva via cfe-commits
@@ -94,6 +94,9 @@ char buffer[] = { #embed "embed_parsing_errors.c" prefix() // OK: tokens within parens are optional #embed "embed_parsing_errors.c" prefix) // expected-error@-1 {{expected '('}} +#embed "embed_parsing_errors.c" prefix()) // expected-error {{expected identifi

[clang] [Clang] Fixed a crash when parsing #embed parameters with unmatched closing brackets (PR #152877)

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

[clang] [Clang] Fixed a crash when parsing #embed parameters with unmatched closing brackets (PR #152877)

2025-08-11 Thread Mariya Podchishchaeva via cfe-commits
@@ -94,6 +94,9 @@ char buffer[] = { #embed "embed_parsing_errors.c" prefix() // OK: tokens within parens are optional #embed "embed_parsing_errors.c" prefix) // expected-error@-1 {{expected '('}} +#embed "embed_parsing_errors.c" prefix()) // expected-error {{expected identifi

[clang] [Clang] Fixed a crash when parsing #embed parameters with unmatched closing brackets (PR #152877)

2025-08-11 Thread Mariya Podchishchaeva via cfe-commits
@@ -94,6 +94,9 @@ char buffer[] = { #embed "embed_parsing_errors.c" prefix() // OK: tokens within parens are optional #embed "embed_parsing_errors.c" prefix) // expected-error@-1 {{expected '('}} +#embed "embed_parsing_errors.c" prefix()) // expected-error {{expected identifi

[clang] [SYCL] SYCL host kernel launch support for the sycl_kernel_entry_point attribute. (PR #152403)

2025-08-07 Thread Mariya Podchishchaeva via cfe-commits
@@ -367,6 +370,67 @@ void SemaSYCL::CheckSYCLEntryPointFunctionDecl(FunctionDecl *FD) { namespace { +CompoundStmt *BuildSYCLKernelLaunchStmt(Sema &SemaRef, FunctionDecl *FD, +const std::string &KernelName) { + ASTContext &Ctx = SemaRe

[clang] [SYCL] SYCL host kernel launch support for the sycl_kernel_entry_point attribute. (PR #152403)

2025-08-07 Thread Mariya Podchishchaeva via cfe-commits
@@ -367,6 +370,67 @@ void SemaSYCL::CheckSYCLEntryPointFunctionDecl(FunctionDecl *FD) { namespace { +CompoundStmt *BuildSYCLKernelLaunchStmt(Sema &SemaRef, FunctionDecl *FD, +const std::string &KernelName) { + ASTContext &Ctx = SemaRe

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

2025-08-07 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon updated https://github.com/llvm/llvm-project/pull/139566 >From 1b0b6242e5749e776f02581ba8600d853bfef322 Mon Sep 17 00:00:00 2001 From: "Podchishchaeva, Mariya" Date: Mon, 12 May 2025 07:25:57 -0700 Subject: [PATCH 01/18] [win][clang] Align scalar deleting destructor

[clang] [Clang][NFC] Enumerate Clang ABI versions in a separate header file (PR #151995)

2025-08-07 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon approved this pull request. Thank you for working on this! Honestly, I'm not a fan of .def files, but I don't have any other good ideas atm, LGTM! https://github.com/llvm/llvm-project/pull/151995 ___ cfe-commits mailing li

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

2025-08-06 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: ping @tahonermann 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] constexpr integer `__builtin_elementwise_{max,min}` (PR #152294)

2025-08-06 Thread Mariya Podchishchaeva via cfe-commits
@@ -11654,6 +11654,41 @@ bool VectorExprEvaluator::VisitCallExpr(const CallExpr *E) { return Success(APValue(ResultElements.data(), ResultElements.size()), E); } + case Builtin::BI__builtin_elementwise_max: + case Builtin::BI__builtin_elementwise_min: { --

[clang] [SYCL] Restrict the sycl_kernel_entry_point attribute spelling to C++11 style. (PR #151405)

2025-07-31 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon approved this pull request. https://github.com/llvm/llvm-project/pull/151405 ___ 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-07-14 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: ping @tahonermann 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][SYCL] Add sycl_external attribute and restrict emitting device code (PR #140282)

2025-07-10 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: Oops new tests are failing. https://github.com/llvm/llvm-project/pull/140282 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][SYCL] Add sycl_external attribute and restrict emitting device code (PR #140282)

2025-07-08 Thread Mariya Podchishchaeva via cfe-commits
@@ -25,20 +40,29 @@ int main() { auto lambda2 = [](int){}; auto lambda3 = [](double){}; - kernel(lambda1); - kernel2(lambda2); - kernel3(lambda3); + kernel_wrapper(lambda1); + kernel2_wrapper(lambda2); + kernel3_wrapper(lambda3); // Ensure the kernels are named

[clang] [clang][SYCL] Add sycl_external attribute and restrict emitting device code (PR #140282)

2025-07-08 Thread Mariya Podchishchaeva via cfe-commits
@@ -25,20 +40,29 @@ int main() { auto lambda2 = [](int){}; auto lambda3 = [](double){}; - kernel(lambda1); - kernel2(lambda2); - kernel3(lambda3); + kernel_wrapper(lambda1); + kernel2_wrapper(lambda2); + kernel3_wrapper(lambda3); // Ensure the kernels are named

[clang] [clang][SYCL] Add sycl_external attribute and restrict emitting device code (PR #140282)

2025-07-08 Thread Mariya Podchishchaeva via cfe-commits
@@ -25,20 +40,29 @@ int main() { auto lambda2 = [](int){}; auto lambda3 = [](double){}; - kernel(lambda1); - kernel2(lambda2); - kernel3(lambda3); + kernel_wrapper(lambda1); + kernel2_wrapper(lambda2); + kernel3_wrapper(lambda3); // Ensure the kernels are named

[clang] [clang][SYCL] Add sycl_external attribute and restrict emitting device code (PR #140282)

2025-07-08 Thread Mariya Podchishchaeva via cfe-commits
@@ -25,20 +40,29 @@ int main() { auto lambda2 = [](int){}; auto lambda3 = [](double){}; - kernel(lambda1); - kernel2(lambda2); - kernel3(lambda3); + kernel_wrapper(lambda1); + kernel2_wrapper(lambda2); + kernel3_wrapper(lambda3); // Ensure the kernels are named

[clang] [win][clang] Do not inject static_assert macro definition (PR #147030)

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

[clang] [NFC][clang] Fix CodeGenSYCL::unique_stable_name_windows_diff test (PR #146854)

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

[clang] [NFC][clang] Fix CodeGenSYCL::unique_stable_name_windows_diff test (PR #146854)

2025-07-07 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon updated https://github.com/llvm/llvm-project/pull/146854 >From 9a640eefb5d27a65f236b5f7df1398bdf1bcc017 Mon Sep 17 00:00:00 2001 From: "Podchishchaeva, Mariya" Date: Thu, 3 Jul 2025 03:46:41 -0700 Subject: [PATCH 1/4] [NFC][clang] Fix CodeGenSYCL::unique_stable_nam

[clang] [C23][Parser] Diagnostic for attribute declaration where statement is required (PR #146224)

2025-07-07 Thread Mariya Podchishchaeva via cfe-commits
@@ -747,6 +747,10 @@ Bug Fixes in This Version - Fixed an infinite recursion when checking constexpr destructors. (#GH141789) - Fixed a crash when a malformed using declaration appears in a ``constexpr`` function. (#GH144264) - Fixed a bug when use unicode character name in ma

[clang] [clang][SYCL] Add sycl_external attribute and restrict emitting device code (PR #140282)

2025-07-07 Thread Mariya Podchishchaeva via cfe-commits
@@ -25,20 +40,29 @@ int main() { auto lambda2 = [](int){}; auto lambda3 = [](double){}; - kernel(lambda1); - kernel2(lambda2); - kernel3(lambda3); + kernel_wrapper(lambda1); + kernel2_wrapper(lambda2); + kernel3_wrapper(lambda3); // Ensure the kernels are named

[clang] [NFC][clang] Fix CodeGenSYCL::unique_stable_name_windows_diff test (PR #146854)

2025-07-07 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: > I noticed there is a problem with __builtin_sycl_unique_stable_name and > sycl_kernel_etnry_point attribute. If I add this wrapping of > __builtin_sycl_unique_stable_name calls AND sycl_kernel_entry_point > attribute, the strings disappear from the IR. They are in here > ht

[clang] [NFC][clang] Fix CodeGenSYCL::unique_stable_name_windows_diff test (PR #146854)

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

[clang] [NFC][clang] Fix CodeGenSYCL::unique_stable_name_windows_diff test (PR #146854)

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

[clang] [NFC][clang] Fix CodeGenSYCL::unique_stable_name_windows_diff test (PR #146854)

2025-07-07 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon updated https://github.com/llvm/llvm-project/pull/146854 >From 9a640eefb5d27a65f236b5f7df1398bdf1bcc017 Mon Sep 17 00:00:00 2001 From: "Podchishchaeva, Mariya" Date: Thu, 3 Jul 2025 03:46:41 -0700 Subject: [PATCH 1/3] [NFC][clang] Fix CodeGenSYCL::unique_stable_nam

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

2025-07-07 Thread Mariya Podchishchaeva via cfe-commits
@@ -46,6 +46,22 @@ Potentially Breaking Changes ``endbr64`` instruction at the labels named as possible branch destinations, so it is not safe to use a register-controlled branch instruction to branch to one. (In line with gcc.) +- Scalar deleting destructor support has b

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

2025-07-07 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: Ping @tahonermann 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] Do not inject static_assert macro definition (PR #147030)

2025-07-07 Thread Mariya Podchishchaeva via cfe-commits
@@ -1450,7 +1450,6 @@ def MicrosoftAnonTag : DiagGroup<"microsoft-anon-tag">; def MicrosoftCommentPaste : DiagGroup<"microsoft-comment-paste">; def MicrosoftEndOfFile : DiagGroup<"microsoft-end-of-file">; def MicrosoftInaccessibleBase : DiagGroup<"microsoft-inaccessible-base">;

  1   2   3   4   5   6   7   8   9   10   >