[clang] [libc] [llvm] [compiler-rt] [clang-tools-extra] [libcxx] [flang] [C23] Complete support for WG14 N2508 (PR #71398)

2023-11-06 Thread Mariya Podchishchaeva via cfe-commits
@@ -299,6 +299,12 @@ def note_missing_selector_name : Note< def note_force_empty_selector_name : Note< "or insert whitespace before ':' to use %0 as parameter name " "and have an empty entry in the selector">; +def ext_c_label_followed_by_declaration : ExtWarn< + "label fo

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

2023-11-06 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon updated https://github.com/llvm/llvm-project/pull/70829 >From ac30780250875802d13450d17e6959f9e2ad3a70 Mon Sep 17 00:00:00 2001 From: "Podchishchaeva, Mariya" Date: Tue, 31 Oct 2023 09:27:51 -0700 Subject: [PATCH 1/2] [clang] Fix false positive -Wmissing-field-initi

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

2023-11-06 Thread Mariya Podchishchaeva via cfe-commits
@@ -2537,19 +2555,13 @@ class FieldInitializerValidatorCCC final : public CorrectionCandidateCallback { /// actually be initialized. Fznamznon wrote: I removed addition of `InitializedFields` parameter, so probably it makes sense to update the comment comment

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

2023-11-06 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: > I wonder if it would make sense to move the checking for this warning here, > to the else case in line 725 Thanks for the suggestion, I gave it a try. https://github.com/llvm/llvm-project/pull/70829 ___ cfe-commits mailing list cfe

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

2023-11-07 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon updated https://github.com/llvm/llvm-project/pull/70829 >From ac30780250875802d13450d17e6959f9e2ad3a70 Mon Sep 17 00:00:00 2001 From: "Podchishchaeva, Mariya" Date: Tue, 31 Oct 2023 09:27:51 -0700 Subject: [PATCH 1/3] [clang] Fix false positive -Wmissing-field-initi

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

2023-11-07 Thread Mariya Podchishchaeva via cfe-commits
@@ -727,6 +729,44 @@ void InitListChecker::FillInEmptyInitForField(unsigned Init, FieldDecl *Field, if (hadError || VerifyOnly) { // Do nothing } else if (Init < NumInits) { Fznamznon wrote: Yes, we still warn for this case. https://github.com/

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

2023-11-07 Thread Mariya Podchishchaeva via cfe-commits
@@ -465,7 +460,8 @@ class InitListChecker { void FillInEmptyInitForField(unsigned Init, FieldDecl *Field, const InitializedEntity &ParentEntity, InitListExpr *ILE, bool &RequiresSecondPass, -

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

2023-11-07 Thread Mariya Podchishchaeva via cfe-commits
@@ -802,9 +842,19 @@ InitListChecker::FillInEmptyInitializations(const InitializedEntity &Entity, } } } else { + InitListExpr *SForm = + ILE->isSyntacticForm() ? ILE : ILE->getSyntacticForm(); // The fields beyond ILE->getNumInits() are d

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

2023-11-07 Thread Mariya Podchishchaeva via cfe-commits
@@ -727,6 +729,44 @@ void InitListChecker::FillInEmptyInitForField(unsigned Init, FieldDecl *Field, if (hadError || VerifyOnly) { // Do nothing } else if (Init < NumInits) { + if (MaybeEmitMFIWarning) { +auto CheckAnonMember = [&](const FieldDecl *FD

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

2023-11-07 Thread Mariya Podchishchaeva via cfe-commits
@@ -4,7 +4,7 @@ // RUN: %clang_cc1 -std=c++20 %s -verify=cxx20,expected,reorder -Wno-c99-designator -Werror=reorder-init-list -Wno-initializer-overrides // RUN: %clang_cc1 -std=c++20 %s -verify=cxx20,expected,override -Wno-c99-designator -Wno-reorder-init-list -Werror=initiali

[compiler-rt] [libcxx] [libc] [llvm] [clang-tools-extra] [flang] [clang] [C23] Complete support for WG14 N2508 (PR #71398)

2023-11-07 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon commented: LGTM, but someone else must approve. https://github.com/llvm/llvm-project/pull/71398 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Fix qualifier restriction of overriden methods (PR #71696)

2023-11-08 Thread Mariya Podchishchaeva via cfe-commits
@@ -289,3 +289,29 @@ namespace PR8168 { static void foo() {} // expected-error{{'static' member function 'foo' overrides a virtual function}} }; } + +namespace T13 { + class A { + public: +virtual const int* foo(); // expected-note{{overridden virtual function is

[clang] [Clang][Sema] Fix qualifier restriction of overriden methods (PR #71696)

2023-11-08 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon commented: Perhaps also needs a release note. https://github.com/llvm/llvm-project/pull/71696 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Fix qualifier restriction of overriden methods (PR #71696)

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

[compiler-rt] [libcxx] [clang-tools-extra] [llvm] [flang] [clang] [Clang][Sema] Fix qualifier restriction of overriden methods (PR #71696)

2023-11-14 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon commented: LGTM, but someone else must approve. I added more folks for visibility. https://github.com/llvm/llvm-project/pull/71696 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

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

2023-11-14 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon updated https://github.com/llvm/llvm-project/pull/70829 >From ac30780250875802d13450d17e6959f9e2ad3a70 Mon Sep 17 00:00:00 2001 From: "Podchishchaeva, Mariya" Date: Tue, 31 Oct 2023 09:27:51 -0700 Subject: [PATCH 1/4] [clang] Fix false positive -Wmissing-field-initi

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

2023-11-14 Thread Mariya Podchishchaeva via cfe-commits
@@ -727,6 +734,38 @@ void InitListChecker::FillInEmptyInitForField(unsigned Init, FieldDecl *Field, if (hadError || VerifyOnly) { // Do nothing } else if (Init < NumInits) { + if (WarnIfMissing) { +auto CheckAnonMember = [&](const FieldDecl *FD, +

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

2023-11-14 Thread Mariya Podchishchaeva via cfe-commits
@@ -654,11 +655,17 @@ void InitListChecker::FillInEmptyInitForBase( } } -void InitListChecker::FillInEmptyInitForField(unsigned Init, FieldDecl *Field, -const InitializedEntity &ParentEntity, -

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

2023-11-14 Thread Mariya Podchishchaeva via cfe-commits
@@ -727,6 +729,44 @@ void InitListChecker::FillInEmptyInitForField(unsigned Init, FieldDecl *Field, if (hadError || VerifyOnly) { // Do nothing } else if (Init < NumInits) { Fznamznon wrote: > Maybe consider changing the L674 condition to an ass

[clang] [clang] Avoid -Wshadow warning when init-capture named same as class field (PR #74512)

2023-12-05 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon created https://github.com/llvm/llvm-project/pull/74512 Shadowing warning doesn't make much sense since field is not available in lambda's body without capturing this. Fixes https://github.com/llvm/llvm-project/issues/71976 >From 169d962b64b8ae242c3a6d332677296cf

[clang] [clang] Disable missing definition warning on pure virtual functions (PR #74510)

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

[clang] [clang] Disable missing definition warning on pure virtual functions (PR #74510)

2023-12-05 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon commented: Perhaps needs a release note. https://github.com/llvm/llvm-project/pull/74510 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Disable missing definition warning on pure virtual functions (PR #74510)

2023-12-05 Thread Mariya Podchishchaeva via cfe-commits
@@ -4952,7 +4952,8 @@ void Sema::InstantiateFunctionDefinition(SourceLocation PointOfInstantiation, std::make_pair(Function, PointOfInstantiation)); } else if (TSK == TSK_ImplicitInstantiation) { if (AtEndOfTU && !getDiagnostics().hasErrorOccurred() && -

[clang] [clang] Disable missing definition warning on pure virtual functions (PR #74510)

2023-12-05 Thread Mariya Podchishchaeva via cfe-commits
@@ -0,0 +1,20 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -Wundefined-func-template %s +// expected-no-diagnostics + +namespace PR74016 { Fznamznon wrote: I think we normally call them GH when a bug was filed as a GitHub issue. ```suggestion namespace GH74016 {

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

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

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

2023-12-06 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/2] [clang] Avoid -Wshadow warning when init-capture

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

2023-12-06 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: Ping. 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

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

2023-12-06 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/8] [C23] Implement N3018: The constexpr specifier f

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

2023-12-06 Thread Mariya Podchishchaeva via cfe-commits
@@ -14270,6 +14318,113 @@ StmtResult Sema::ActOnCXXForRangeIdentifier(Scope *S, SourceLocation IdentLoc, : IdentLoc); } +static ImplicitConversionKind GetConversionKind(QualType FromType, +

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

2023-12-06 Thread Mariya Podchishchaeva via cfe-commits
@@ -1914,6 +1914,17 @@ class StringLiteral final llvm_unreachable("Unsupported character width!"); } + // Get code unit but preserve sign info. + int64_t getCodeUnitS(size_t I, uint64_t ByteWidth) const { Fznamznon wrote: It is a number of bits in byt

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

2023-12-06 Thread Mariya Podchishchaeva via cfe-commits
@@ -8395,10 +8395,11 @@ void Sema::CheckShadow(NamedDecl *D, NamedDecl *ShadowedDecl, unsigned WarningDiag = diag::warn_decl_shadow; SourceLocation CaptureLoc; - if (isa(D) && isa(ShadowedDecl) && NewDC && - isa(NewDC)) { + if (isa(D) && NewDC && isa(NewDC)) {

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

2023-12-06 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: > Please provide one as soon as you can! In the meantime, we should probably > revert @Fznamznon Ok, I'll prepare revert. https://github.com/llvm/llvm-project/pull/74335 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:/

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

2023-12-06 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: Ok, revert is done. @metaflow , please provide the reproducer. https://github.com/llvm/llvm-project/pull/74335 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2023-12-06 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

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

2023-12-07 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon updated https://github.com/llvm/llvm-project/pull/70829 >From ac30780250875802d13450d17e6959f9e2ad3a70 Mon Sep 17 00:00:00 2001 From: "Podchishchaeva, Mariya" Date: Tue, 31 Oct 2023 09:27:51 -0700 Subject: [PATCH 1/6] [clang] Fix false positive -Wmissing-field-initi

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

2023-12-07 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: Thanks, I reproduced the problem with ``` template class shared_ptr { T* data; }; template class cfftpass { static shared_ptr make_pass(); }; template using Tcpass = shared_ptr>; template Tcpass cfftpass::make_pass() { return Tcpass{};};

[clang] [clang] Crash when referencing capture in static lambda (PR #74661)

2023-12-07 Thread Mariya Podchishchaeva via cfe-commits
@@ -848,6 +848,10 @@ Miscellaneous Clang Crashes Fixed `Issue 41302 `_ - Fixed a crash when ``-ast-dump=json`` was used for code using class template deduction guides. +- Fixed a crash when a lambda marked as `static` refer

[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

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

2023-11-20 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: Ping. 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] Fix a bug with qualified name lookup into current instantiation (PR #73018)

2023-11-21 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon created https://github.com/llvm/llvm-project/pull/73018 Due to d0d2ee0e4bbe915d649e983c12d37bcfcf58823c clang doesn't perform qualified name lookup into the current instantiation when it has dependent bases, because of that `getTypeName` call always returns null fo

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

2023-11-22 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon created https://github.com/llvm/llvm-project/pull/73099 The implementation mostly reuses C++ code paths where possible, including narrowing check in order to provide diagnostic messages in case initializer for constexpr variable is not exactly representable in targ

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

2023-11-22 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: cc @to268 , GitHub doesn't let me add you to the reviewers list. 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] Fix false positive -Wmissing-field-initializer for anonymous unions (PR #70829)

2023-10-31 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon created https://github.com/llvm/llvm-project/pull/70829 Normally warning is not reported when a field has default initializer. Do so for anonymous unions with default initializers as well. No release note since it is a regression in clang 18. Fixes https://github.

[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] [Clang] Fix a crash when incorrectly calling an explicit object member function template (PR #75913)

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

[clang] [Clang] Fix a crash when incorrectly calling an explicit object member function template (PR #75913)

2023-12-19 Thread Mariya Podchishchaeva via cfe-commits
@@ -253,7 +253,9 @@ static void diagnoseInstanceReference(Sema &SemaRef, SemaRef.Diag(Loc, diag::err_member_call_without_object) << Range << /*static*/ 0; else { -const auto *Callee = dyn_cast(Rep); +if (auto *Tpl = dyn_cast(Rep)) Fznamzno

[clang] [Clang] Fix a crash when incorrectly calling an explicit object member function template (PR #75913)

2023-12-19 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon approved this pull request. LGTM with a little NIT https://github.com/llvm/llvm-project/pull/75913 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2023-11-23 Thread Mariya Podchishchaeva via cfe-commits
@@ -727,6 +729,44 @@ void InitListChecker::FillInEmptyInitForField(unsigned Init, FieldDecl *Field, if (hadError || VerifyOnly) { // Do nothing } else if (Init < NumInits) { Fznamznon wrote: It seems `Init < NumInits` is always true for non-`Ver

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

2023-11-23 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon updated https://github.com/llvm/llvm-project/pull/70829 >From ac30780250875802d13450d17e6959f9e2ad3a70 Mon Sep 17 00:00:00 2001 From: "Podchishchaeva, Mariya" Date: Tue, 31 Oct 2023 09:27:51 -0700 Subject: [PATCH 1/5] [clang] Fix false positive -Wmissing-field-initi

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

2023-11-23 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/2] [C23] Implement N3018: The constexpr specifier f

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

2023-11-28 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: Ping. 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] [C23] Implement N3018: The constexpr specifier for object definitions (PR #73099)

2023-11-29 Thread Mariya Podchishchaeva via cfe-commits
@@ -2932,6 +2932,22 @@ def warn_private_extern : Warning< def note_private_extern : Note< "use __attribute__((visibility(\"hidden\"))) attribute instead">; +// C23 constexpr +def err_c23_thread_local_constexpr : Error< + "thread-local storage is not allowed with constexpr">

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

2023-11-29 Thread Mariya Podchishchaeva via cfe-commits
@@ -4110,6 +4116,10 @@ static CompleteObject findCompleteObject(EvalInfo &Info, const Expr *E, } bool IsConstant = BaseType.isConstant(Info.Ctx); +bool ConstexprVar = false; +if (const auto *VD = dyn_cast_if_present( +Info.EvaluatingDecl.dyn_cast()

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

2023-11-29 Thread Mariya Podchishchaeva via cfe-commits
@@ -14240,6 +14294,114 @@ StmtResult Sema::ActOnCXXForRangeIdentifier(Scope *S, SourceLocation IdentLoc, : IdentLoc); } +static ImplicitConversionKind getConversionKind(QualType FromType, +

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

2023-11-29 Thread Mariya Podchishchaeva via cfe-commits
@@ -14240,6 +14294,114 @@ StmtResult Sema::ActOnCXXForRangeIdentifier(Scope *S, SourceLocation IdentLoc, : IdentLoc); } +static ImplicitConversionKind getConversionKind(QualType FromType, +

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

2023-11-29 Thread Mariya Podchishchaeva via cfe-commits
@@ -14397,17 +14559,21 @@ void Sema::CheckCompleteVariableDeclaration(VarDecl *var) { QualType baseType = Context.getBaseElementType(type); bool HasConstInit = true; + if (getLangOpts().C23 && var->isConstexpr() && !Init) +Diag(var->getLocation(), diag::err_constexpr

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

2023-11-29 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon edited 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] [C23] Implement N3018: The constexpr specifier for object definitions (PR #73099)

2023-11-29 Thread Mariya Podchishchaeva via cfe-commits
@@ -9237,6 +9282,22 @@ static FunctionDecl *CreateNewFunctionDecl(Sema &SemaRef, Declarator &D, FunctionDecl *NewFD = nullptr; bool isInline = D.getDeclSpec().isInlineSpecified(); + ConstexprSpecKind ConstexprKind = D.getDeclSpec().getConstexprSpecifier(); + if (Constex

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

2023-11-29 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/5] [C23] Implement N3018: The constexpr specifier f

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

2023-11-29 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/5] [C23] Implement N3018: The constexpr specifier f

[compiler-rt] [llvm] [mlir] [clang] [clang-tools-extra] [clang] Fix a bug with qualified name lookup into current instantiation (PR #73018)

2023-11-29 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon updated https://github.com/llvm/llvm-project/pull/73018 >From 0275f3ea50b3f410d2132d61ea406131de6c Mon Sep 17 00:00:00 2001 From: "Podchishchaeva, Mariya" Date: Tue, 21 Nov 2023 08:32:36 -0800 Subject: [PATCH 1/2] [clang] Fix a bug with qualified name lookup int

[clang] [llvm] [compiler-rt] [mlir] [clang-tools-extra] [clang] Fix a bug with qualified name lookup into current instantiation (PR #73018)

2023-11-30 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon closed https://github.com/llvm/llvm-project/pull/73018 ___ 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-11-30 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: Ping. 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

  1   2   3   4   5   6   7   8   9   >