[clang] [Clang] [C++26] Implement P2573R2: `= delete("should have a reason");` (PR #86526)

2024-03-26 Thread Mariya Podchishchaeva via cfe-commits
@@ -873,9 +873,14 @@ void DeclPrinter::VisitFunctionDecl(FunctionDecl *D) { if (D->isPureVirtual()) Out << " = 0"; - else if (D->isDeletedAsWritten()) + else if (D->isDeletedAsWritten()) { Out << " = delete"; - else if (D->isExplicitlyDefaulted()) +if (const

[clang] [Clang] [C++26] Implement P2573R2: `= delete("should have a reason");` (PR #86526)

2024-03-26 Thread Mariya Podchishchaeva via cfe-commits
@@ -1936,6 +1936,9 @@ void TextNodeDumper::VisitFunctionDecl(const FunctionDecl *D) { if (D->isTrivial()) OS << " trivial"; + if (const auto *M = D->getDeletedMessage()) Fznamznon wrote: Here too. ```suggestion if (const StringLiteral *M = D->getDe

[clang] [C23] Implement N3018: The constexpr specifier for object definitions (PR #73099)

2024-03-05 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: > Please let me know your thoughts. @AaronBallman , implemented in https://github.com/llvm/llvm-project/pull/73099/commits/dff61e0f49d0ba0d868f4e9668f75718b031e1e3 . I was mostly referring to the original page https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3018.htm when im

[clang] [Clang][C++23] Implement P2448R2: Relaxing some constexpr restrictions (PR #77753)

2024-03-05 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: So, I've spent some time on it, and it turns out that because of current design choices supporting the whole feature in older language modes and not loosing any warnings/errors happens to be a much more significant change. For example, due to the fact that constexprness of cons

[clang] [Clang][C++23] Implement P2448R2: Relaxing some constexpr restrictions (PR #77753)

2024-03-05 Thread Mariya Podchishchaeva via cfe-commits
@@ -9108,7 +9123,8 @@ bool Sema::CheckExplicitlyDefaultedComparison(Scope *S, FunctionDecl *FD, // declaration, it is implicitly considered to be constexpr. // FIXME: Only applying this to the first declaration seems problematic, as // simple reorderings can affect the

[clang] [Clang][C++23] Implement P2448R2: Relaxing some constexpr restrictions (PR #77753)

2024-03-05 Thread Mariya Podchishchaeva via cfe-commits
@@ -356,14 +356,7 @@ C++23 implementation status Relaxing some constexpr restrictions https://wg21.link/P2448R2";>P2448R2 - -Clang 17 (Partial) - We do not support outside of defaulted special memeber functions the change that constexpr f

[clang] [C23] Implement N3018: The constexpr specifier for object definitions (PR #73099)

2024-03-05 Thread Mariya Podchishchaeva via cfe-commits
@@ -414,20 +415,42 @@ NarrowingKind StandardConversionSequence::getNarrowingKind( if (Initializer->isValueDependent()) return NK_Dependent_Narrowing; - if (Initializer->isCXX11ConstantExpr(Ctx, &ConstantValue)) { + Expr::EvalResult R; + if ((Ctx.g

[clang] [Clang][C++23] Implement P2448R2: Relaxing some constexpr restrictions (PR #77753)

2024-03-05 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: Okay then, could you please review or give me an LGTM if everything is ok? The patch transformed a bit since it was first approved. It doesn't enable feature as extension now, it incorporates changes and test highlighted by https://github.com/llvm/llvm-project/pull/77753#issue

[clang] [C23] Implement N3018: The constexpr specifier for object definitions (PR #73099)

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

[clang] [Clang][C++23] Implement P2448R2: Relaxing some constexpr restrictions (PR #77753)

2024-03-06 Thread Mariya Podchishchaeva via cfe-commits
@@ -2809,10 +2813,13 @@ def note_non_literal_virtual_base : Note<"%select{struct|interface|class}0 " "with virtual base %plural{1:class|:classes}1 is not a literal type">; def note_constexpr_virtual_base_here : Note<"virtual base class declared here">; def err_constexpr_non

[clang] [Clang][C++23] Implement P2448R2: Relaxing some constexpr restrictions (PR #77753)

2024-03-06 Thread Mariya Podchishchaeva via cfe-commits
@@ -2774,9 +2774,13 @@ def err_constexpr_tag : Error< def err_constexpr_dtor : Error< "destructor cannot be declared %sub{select_constexpr_spec_kind}0">; def err_constexpr_dtor_subobject : Error< - "destructor cannot be declared %sub{select_constexpr_spec_kind}0 because " +

[clang] [Clang][C++23] Implement P2448R2: Relaxing some constexpr restrictions (PR #77753)

2024-03-06 Thread Mariya Podchishchaeva via cfe-commits
@@ -2809,10 +2813,13 @@ def note_non_literal_virtual_base : Note<"%select{struct|interface|class}0 " "with virtual base %plural{1:class|:classes}1 is not a literal type">; def note_constexpr_virtual_base_here : Note<"virtual base class declared here">; def err_constexpr_non

[clang] [Clang][C++23] Implement P2448R2: Relaxing some constexpr restrictions (PR #77753)

2024-03-06 Thread Mariya Podchishchaeva via cfe-commits
@@ -2809,10 +2813,13 @@ def note_non_literal_virtual_base : Note<"%select{struct|interface|class}0 " "with virtual base %plural{1:class|:classes}1 is not a literal type">; def note_constexpr_virtual_base_here : Note<"virtual base class declared here">; def err_constexpr_non

[clang] [Clang][C++23] Implement P2448R2: Relaxing some constexpr restrictions (PR #77753)

2024-03-06 Thread Mariya Podchishchaeva via cfe-commits
@@ -2809,10 +2813,13 @@ def note_non_literal_virtual_base : Note<"%select{struct|interface|class}0 " "with virtual base %plural{1:class|:classes}1 is not a literal type">; def note_constexpr_virtual_base_here : Note<"virtual base class declared here">; def err_constexpr_non

[clang] [Clang][C++23] Implement P2448R2: Relaxing some constexpr restrictions (PR #77753)

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

[clang] [clang] Error on explicit specialization of lambda call operator (PR #84343)

2024-03-07 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon created https://github.com/llvm/llvm-project/pull/84343 Fixes https://github.com/llvm/llvm-project/issues/83267 >From 9c2fccb61a058385171415f863eaccb666e7b120 Mon Sep 17 00:00:00 2001 From: "Podchishchaeva, Mariya" Date: Thu, 7 Mar 2024 08:56:35 -0800 Subject: [PAT

[clang] [clang] Error on explicit specialization of lambda call operator (PR #84343)

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

[clang] [clang] Error on explicit specialization of lambda call operator (PR #84343)

2024-03-08 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: > Can we please get more descriptive summaries in the future. Sure, sorry about that. https://github.com/llvm/llvm-project/pull/84343 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[clang] [Clang][C++23] Implement P2448R2: Relaxing some constexpr restrictions (PR #77753)

2024-03-11 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: > to fail, which I think is not intentional? No, it is not. Fails only for c++23 now. I'm looking. https://github.com/llvm/llvm-project/pull/77753 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin

[clang] [Clang][C++23] Implement P2448R2: Relaxing some constexpr restrictions (PR #77753)

2024-03-11 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: Ok, now I looked at it a bit more, and I think this is expected due to the change and how clang behaved before this patch. After this patch implicit destructor of S, i.e. `~S` becomes `constexpr`. It used to be not `constexpr` because neither `P` nor `B` had `constexpr` destru

[clang] [Clang][C++23] Implement P2448R2: Relaxing some constexpr restrictions (PR #77753)

2024-03-14 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: > I looked at this a bit and the change that increases the constexpr > restrictions is that ext_defaulted_comparison_constexpr_mismatch (which was > added in https://reviews.llvm.org/D146090) became > err_incorrect_defaulted_comparison_constexpr? Yes, it was intentional chang

[clang] [clang] Lower _BitInt(129+) to a different type in LLVM IR (PR #91364)

2024-05-07 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon created https://github.com/llvm/llvm-project/pull/91364 Currently for i128:128 targets correct implementation is possible either for __int128 or for _BitInt(129+) with lowering to iN, but not both. Since we have now correct implementation of __int128 in place afte

[clang] [clang] Lower _BitInt(129+) to a different type in LLVM IR (PR #91364)

2024-05-08 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: Thank you everyone for the feedback. I'm working on applying. https://github.com/llvm/llvm-project/pull/91364 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[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] [libcxx] [llvm] [compiler-rt] [mlir] [libcxxabi] [flang] [clang-tools-extra] [libc] [openmp] [clang] Avoid -Wshadow warning when init-capture named same as class field (PR #74512)

2023-12-11 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon updated https://github.com/llvm/llvm-project/pull/74512 >From 169d962b64b8ae242c3a6d332677296cf7503839 Mon Sep 17 00:00:00 2001 From: "Podchishchaeva, Mariya" Date: Tue, 5 Dec 2023 10:28:44 -0800 Subject: [PATCH 1/3] [clang] Avoid -Wshadow warning when init-capture

[clang] fix issue 73559. (PR #74926)

2023-12-11 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon commented: Could you please add a test, somewhere in `clang/test/Parser` (there is also a lot of other tests showing how it is done) and a release note to `clang/docs/ReleaseNotes.rst`, perhaps at the end of the list under `Bug Fixes in This Version` heading. http

[clang] fix issue 73559. (PR #74926)

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

[clang] fix issue 73559. (PR #74926)

2023-12-11 Thread Mariya Podchishchaeva via cfe-commits
@@ -2702,7 +2702,7 @@ Parser::ParseCXXClassMemberDeclaration(AccessSpecifier AS, bool MalformedTypeSpec = false; if (!TemplateInfo.Kind && Tok.isOneOf(tok::identifier, tok::coloncolon, tok::kw___super)) { -if (TryAnnotateCXXScopeToken()) +if (getLangOpts().CPl

[mlir] [clang] [llvm] [libcxxabi] [clang-tools-extra] [libc] [compiler-rt] [openmp] [flang] [libcxx] [clang] Avoid -Wshadow warning when init-capture named same as class field (PR #74512)

2023-12-11 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: > The whole point of the shadowing warning is to avoid confusion about which > variable is actually used, which IMO could very well be the case here. In the case that is being fixed, a field is not available in lambda's body without capturing this, so there is no such confusi

[clang] [clang] Substitute alias templates from correct context (PR #75069)

2023-12-11 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon created https://github.com/llvm/llvm-project/pull/75069 Current context set to where alias was met, not where it is declared caused incorrect access check in case alias referenced private members of the parent class. This is a recommit of 6b1aa31 with a slight modi

[clang] [clang] Substitute alias templates from correct context (PR #75069)

2023-12-11 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: > Can you point out the diff from the previous patch? To fix the following case: ``` // Test case that regressed with the first iteration of the fix template class SP { T* data; }; template class A { static SP foo(); }; template using TRet = SP>; template TRet A::fo

[clang] [clang] Substitute alias templates from correct context (PR #75069)

2023-12-12 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon updated https://github.com/llvm/llvm-project/pull/75069 >From d0bfa140bdfa2be213151d4d17263bb60e6b46d3 Mon Sep 17 00:00:00 2001 From: "Podchishchaeva, Mariya" Date: Mon, 11 Dec 2023 08:31:15 -0800 Subject: [PATCH 1/2] [clang] Substitute alias templates from correct

[libc] [libcxx] [flang] [clang] [libcxxabi] [compiler-rt] [openmp] [clang-tools-extra] [llvm] [mlir] [clang] Avoid -Wshadow warning when init-capture named same as class field (PR #74512)

2023-12-12 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: @cor3ntin , @shafik WDYT about > I have a concern, that probably in case when this is actually captured, with > current implementation of the patch there will be no warning as well. Should we still emit shadowing warning in case lambda captured this and has an init-capture wi

[compiler-rt] [clang] [lld] [llvm] [openmp] [clang-tools-extra] [libcxx] [lldb] [libc] [flang] [mlir] fix issue 73559. (PR #74926)

2023-12-12 Thread Mariya Podchishchaeva via cfe-commits
@@ -3,3 +3,4 @@ // PR9137 void f0(int x) : {}; // expected-error{{expected function body after function declarator}} void f1(int x) try {}; // expected-error{{expected function body after function declarator}} +::; // expected-error{{expected identifier or '('}} -

[flang] [llvm] [mlir] [openmp] [clang-tools-extra] [clang] [lldb] [libc] [lld] [compiler-rt] [libcxx] fix issue 73559. (PR #74926)

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

[llvm] [openmp] [lld] [mlir] [lldb] [flang] [libc] [compiler-rt] [clang] [libcxx] [clang-tools-extra] fix issue 73559. (PR #74926)

2023-12-12 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon commented: The PR can be landed after a formal approval. Please see https://llvm.org/docs/CodeReview.html#lgtm-how-a-patch-is-accepted . I gave a couple of NITs otherwise the patch looks ok to me. I'm a bit new here, so someone else should approve. I added more fol

[compiler-rt] [clang-tools-extra] [libcxx] [lldb] [llvm] [openmp] [flang] [mlir] [clang] [libc] [lld] fix issue 73559. (PR #74926)

2023-12-12 Thread Mariya Podchishchaeva via cfe-commits
@@ -641,6 +641,8 @@ Bug Fixes in This Version Fixes (`#67317 `_) - Clang now properly diagnoses use of stand-alone OpenMP directives after a label (including ``case`` or ``default`` labels). +- Fix crash when using C++ only

[compiler-rt] [clang-tools-extra] [libcxx] [llvm] [libunwind] [lldb] [openmp] [libcxxabi] [flang] [mlir] [clang] [libc] [lld] [C23] Implement N3018: The constexpr specifier for object definitions (PR

2023-12-12 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon updated https://github.com/llvm/llvm-project/pull/73099 >From 1d70b7726e7d1f11622a6d5c8246b0737e024c8d Mon Sep 17 00:00:00 2001 From: "Podchishchaeva, Mariya" Date: Tue, 19 Sep 2023 08:37:18 -0700 Subject: [PATCH 1/9] [C23] Implement N3018: The constexpr specifier f

[compiler-rt] [clang-tools-extra] [libcxx] [llvm] [libunwind] [lldb] [openmp] [libcxxabi] [flang] [mlir] [clang] [libc] [lld] [C23] Implement N3018: The constexpr specifier for object definitions (PR

2023-12-12 Thread Mariya Podchishchaeva via cfe-commits
@@ -0,0 +1,287 @@ +// RUN: %clang_cc1 -std=c2x -verify -triple x86_64 -pedantic -Wno-conversion -Wno-constant-conversion -Wno-div-by-zero %s + +// Check that constexpr only applies to variables. +constexpr void f0() {} // expected-error {{'constexpr' can only be used in variable

[clang-tools-extra] [llvm] [clang] [clang] Fix false positive -Wmissing-field-initializer for anonymous unions (PR #70829)

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

[clang] [clang] Substitute alias templates from correct context (PR #75069)

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

[clang-tools-extra] [flang] [llvm] [libc] [libunwind] [lldb] [openmp] [libcxxabi] [libcxx] [mlir] [compiler-rt] [clang] [lld] [C23] Implement N3018: The constexpr specifier for object definitions (PR

2023-12-13 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: Adding more reviewers since Aaron is on vacation... https://github.com/llvm/llvm-project/pull/73099 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Report narrowing conversions with const references (PR #75332)

2023-12-13 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon created https://github.com/llvm/llvm-project/pull/75332 Fixes https://github.com/llvm/llvm-project/issues/63151 >From d0a7276eb8014693656d3d931616d56ffe46730c Mon Sep 17 00:00:00 2001 From: "Podchishchaeva, Mariya" Date: Wed, 13 Dec 2023 04:25:12 -0800 Subject: [PA

[clang] [clang] Report narrowing conversions with const references (PR #75332)

2023-12-13 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: Formatting trouble is intentional. https://github.com/llvm/llvm-project/pull/75332 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Report narrowing conversions with const references (PR #75332)

2023-12-13 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon updated https://github.com/llvm/llvm-project/pull/75332 >From d0a7276eb8014693656d3d931616d56ffe46730c Mon Sep 17 00:00:00 2001 From: "Podchishchaeva, Mariya" Date: Wed, 13 Dec 2023 04:25:12 -0800 Subject: [PATCH 1/2] [clang] Report narrowing conversions with const

[clang] [clang] Accept recursive non-dependent calls to functions with deduced return type (PR #75456)

2023-12-14 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon created https://github.com/llvm/llvm-project/pull/75456 Treat such calls as dependent since it is much easier to implement. Fixes https://github.com/llvm/llvm-project/issues/71015 >From 0e190f131862dd8f4b07891c3ee712a0a163f936 Mon Sep 17 00:00:00 2001 From: "Podchi

[clang] [clang] Accept recursive non-dependent calls to functions with deduced return type (PR #75456)

2023-12-14 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: This attempts to implement the approach described by @zygoloid in https://github.com/llvm/llvm-project/issues/71015#issuecomment-1828745626 . https://github.com/llvm/llvm-project/pull/75456 ___ cfe-commits mailing list cfe-commits@lis

[clang] [clang] Report narrowing conversions with const references (PR #75332)

2023-12-14 Thread Mariya Podchishchaeva via cfe-commits
@@ -10431,7 +10437,7 @@ static void DiagnoseNarrowingInInitList(Sema &S, : diag::warn_init_list_type_narrowing) << PostInit->getSourceRange() << PreNarrowingType.getLocalUnqualifiedType() -<< EntityType.getLocalUnq

[clang] [clang] Report narrowing conversions with const references (PR #75332)

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

[clang] [clang] Report narrowing conversions with const references (PR #75332)

2023-12-14 Thread Mariya Podchishchaeva via cfe-commits
@@ -10431,7 +10437,7 @@ static void DiagnoseNarrowingInInitList(Sema &S, : diag::warn_init_list_type_narrowing) << PostInit->getSourceRange() << PreNarrowingType.getLocalUnqualifiedType() -<< EntityType.getLocalUnq

[clang] [clang] Report narrowing conversions with const references (PR #75332)

2023-12-14 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon updated https://github.com/llvm/llvm-project/pull/75332 >From d0a7276eb8014693656d3d931616d56ffe46730c Mon Sep 17 00:00:00 2001 From: "Podchishchaeva, Mariya" Date: Wed, 13 Dec 2023 04:25:12 -0800 Subject: [PATCH 1/3] [clang] Report narrowing conversions with const

[clang] [clang] Report narrowing conversions with const references (PR #75332)

2023-12-14 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: > Looks like you got what I meant anyway, and we WERE just passionately > agreeing with eachother :) LGTM. Thanks! Probably I was being a bit slow, lol https://github.com/llvm/llvm-project/pull/75332 ___ cfe-commits mailing list cfe-

[clang] [clang] Substitute alias templates from correct context (PR #75069)

2023-12-14 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: @rupprecht , no, this is not expected. Please feel free to revert since it is night in my time zone. Otherwise I will revert tomorrow. https://github.com/llvm/llvm-project/pull/75069 ___ cfe-commits mailing list cfe-commits@lists.llvm

[clang] [clang] Report narrowing conversions with const references (PR #75332)

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

[clang] [clang] Fix CTAD not respect default template arguments that were added after the definition. (PR #75569)

2023-12-15 Thread Mariya Podchishchaeva via cfe-commits
@@ -685,6 +685,8 @@ Bug Fixes in This Version (`#62157 `_) and (`#64885 `_) and (`#65568 `_) +- Fix an issue where clan

[llvm] [clang] [clang-tools-extra] [clang] Fix false positive -Wmissing-field-initializer for anonymous unions (PR #70829)

2023-12-15 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: @mikaelholmen , thanks for the report. These warnings are kind of expected, there is no big difference between `struct S1 s01 = { 1, {1} };` and `struct S1 s02 = { .d1.a = 1 };` in both cases field `b` of `d1` is not initialized. But they are not expected for C, since we aim t

[clang] [clang] Fix unexpected warnings after a01307a (PR #75591)

2023-12-15 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon created https://github.com/llvm/llvm-project/pull/75591 a01307a broke silencing of -Wmissing-field-initializers warnings in C for nested designators. This fixes the issue. >From 7d93f51878c495e245ce21d4be97c4ca7cddd404 Mon Sep 17 00:00:00 2001 From: "Podchishchaeva

[clang] [clang] Fix unexpected warnings after a01307a (PR #75591)

2023-12-15 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon updated https://github.com/llvm/llvm-project/pull/75591 >From 7d93f51878c495e245ce21d4be97c4ca7cddd404 Mon Sep 17 00:00:00 2001 From: "Podchishchaeva, Mariya" Date: Fri, 15 Dec 2023 04:05:41 -0800 Subject: [PATCH 1/2] [clang] Fix unexpected warnings after a01307a a

[clang] [clang] Fix unexpected warnings after a01307a (PR #75591)

2023-12-15 Thread Mariya Podchishchaeva via cfe-commits
@@ -864,6 +864,14 @@ InitListChecker::FillInEmptyInitializations(const InitializedEntity &Entity, WarnIfMissingField &= SemaRef.getLangOpts().CPlusPlus || !hasAnyDesignatedInits(SForm); + if (OuterILE) { Fznamznon wrote: Okay, sure. htt

[clang] [clang] Fix unexpected warnings after a01307a (PR #75591)

2023-12-15 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: > Ok, ideally this should be reviewed by someone who knows the code but it LGTM. I know, but a lot of folks are now on vacation already. The change is not complicated, so I'll probably wait till green pre-commit, then leave it for post-commit review to resolve the issue. http

[clang] [clang] Fix unexpected warnings after a01307a (PR #75591)

2023-12-15 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: Ok, adding more reviewers. Please feel free to do post-commit review. https://github.com/llvm/llvm-project/pull/75591 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix unexpected warnings after a01307a (PR #75591)

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

[clang] [clang-tools-extra] [llvm] [clang] Fix false positive -Wmissing-field-initializer for anonymous unions (PR #70829)

2023-12-18 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: @mikaelholmen , I see. I'll revert both patches to unblock you and I'll think about the proper solution after the holidays. Perhaps there should be wider discussion whether we should emulate GCC behavior regarding silencing of these warnings. IMO, the warnings you're seeing are

[clang] 831591b - [NFC][clang] Refine tests by adding `:` to checks

2023-03-01 Thread Mariya Podchishchaeva via cfe-commits
Author: Mariya Podchishchaeva Date: 2023-03-01T05:58:34-05:00 New Revision: 831591b2a075d86f7ae51d0f688af1ddcf360707 URL: https://github.com/llvm/llvm-project/commit/831591b2a075d86f7ae51d0f688af1ddcf360707 DIFF: https://github.com/llvm/llvm-project/commit/831591b2a075d86f7ae51d0f688af1ddcf3607

[clang] 2fbf18b - [clang] Fix aggregate initialization inside lambda constexpr

2023-03-06 Thread Mariya Podchishchaeva via cfe-commits
Author: Mariya Podchishchaeva Date: 2023-03-06T03:38:49-05:00 New Revision: 2fbf18b40026b46bd380fae58575cebbd9801ff4 URL: https://github.com/llvm/llvm-project/commit/2fbf18b40026b46bd380fae58575cebbd9801ff4 DIFF: https://github.com/llvm/llvm-project/commit/2fbf18b40026b46bd380fae58575cebbd9801f

[clang] af682f0 - [clang] Fix single-element array initialization in constexpr

2023-03-07 Thread Mariya Podchishchaeva via cfe-commits
Author: Mariya Podchishchaeva Date: 2023-03-07T10:57:35-05:00 New Revision: af682f0df83f3364dac7ab92f39c7209dfbce28a URL: https://github.com/llvm/llvm-project/commit/af682f0df83f3364dac7ab92f39c7209dfbce28a DIFF: https://github.com/llvm/llvm-project/commit/af682f0df83f3364dac7ab92f39c7209dfbce2

[clang] d0db54e - [clang] Update test according to P1937

2023-03-07 Thread Mariya Podchishchaeva via cfe-commits
Author: Mariya Podchishchaeva Date: 2023-03-07T11:30:25-05:00 New Revision: d0db54e0dd3272a044407a6394cae47c84cd3a70 URL: https://github.com/llvm/llvm-project/commit/d0db54e0dd3272a044407a6394cae47c84cd3a70 DIFF: https://github.com/llvm/llvm-project/commit/d0db54e0dd3272a044407a6394cae47c84cd3a

[clang] a2739f1 - [clang] Treat function parameter scope as an immediate function context

2023-03-07 Thread Mariya Podchishchaeva via cfe-commits
Author: Mariya Podchishchaeva Date: 2023-03-07T11:46:26-05:00 New Revision: a2739f111d9795fe49109c26c2d816436f2143c3 URL: https://github.com/llvm/llvm-project/commit/a2739f111d9795fe49109c26c2d816436f2143c3 DIFF: https://github.com/llvm/llvm-project/commit/a2739f111d9795fe49109c26c2d816436f2143

[clang] 83c90e6 - [clang] Fix consteval initializers of temporaries

2023-03-28 Thread Mariya Podchishchaeva via cfe-commits
Author: Mariya Podchishchaeva Date: 2023-03-28T07:41:53-04:00 New Revision: 83c90e623a308a6313783f320eeaabc7e3f9f4b2 URL: https://github.com/llvm/llvm-project/commit/83c90e623a308a6313783f320eeaabc7e3f9f4b2 DIFF: https://github.com/llvm/llvm-project/commit/83c90e623a308a6313783f320eeaabc7e3f9f4

[clang] 42ae055 - [NFC] Fix potential for use-after-free in DumpModuleInfoAction

2023-03-30 Thread Mariya Podchishchaeva via cfe-commits
Author: Mariya Podchishchaeva Date: 2023-03-30T06:44:23-04:00 New Revision: 42ae055b4c9282050636dd11198cad500424adf2 URL: https://github.com/llvm/llvm-project/commit/42ae055b4c9282050636dd11198cad500424adf2 DIFF: https://github.com/llvm/llvm-project/commit/42ae055b4c9282050636dd11198cad500424ad

[clang] a5e1a93 - [clang] Fix crash when handling nested immediate invocations

2023-04-05 Thread Mariya Podchishchaeva via cfe-commits
Author: Mariya Podchishchaeva Date: 2023-04-05T05:20:51-04:00 New Revision: a5e1a93ea10ffc06a32df6d9f410e9b297ed136d URL: https://github.com/llvm/llvm-project/commit/a5e1a93ea10ffc06a32df6d9f410e9b297ed136d DIFF: https://github.com/llvm/llvm-project/commit/a5e1a93ea10ffc06a32df6d9f410e9b297ed13

[clang] 55bbcbf - [clang] Reset track of immediate function context when entering new function

2023-04-06 Thread Mariya Podchishchaeva via cfe-commits
Author: Mariya Podchishchaeva Date: 2023-04-06T06:35:26-04:00 New Revision: 55bbcbf511b4df0dfe524b2d06fc561a939c6b16 URL: https://github.com/llvm/llvm-project/commit/55bbcbf511b4df0dfe524b2d06fc561a939c6b16 DIFF: https://github.com/llvm/llvm-project/commit/55bbcbf511b4df0dfe524b2d06fc561a939c6b

[clang] 9d9046f - [clang] Do not crash after suggesting typo correction to constexpr if condition

2023-04-17 Thread Mariya Podchishchaeva via cfe-commits
Author: Mariya Podchishchaeva Date: 2023-04-17T08:28:49-04:00 New Revision: 9d9046f06d55692c5be51164694a4959d9e212b2 URL: https://github.com/llvm/llvm-project/commit/9d9046f06d55692c5be51164694a4959d9e212b2 DIFF: https://github.com/llvm/llvm-project/commit/9d9046f06d55692c5be51164694a4959d9e212

[clang] 7c97dc2 - [clang] Do not crash on undefined template partial specialization

2023-04-27 Thread Mariya Podchishchaeva via cfe-commits
Author: Mariya Podchishchaeva Date: 2023-04-27T05:38:41-04:00 New Revision: 7c97dc20ab6148289f2cc01b2999130e32a19eb3 URL: https://github.com/llvm/llvm-project/commit/7c97dc20ab6148289f2cc01b2999130e32a19eb3 DIFF: https://github.com/llvm/llvm-project/commit/7c97dc20ab6148289f2cc01b2999130e32a19e

[clang] 0fb84bc - [clang] Diagnose shadowing of lambda's template parameter by a capture

2023-04-28 Thread Mariya Podchishchaeva via cfe-commits
Author: Mariya Podchishchaeva Date: 2023-04-28T07:26:30-04:00 New Revision: 0fb84bc7fdec1c20c2461e54d5c994939fe5b47f URL: https://github.com/llvm/llvm-project/commit/0fb84bc7fdec1c20c2461e54d5c994939fe5b47f DIFF: https://github.com/llvm/llvm-project/commit/0fb84bc7fdec1c20c2461e54d5c994939fe5b4

[clang] 7133283 - [clang] Do not attempt to zero-extend _BitInt(1) when not required

2023-05-02 Thread Mariya Podchishchaeva via cfe-commits
Author: Mariya Podchishchaeva Date: 2023-05-02T08:23:22-04:00 New Revision: 7133283835fbc260465e899ff86c07202486558a URL: https://github.com/llvm/llvm-project/commit/7133283835fbc260465e899ff86c07202486558a DIFF: https://github.com/llvm/llvm-project/commit/7133283835fbc260465e899ff86c0720248655

[clang] 22e2db6 - [clang] Reject flexible array member in a union in C++

2023-05-03 Thread Mariya Podchishchaeva via cfe-commits
Author: Mariya Podchishchaeva Date: 2023-05-03T08:54:35-04:00 New Revision: 22e2db6010b029ebd4c6d3d1fd30224d8b3109ef URL: https://github.com/llvm/llvm-project/commit/22e2db6010b029ebd4c6d3d1fd30224d8b3109ef DIFF: https://github.com/llvm/llvm-project/commit/22e2db6010b029ebd4c6d3d1fd30224d8b3109

[clang] 7178ee1 - Revert "[clang] Reject flexible array member in a union in C++"

2023-05-03 Thread Mariya Podchishchaeva via cfe-commits
Author: Mariya Podchishchaeva Date: 2023-05-03T09:25:03-04:00 New Revision: 7178ee190235bd5b6cc7c71d3ccc061d4b12656b URL: https://github.com/llvm/llvm-project/commit/7178ee190235bd5b6cc7c71d3ccc061d4b12656b DIFF: https://github.com/llvm/llvm-project/commit/7178ee190235bd5b6cc7c71d3ccc061d4b1265

[clang] 74fd474 - [clang] Evaluate non-type default template argument when it is required

2023-05-09 Thread Mariya Podchishchaeva via cfe-commits
Author: Mariya Podchishchaeva Date: 2023-05-09T04:21:46-04:00 New Revision: 74fd474eea53e85fc8f64422f565fd2bd50fd7e4 URL: https://github.com/llvm/llvm-project/commit/74fd474eea53e85fc8f64422f565fd2bd50fd7e4 DIFF: https://github.com/llvm/llvm-project/commit/74fd474eea53e85fc8f64422f565fd2bd50fd7

[clang] d4f4b2f - [clang] Fix sizeof of boolean vector

2023-01-26 Thread Mariya Podchishchaeva via cfe-commits
Author: Mariya Podchishchaeva Date: 2023-01-26T10:44:15-05:00 New Revision: d4f4b2fe21dddff023aeab775dd63b321e23f918 URL: https://github.com/llvm/llvm-project/commit/d4f4b2fe21dddff023aeab775dd63b321e23f918 DIFF: https://github.com/llvm/llvm-project/commit/d4f4b2fe21dddff023aeab775dd63b321e23f9

[clang] fe08212 - [clang][driver] Emit an error for `/clang:-x`

2023-02-02 Thread Mariya Podchishchaeva via cfe-commits
Author: Mariya Podchishchaeva Date: 2023-02-02T11:48:33-05:00 New Revision: fe082124faa8455cc9a68be5fdf10fc46a4d066c URL: https://github.com/llvm/llvm-project/commit/fe082124faa8455cc9a68be5fdf10fc46a4d066c DIFF: https://github.com/llvm/llvm-project/commit/fe082124faa8455cc9a68be5fdf10fc46a4d06

[clang] 108fa70 - [clang][driver] Fix test fail on Mac after fe082124

2023-02-02 Thread Mariya Podchishchaeva via cfe-commits
Author: Mariya Podchishchaeva Date: 2023-02-02T13:44:53-05:00 New Revision: 108fa70cd213e63a591adb87ce444fb74afc6786 URL: https://github.com/llvm/llvm-project/commit/108fa70cd213e63a591adb87ce444fb74afc6786 DIFF: https://github.com/llvm/llvm-project/commit/108fa70cd213e63a591adb87ce444fb74afc67

[clang] 1cee960 - [SYCL] Disallow explicit casts between mismatching address spaces

2022-02-07 Thread Mariya Podchishchaeva via cfe-commits
Author: Mariya Podchishchaeva Date: 2022-02-07T11:57:30+03:00 New Revision: 1cee9608982a866688434223bee44c878ea489b1 URL: https://github.com/llvm/llvm-project/commit/1cee9608982a866688434223bee44c878ea489b1 DIFF: https://github.com/llvm/llvm-project/commit/1cee9608982a866688434223bee44c878ea489

[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] [clang] Avoid triggering vtable instantiation for C++23 constexpr dtor (PR #102605)

2024-08-09 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon created https://github.com/llvm/llvm-project/pull/102605 In C++23 anything can be constexpr, including a dtor of a class whose members and bases don't have constexpr dtors. Avoid early triggering of vtable instantiation int this case. Fixes https://github.com/llvm

[clang] [clang] Avoid triggering vtable instantiation for C++23 constexpr dtor (PR #102605)

2024-08-09 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: I'm really in doubts that this is actually correct and useful... https://github.com/llvm/llvm-project/pull/102605 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Avoid triggering vtable instantiation for C++23 constexpr dtor (PR #102605)

2024-08-09 Thread Mariya Podchishchaeva via cfe-commits
@@ -7042,12 +7042,38 @@ void Sema::CheckCompletedCXXClass(Scope *S, CXXRecordDecl *Record) { } } +bool EffectivelyConstexprDestructor = true; +// Avoid triggering vtable instantiation due to a dtor that is not +// "effectively constexpr" for better compa

[clang] [clang] Avoid triggering vtable instantiation for C++23 constexpr dtor (PR #102605)

2024-08-09 Thread Mariya Podchishchaeva via cfe-commits
@@ -0,0 +1,22 @@ +// RUN: %clang_cc1 -std=c++23 -fsyntax-only -verify %s +// expected-no-diagnostics + +template static void destroy() { +T t; +++t; +} + +struct Incomplete; + +template struct HasD { + ~HasD() { destroy(); } +}; + +struct HasVT { + virtual ~HasVT(); +}

  1   2   3   4   5   6   >