[clang] [Clang] Fix P2564 handling of variable initializers (PR #89565)

2024-05-16 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: @katzdm It seems after this a `warn_impcast_integer_precision_constant` warning went missing: https://godbolt.org/z/ndsPb44b4 Is that expected? https://github.com/llvm/llvm-project/pull/89565 ___ cfe-commits mailing list cfe-commit

[clang] [Clang] Fix P2564 handling of variable initializers (PR #89565)

2024-05-17 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: @katzdm Does it make sense to file an issue so we don't forget to bring the warning back? https://github.com/llvm/llvm-project/pull/89565 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/

[clang] [Clang] Only check exprs that might be immediate escalating in evaluated contexts (PR #93187)

2024-05-23 Thread Mariya Podchishchaeva via cfe-commits
@@ -5146,6 +5153,12 @@ class Sema final : public SemaBase { return ExprEvalContexts.back(); }; + const ExpressionEvaluationContextRecord &parentEvaluationContext() const { +assert(ExprEvalContexts.size() >= 2 && + "Must be in an expression evaluation conte

[clang] [Clang] Only check exprs that might be immediate escalating in evaluated contexts (PR #93187)

2024-05-23 Thread Mariya Podchishchaeva via cfe-commits
@@ -769,6 +769,8 @@ Bug Fixes to C++ Support - Fixed a crash when trying to emit captures in a lambda call operator with an explicit object parameter that is called on a derived type of the lambda. Fixes (#GH87210), (GH89541). +- Clang no longer try to check if an expressi

[clang] [flang] Fix more diagnostic wording for style; NFC (PR #93190)

2024-05-23 Thread Mariya Podchishchaeva via cfe-commits
@@ -337,7 +337,7 @@ def warn_atomic_op_oversized : Warning< InGroup; def warn_sync_op_misaligned : Warning< - "__sync builtin operation MUST have natural alignment (consider using __atomic).">, + "__sync builtin operation MUST have natural alignment (consider using __atomi

[clang] [Clang] Only check exprs that might be immediate escalating in evaluated contexts (PR #93187)

2024-05-24 Thread Mariya Podchishchaeva via cfe-commits
@@ -5146,6 +5153,12 @@ class Sema final : public SemaBase { return ExprEvalContexts.back(); }; + const ExpressionEvaluationContextRecord &parentEvaluationContext() const { +assert(ExprEvalContexts.size() >= 2 && + "Must be in an expression evaluation conte

[clang] [clang][Sema] Don't emit 'declared here' note for builtin functions with no decl in source (PR #93394)

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

[clang] [clang][Sema] Don't emit 'declared here' note for builtin functions with no decl in source (PR #93394)

2024-05-27 Thread Mariya Podchishchaeva via cfe-commits
@@ -5897,6 +5897,16 @@ void Sema::diagnoseTypo(const TypoCorrection &Correction, NamedDecl *ChosenDecl = Correction.isKeyword() ? nullptr : Correction.getFoundDecl(); + + // For builtin functions which aren't declared anywhere in source, + // don't emit the "declared

[clang] [clang][Sema] Don't emit 'declared here' note for builtin functions with no decl in source (PR #93394)

2024-05-27 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon commented: Could you please add a release note? https://github.com/llvm/llvm-project/pull/93394 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] prevent assertion failure by avoiding required literal type checking in C context (PR #101426)

2024-08-01 Thread Mariya Podchishchaeva via cfe-commits
@@ -9267,14 +9267,14 @@ bool Sema::RequireLiteralType(SourceLocation Loc, QualType T, if (!RT) return true; - const CXXRecordDecl *RD = cast(RT->getDecl()); - // A partially-defined class type can't be a literal type, because a literal // class type must have a t

[clang] [Clang] prevent assertion failure by avoiding required literal type checking in C context (PR #101426)

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

[clang] [clang] Inject tokens containing #embed back into token stream (PR #97274)

2024-08-06 Thread Mariya Podchishchaeva via cfe-commits
@@ -2123,17 +2123,18 @@ class Preprocessor { char getSpellingOfSingleCharacterNumericConstant(const Token &Tok, Fznamznon wrote: Thank you @AaronBallman https://github.com/llvm/llvm-project/pull/97274 ___ cfe-co

[clang] [clang] Fix crash when #embed used in a compound literal (PR #102304)

2024-08-07 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon created https://github.com/llvm/llvm-project/pull/102304 Fixes https://github.com/llvm/llvm-project/issues/102248 >From ebeb9264e8a4e6d57a4573376248191f64ad99e7 Mon Sep 17 00:00:00 2001 From: "Podchishchaeva, Mariya" Date: Wed, 7 Aug 2024 04:04:09 -0700 Subject: [P

[clang] [clang] Fix crash when #embed used in a compound literal (PR #102304)

2024-08-07 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon updated https://github.com/llvm/llvm-project/pull/102304 >From ebeb9264e8a4e6d57a4573376248191f64ad99e7 Mon Sep 17 00:00:00 2001 From: "Podchishchaeva, Mariya" Date: Wed, 7 Aug 2024 04:04:09 -0700 Subject: [PATCH 1/2] [clang] Fix crash when #embed used in a compound

[clang] [clang] Fix crash when #embed used in a compound literal (PR #102304)

2024-08-07 Thread Mariya Podchishchaeva via cfe-commits
@@ -1,9 +1,15 @@ // RUN: %clang_cc1 %s -triple x86_64 --embed-dir=%S/Inputs -emit-llvm -o - | FileCheck %s +// CHECK: @.compoundliteral = internal global [2 x i8] c"jk" // CHECK: @__const._Z3fooi.ca = private unnamed_addr constant [3 x i32] [i32 0, i32 106, i32 107], align 4

[clang] [clang] Fix crash when #embed used in a compound literal (PR #102304)

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

[clang] [clang] Fix crash when #embed used in a compound literal (PR #102304)

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

[clang] [clang] Fix crash when #embed used in a compound literal (PR #102304)

2024-08-07 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: /cherry-pick 3606d69d0b57dc1d23a4362e376e7ad27f650c27 https://github.com/llvm/llvm-project/pull/102304 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 52e8f58 - [SYCL] Diagnose uses of zero length arrays

2021-12-29 Thread Mariya Podchishchaeva via cfe-commits
Author: Mariya Podchishchaeva Date: 2021-12-29T15:30:18+03:00 New Revision: 52e8f58d49e63aaf6f4c1682bb787bcbfd240009 URL: https://github.com/llvm/llvm-project/commit/52e8f58d49e63aaf6f4c1682bb787bcbfd240009 DIFF: https://github.com/llvm/llvm-project/commit/52e8f58d49e63aaf6f4c1682bb787bcbfd2400

[clang] [clang][test] Avoid writing to a potentially write-protected dir (PR #96457)

2024-06-25 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon approved this pull request. Whoops, sorry about that mistake in the test. The patch is LGTM. Thanks! https://github.com/llvm/llvm-project/pull/96457 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

[clang] [clang][C23] Support N3029 Improved Normal Enumerations (PR #103917)

2024-09-12 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: ping @AaronBallman https://github.com/llvm/llvm-project/pull/103917 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][C23] Support N3029 Improved Normal Enumerations (PR #103917)

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

[clang] [clang][C23] Claim N3030 Enhancements to Enumerations supported (PR #107260)

2024-09-16 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon updated https://github.com/llvm/llvm-project/pull/107260 >From da76f2dfd3b0c8e2a03165ad1ac06b517c4af391 Mon Sep 17 00:00:00 2001 From: "Podchishchaeva, Mariya" Date: Wed, 4 Sep 2024 07:45:27 -0700 Subject: [PATCH 1/2] [clang][C23] Claim N3030 Enhancements to Enumera

[clang] [clang][C23] Claim N3030 Enhancements to Enumerations supported (PR #107260)

2024-09-16 Thread Mariya Podchishchaeva via cfe-commits
@@ -0,0 +1,95 @@ +// RUN: %clang_cc1 -verify -triple x86_64-unknown-linux-gnu -fsyntax-only --embed-dir=%S/Inputs -std=c23 %s -pedantic -Wall Fznamznon wrote: Done, thanks for the catch! https://github.com/llvm/llvm-project/pull/107260 _

[clang] [clang][C23] Claim N3030 Enhancements to Enumerations supported (PR #107260)

2024-09-16 Thread Mariya Podchishchaeva via cfe-commits
@@ -5413,18 +5413,20 @@ void Parser::ParseEnumSpecifier(SourceLocation StartLoc, DeclSpec &DS, BaseRange = SourceRange(ColonLoc, DeclaratorInfo.getSourceRange().getEnd()); - if (!getLangOpts().ObjC && !getLangOpts().C23) { + if (!getLangOpts().ObjC) {

[clang] [clang][C23] Claim N3030 Enhancements to Enumerations supported (PR #107260)

2024-09-16 Thread Mariya Podchishchaeva via cfe-commits
@@ -0,0 +1,95 @@ +// RUN: %clang_cc1 -verify -triple x86_64-unknown-linux-gnu -fsyntax-only --embed-dir=%S/Inputs -std=c23 %s -pedantic -Wall + +#include + +enum us : unsigned short { + us_max = USHRT_MAX, + us_violation, // expected-error {{enumerator value 65536 is not rep

[clang] [clang] Fix static analyzer concerns (PR #110243)

2024-09-30 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon updated https://github.com/llvm/llvm-project/pull/110243 >From 314a8f4d4f8e003881bed0c320f9ee80ba0b8f8c Mon Sep 17 00:00:00 2001 From: "Podchishchaeva, Mariya" Date: Fri, 27 Sep 2024 04:00:31 -0700 Subject: [PATCH] [clang] Fix static analyzer concerns It seems in c

[clang] [clang] Reject if constexpr in C (PR #112685)

2024-10-17 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon created https://github.com/llvm/llvm-project/pull/112685 Fixes https://github.com/llvm/llvm-project/issues/112587 >From 6fda18661ef51185a7d24dbfb66684f55dd20f26 Mon Sep 17 00:00:00 2001 From: "Podchishchaeva, Mariya" Date: Thu, 17 Oct 2024 02:55:04 -0700 Subject: [

[clang] [clang] Reject if constexpr in C (PR #112685)

2024-10-17 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: https://github.com/llvm/llvm-project/pull/112697 https://github.com/llvm/llvm-project/pull/112685 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Reject if constexpr in C (PR #112685)

2024-10-17 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: *sobs while doing manual cherry-pick* https://github.com/llvm/llvm-project/pull/112685 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Reject if constexpr in C (PR #112685)

2024-10-17 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon milestoned https://github.com/llvm/llvm-project/pull/112685 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Reject if constexpr in C (PR #112685)

2024-10-17 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: /cherry-pick e21c80ac73a9da5c86c20dbce37c9227a17ab06a https://github.com/llvm/llvm-project/pull/112685 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix C23 constexpr crashes (PR #112708)

2024-10-17 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon created https://github.com/llvm/llvm-project/pull/112708 Before using a constexpr variable that is not properly initialized check that it is valid. Fixes https://github.com/llvm/llvm-project/issues/109095 Fixes https://github.com/llvm/llvm-project/issues/112516 >

[clang] [clang] Fix C23 constexpr crashes (PR #112708)

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

[clang] [clang] Reject if constexpr in C (PR #112685)

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

[clang] [clang] Fix C23 constexpr crashes (PR #112708)

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

[clang] [clang] Fix C23 constexpr crashes (PR #112708)

2024-10-18 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: Release branch cherry-pick https://github.com/llvm/llvm-project/pull/112855 https://github.com/llvm/llvm-project/pull/112708 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[clang] [clang] Apply internal buffering to clang diagnostics printing (PR #113440)

2024-10-23 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon created https://github.com/llvm/llvm-project/pull/113440 To stabilize output of clang when clang is run in multiple build threads, the whole diagnostic message is written first to internal buffer and then the whole message is put to the output stream which usually

[clang] [clang] Fix crash related to _BitInt constant split (PR #112218)

2024-10-14 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon created https://github.com/llvm/llvm-project/pull/112218 9ad72df55cb74b29193270c28f6974d2af8e0b71 added split of _BitInt constants when required. Before folding back, check that the constant exists. >From 60cda89e05cdd922ec762d8be6142936442fb505 Mon Sep 17 00:00:00

[clang] [clang] Apply internal buffering to clang diagnostics printing (PR #113440)

2024-10-24 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: > Are we calling `SetUnbuffered` somewhere we shouldn't? Well, yeah, but I think we should? https://github.com/llvm/llvm-project/blob/37832d5de2abb425c460375a4054478ce9f948fe/llvm/lib/Support/raw_ostream.cpp#L910 The thing is though, I've tried setting `SetBuffered` somewhere

[clang] [clang] Apply internal buffering to clang diagnostics printing (PR #113440)

2024-10-23 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: BTW, the test failure IS caused by the patch. It somehow caused permanent swap of what clang-tidy prints in clang-tidy-run-with-database.cpp test. Not sure why... https://github.com/llvm/llvm-project/pull/113440 ___ cfe-commits maili

[clang] [clang] Apply internal buffering to clang diagnostics printing (PR #113440)

2024-10-23 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: > What does "run in multiple build threads" mean? When does that happen? What I meant is a build of some project using `clang` as a compiler and `make -j N` where `N > 1` (or a similar tool). https://github.com/llvm/llvm-project/pull/113440

[clang] [clang] Apply internal buffering to clang diagnostics printing (PR #113440)

2024-10-23 Thread Mariya Podchishchaeva via cfe-commits
@@ -133,12 +133,16 @@ void TextDiagnosticPrinter::HandleDiagnostic(DiagnosticsEngine::Level Level, // diagnostics in a context that lacks language options, a source manager, or // other infrastructure necessary when emitting more rich diagnostics. if (!Info.getLocation()

[clang] [Clang] Prevent null dereferences (PR #115502)

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

[clang] [Clang] Prevent null dereferences (PR #115502)

2024-11-08 Thread Mariya Podchishchaeva via cfe-commits
@@ -2265,7 +2265,7 @@ class UnsafeBufferUsageReporter : public UnsafeBufferUsageHandler { } else if (isa(Operation)) { // note_unsafe_buffer_operation doesn't have this mode yet. assert(!IsRelatedToDecl && "Not implemented yet!"); -auto ME = dyn_c

[clang] [Clang] Prevent null dereferences (PR #115502)

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

[clang] [clang][NFC] add release note for n3030 support (PR #115648)

2024-11-11 Thread Mariya Podchishchaeva via cfe-commits
@@ -318,6 +318,7 @@ C23 Feature Support ^^^ - Clang now supports `N3029 `_ Improved Normal Enumerations. +- Clang now supports `N3030 `_ E

[clang] [clang] Fix division by zero in ACLEIntrinsic constructor (PR #115883)

2024-11-13 Thread Mariya Podchishchaeva via cfe-commits
@@ -1415,7 +1415,10 @@ ACLEIntrinsic::ACLEIntrinsic(EmitterBase &ME, const Record *R, } else if (Bounds->getName() == "IB_LaneIndex") { IA.boundsType = ImmediateArg::BoundsType::ExplicitRange; IA.i1 = 0; - IA.i2 = 128 / Param->sizeInBits()

[clang] [clang] Fix division by zero in ACLEIntrinsic constructor (PR #115883)

2024-11-13 Thread Mariya Podchishchaeva via cfe-commits
@@ -1415,7 +1415,10 @@ ACLEIntrinsic::ACLEIntrinsic(EmitterBase &ME, const Record *R, } else if (Bounds->getName() == "IB_LaneIndex") { IA.boundsType = ImmediateArg::BoundsType::ExplicitRange; IA.i1 = 0; - IA.i2 = 128 / Param->sizeInBits()

[clang] [clang] Fix division by zero in ACLEIntrinsic constructor (PR #115883)

2024-11-13 Thread Mariya Podchishchaeva via cfe-commits
@@ -1415,7 +1415,10 @@ ACLEIntrinsic::ACLEIntrinsic(EmitterBase &ME, const Record *R, } else if (Bounds->getName() == "IB_LaneIndex") { IA.boundsType = ImmediateArg::BoundsType::ExplicitRange; IA.i1 = 0; - IA.i2 = 128 / Param->sizeInBits()

[clang] [Clang] enhance diagnostic by attaching source location to deduced type in trailing return without auto (PR #115786)

2024-11-12 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon approved this pull request. Thanks! This looks great https://github.com/llvm/llvm-project/pull/115786 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] enhance diagnostic by attaching source location to deduced type in trailing return without auto (PR #115786)

2024-11-12 Thread Mariya Podchishchaeva via cfe-commits
@@ -4887,9 +4887,20 @@ static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state, cast(T)->getKeyword() != AutoTypeKeyword::Auto || cast(T)->isConstrained())) { -S.Diag(D.getDecl

[clang] [Clang] skip shadow warnings for enum constants in distinct class scopes (PR #115656)

2024-11-12 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon approved this pull request. LGTM, in case @Sirraide and @AaronBallman don't have any further comments. https://github.com/llvm/llvm-project/pull/115656 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.l

[clang] [C2y] Add test coverage and documentation for WG14 N3341 (PR #115478)

2024-11-08 Thread Mariya Podchishchaeva via cfe-commits
@@ -191,7 +191,7 @@ C2y implementation status Slay Some Earthly Demons III https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3341.pdf";>N3341 - Unknown + Yes Fznamznon wrote: I wonder why the patch comes with release note, yet the of

[clang] [Clang] enhance diagnostic by attaching source location to deduced type in trailing return without auto (PR #115786)

2024-11-12 Thread Mariya Podchishchaeva via cfe-commits
@@ -4887,9 +4887,18 @@ static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state, cast(T)->getKeyword() != AutoTypeKeyword::Auto || cast(T)->isConstrained())) { -S.Diag(D.getDecl

[clang] [clang][FMV] Fix crash with cpu_specific attribute. (PR #115762)

2024-11-12 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: > Wouldn't mind it if @Fznamznon took a look though, IIRC, she did a bunch of > work with cpu_specific/cpu_dispatch. I don't think I did. I'm not familiar with this area to provide any opinion. https://github.com/llvm/llvm-project/pull/115762 _

[clang] [Clang] enhance diagnostic by attaching source location to deduced type in trailing return without auto (PR #115786)

2024-11-12 Thread Mariya Podchishchaeva via cfe-commits
@@ -652,6 +652,7 @@ Bug Fixes to C++ Support an implicitly instantiated class template specialization. (#GH51051) - Fixed an assertion failure caused by invalid enum forward declarations. (#GH112208) - Name independent data members were not correctly initialized from default

[clang] [Clang] enhance diagnostic by attaching source location to deduced type in trailing return without auto (PR #115786)

2024-11-12 Thread Mariya Podchishchaeva via cfe-commits
@@ -4887,9 +4887,18 @@ static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state, cast(T)->getKeyword() != AutoTypeKeyword::Auto || cast(T)->isConstrained())) { -S.Diag(D.getDecl

[clang] [Clang] enhance diagnostic by attaching source location to deduced type in trailing return without auto (PR #115786)

2024-11-12 Thread Mariya Podchishchaeva via cfe-commits
@@ -4887,9 +4887,18 @@ static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state, cast(T)->getKeyword() != AutoTypeKeyword::Auto || cast(T)->isConstrained())) { -S.Diag(D.getDecl

[clang] [Clang] enhance diagnostic by attaching source location to deduced type in trailing return without auto (PR #115786)

2024-11-12 Thread Mariya Podchishchaeva via cfe-commits
@@ -4887,9 +4887,18 @@ static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state, cast(T)->getKeyword() != AutoTypeKeyword::Auto || cast(T)->isConstrained())) { -S.Diag(D.getDecl

[clang] [Clang] skip shadow warnings for enum constants in distinct class scopes (PR #115656)

2024-11-12 Thread Mariya Podchishchaeva via cfe-commits
@@ -8341,6 +8341,11 @@ void Sema::CheckShadow(NamedDecl *D, NamedDecl *ShadowedDecl, // shadowing context, but that's just a false negative. } + // Skip shadowing check if we're in a class scope, dealing with an enum + // constant in a different context. + if (S->isC

[clang] [clang][NFC] add release note for n3030 support (PR #115648)

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

[clang] [clang] Fix static analyzer concerns (PR #110243)

2024-09-27 Thread Mariya Podchishchaeva via cfe-commits
@@ -9195,7 +9195,7 @@ static bool checkOpenMPIterationSpace( SemaRef.Diag(CollapseLoopCountExpr->getExprLoc(), diag::note_omp_collapse_ordered_expr) << 0 << CollapseLoopCountExpr->getSourceRange(); - else + else if (OrderedLoop

[clang] [clang] Fix static analyzer concerns (PR #110243)

2024-09-27 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon created https://github.com/llvm/llvm-project/pull/110243 It seems in checkOpenMPIterationSpace `OrderedLoopCountExpr` can also be null, so check before dereferencing. >From 314a8f4d4f8e003881bed0c320f9ee80ba0b8f8c Mon Sep 17 00:00:00 2001 From: "Podchishchaeva, Mar

[clang] [clang] Fix static analyzer concerns (PR #110243)

2024-09-27 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon updated https://github.com/llvm/llvm-project/pull/110243 >From 314a8f4d4f8e003881bed0c320f9ee80ba0b8f8c Mon Sep 17 00:00:00 2001 From: "Podchishchaeva, Mariya" Date: Fri, 27 Sep 2024 04:00:31 -0700 Subject: [PATCH] [clang] Fix static analyzer concerns It seems in c

[clang] [clang] Fix static analyzer concerns (PR #110243)

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

[clang] [clang] Fix static analyzer concerns (PR #110243)

2024-09-30 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: > LLVM Buildbot has detected a new failure on builder > openmp-offload-amdgpu-runtime running on omp-vega20-0 while building clang at > step 7 "Add check check-offload". That seems to be failing the same way for some other PRs. https://github.com/llvm/llvm-project/pull/110243

[clang] [clang][C23] Claim N3030 Enhancements to Enumerations supported (PR #107260)

2024-09-18 Thread Mariya Podchishchaeva via cfe-commits
@@ -0,0 +1,95 @@ +// RUN: %clang_cc1 -verify -triple x86_64-unknown-linux-gnu -fsyntax-only --embed-dir=%S/Inputs -std=c23 %s -pedantic -Wall + +#include + +enum us : unsigned short { + us_max = USHRT_MAX, + us_violation, // expected-error {{enumerator value 65536 is not rep

[clang] [clang][C23] Claim N3030 Enhancements to Enumerations supported (PR #107260)

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

[clang] [clang] Fix C23 constexpr crashes (PR #112708)

2024-10-17 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon updated https://github.com/llvm/llvm-project/pull/112708 >From c40ea631fc1ec226b644b1df2d1dca1c8646c992 Mon Sep 17 00:00:00 2001 From: "Podchishchaeva, Mariya" Date: Thu, 17 Oct 2024 06:43:13 -0700 Subject: [PATCH 1/2] [clang] Fix C23 constexpr crashes Before using

[clang] [Clang] [Sema] Reject non-power-of-2 `_BitInt` matrix element types (PR #117487)

2024-11-25 Thread Mariya Podchishchaeva via cfe-commits
@@ -2312,6 +2312,18 @@ QualType Sema::BuildArrayType(QualType T, ArraySizeModifier ASM, return T; } +bool CheckBitIntElementType(Sema &S, SourceLocation AttrLoc, +const BitIntType *BIT, bool ForMatrixType = false) { + // Only support _BitInt el

[clang] [Clang] [Sema] Reject non-power-of-2 `_BitInt` matrix element types (PR #117487)

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

[clang] [Clang] [Sema] Reject non-power-of-2 `_BitInt` matrix element types (PR #117487)

2024-11-25 Thread Mariya Podchishchaeva via cfe-commits
@@ -2455,6 +2456,10 @@ QualType Sema::BuildMatrixType(QualType ElementTy, Expr *NumRows, Expr *NumCols, return QualType(); } + if (const auto *BIT = ElementTy->getAs(); + BIT && CheckBitIntElementType(*this, AttrLoc, BIT, true)) Fznamznon wrote:

[clang] [Clang] [Sema] Reject non-power-of-2 `_BitInt` matrix element types (PR #117487)

2024-11-25 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon commented: It feels like that the non-power-of-2 _BitInt vectors were disabled because it wasn't known how to handle them. https://reviews.llvm.org/D133634#3793653 It probably is still so, however, does it make sense to document the new behavior? Hopefully also, si

[clang] [clang] constexpr built-in reduce mul function. (PR #116626)

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

[clang] [clang] constexpr built-in reduce add function. (PR #116243)

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

[clang] [clang] constexpr built-in reduce add function. (PR #116243)

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

[clang] [clang] constexpr built-in reduce add function. (PR #116243)

2024-11-18 Thread Mariya Podchishchaeva via cfe-commits
@@ -13528,6 +13528,24 @@ bool IntExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, return Success(DidOverflow, E); } + case Builtin::BI__builtin_reduce_add: { +APValue Source; +if (!EvaluateAsRValue(Info, E->getArg(0), Source)) + return false; + +

[clang] [clang] constexpr built-in reduce and function. (PR #116822)

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

[clang] [Clang] enhance error recovery with RecoveryExpr for trailing commas in call arguments (PR #114684)

2024-11-20 Thread Mariya Podchishchaeva via cfe-commits
@@ -2890,8 +2890,9 @@ Decl *Parser::ParseDeclarationAfterDeclaratorAndAttributes( // ProduceConstructorSignatureHelp only on VarDecls. ExpressionStarts = SetPreferredType; } - -bool SawError = ParseExpressionList(Exprs, ExpressionStarts); +bool HasTrail

[clang] [Clang] Consider preferred_type in bitfield warnings (#116760) (PR #116785)

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

[clang] [Clang] Consider preferred_type in bitfield warnings (#116760) (PR #116785)

2024-11-20 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon commented: Perhaps a release note makes sense. https://github.com/llvm/llvm-project/pull/116785 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Consider preferred_type in bitfield warnings (#116760) (PR #116785)

2024-11-20 Thread Mariya Podchishchaeva via cfe-commits
@@ -10509,14 +10516,18 @@ static bool AnalyzeBitFieldAssignment(Sema &S, FieldDecl *Bitfield, Expr *Init, ED->getNumPositiveBits() == FieldWidth) { DiagID = diag::warn_signed_bitfield_enum_conversion; } - + unsigned PreferredTypeDiagIndex =

[clang] [Clang] Consider preferred_type in bitfield warnings (#116760) (PR #116785)

2024-11-20 Thread Mariya Podchishchaeva via cfe-commits
@@ -10530,9 +10541,13 @@ static bool AnalyzeBitFieldAssignment(Sema &S, FieldDecl *Bitfield, Expr *Init, if (BitsNeeded > FieldWidth) { Expr *WidthExpr = Bitfield->getBitWidth(); S.Diag(InitLoc, diag::warn_bitfield_too_small_for_enum) -<< Bitf

[clang] [clang] constexpr built-in elementwise popcount function. (PR #117473)

2024-11-25 Thread Mariya Podchishchaeva via cfe-commits
@@ -797,3 +797,21 @@ static_assert(__builtin_reduce_xor((vector4int){(int)0x, (int)0x static_assert(__builtin_reduce_xor((vector4long){(long long)0xL, (long long)0xL, (long long)0xL, (long long)0xL

[clang] [clang] constexpr built-in elementwise popcount function. (PR #117473)

2024-11-25 Thread Mariya Podchishchaeva via cfe-commits
@@ -11302,6 +11303,35 @@ static bool handleVectorElementCast(EvalInfo &Info, const FPOptions FPO, return false; } +bool VectorExprEvaluator::VisitCallExpr(const CallExpr *E) { + if (!IsConstantEvaluatedBuiltinCall(E)) +return ExprEvaluatorBaseTy::VisitCallExpr(E); + +

[clang] [clang][NFCI] Clarify ownership of PragmaHandlers (PR #117703)

2024-11-26 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: > Can you share what the Static assert complaint is that makes you think we > should be doing this? The complaint is that `Preprocessor::addPragmaHandler` called from parser with a raw ptr argument coming from a `unique_ptr` owned by Parser actually initializes another `uniqu

[clang] [clang] Implement statement printer for EmbedExpr (PR #117770)

2024-11-27 Thread Mariya Podchishchaeva via cfe-commits
@@ -3902,6 +3902,8 @@ void Preprocessor::HandleEmbedDirectiveImpl( } EmbedAnnotationData *Data = new (BP) EmbedAnnotationData; + Data->Filename = Filename; + Data->IsAngled = IsAngled; Data->BinaryData = BinaryContents; Fznamznon wrote: I struggle to

[clang] [clang] Implement statement printer for EmbedExpr (PR #117770)

2024-11-27 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon commented: Thank you for the fix! I wonder if the new change be tested somehow? Also, we probably need to update Serialization code with handling for the new fields of `EmbedExpr`. https://github.com/llvm/llvm-project/pull/117770

[clang] [clang] Implement statement printer for EmbedExpr (PR #117770)

2024-11-27 Thread Mariya Podchishchaeva via cfe-commits
@@ -3902,6 +3902,8 @@ void Preprocessor::HandleEmbedDirectiveImpl( } EmbedAnnotationData *Data = new (BP) EmbedAnnotationData; + Data->Filename = Filename; + Data->IsAngled = IsAngled; Data->BinaryData = BinaryContents; Fznamznon wrote: None that I c

[clang] [clang] constexpr built-in elementwise bitreverse function. (PR #118177)

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

[clang] [clang] constexpr built-in elementwise popcount function. (PR #117473)

2024-11-25 Thread Mariya Podchishchaeva via cfe-commits
@@ -666,40 +666,16 @@ void test_builtin_elementwise_log2(float f1, float f2, double d1, double d2, vf2 = __builtin_elementwise_log2(vf1); } -void test_builtin_elementwise_popcount(si8 vi1, si8 vi2, - long long int i1, long long int i2, short

[clang] [Clang] [Sema] Support matrix types in pseudo-destructor expressions (PR #117483)

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

[clang] [Clang] [Sema] Support matrix types in pseudo-destructor expressions (PR #117483)

2024-11-25 Thread Mariya Podchishchaeva via cfe-commits
@@ -0,0 +1,19 @@ +// RUN: %clang_cc1 -fsyntax-only -fenable-matrix -std=c++11 -verify %s +// expected-no-diagnostics + +template +void f() { + T().~T(); +} Fznamznon wrote: Does that work too? ``` template void f1(T *f) { T->~T(); (*T).~T(); } void test(ma

[clang] [Clang] [Sema] Support matrix types in pseudo-destructor expressions (PR #117483)

2024-11-25 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon commented: This looks reasonable. Does it make sense to add a sanity test for codegen? I.e. so there is no crashes/assertions and no attempts to generate anything https://github.com/llvm/llvm-project/pull/117483 ___ cfe-co

[clang] [clang] constexpr built-in elementwise popcount function. (PR #117473)

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

[clang] [clang][NFCI] Clarify ownership of PragmaHandlers (PR #117703)

2024-11-26 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon created https://github.com/llvm/llvm-project/pull/117703 Initially found by static analysis tool, the situation with the same memory "owned" by two different uniqie_ptrs (one in Parser, another one in a PragmaNamespace that is owned by Preprocessor) DOES seem like

[clang] [Clang] Deleting an incomplete enum type is not an error (PR #118455)

2024-12-03 Thread Mariya Podchishchaeva via cfe-commits
@@ -540,6 +540,14 @@ namespace PR10504 { void f(A *x) { delete x; } // expected-warning {{delete called on 'PR10504::A' that is abstract but has non-virtual destructor}} } +#if __cplusplus >= 201103L +enum GH99278_1 { // expected-note {{definition of 'GH99278_1' is not comp

[clang] [clang] Apply internal buffering to clang diagnostics printing (PR #113440)

2024-12-03 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: Ping? Does that make sense? If so, I'll try to figure clangd output swap that caused lit fail (which seems harmless). If not, I'll abandon this. https://github.com/llvm/llvm-project/pull/113440 ___ cfe-commits mailing list cfe-commits

[clang] [clang] Apply internal buffering to clang diagnostics printing (PR #113440)

2024-12-04 Thread Mariya Podchishchaeva via cfe-commits
@@ -656,15 +656,19 @@ static bool printWordWrapped(raw_ostream &OS, StringRef Str, unsigned Columns, TextDiagnostic::TextDiagnostic(raw_ostream &OS, const LangOptions &LangOpts, DiagnosticOptions *DiagOpts, const Pr

<    1   2   3   4   5   6   7   8   9   10   >