[PATCH] D158540: Improve error message for constexpr constructors of virtual base classes

2023-10-03 Thread Nouman Amir via Phabricator via cfe-commits
NoumanAmir657 added a comment. In D158540#4652792 , @aaron.ballman wrote: > The only thing left are the comments on the release note, but I can fix that > up when landing if you need me to commit on your behalf. If so, what name and > email address wou

[PATCH] D158540: Improve error message for constexpr constructors of virtual base classes

2023-10-03 Thread Nouman Amir via Phabricator via cfe-commits
NoumanAmir657 updated this revision to Diff 557571. NoumanAmir657 set the repository for this revision to rG LLVM Github Monorepo. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158540/new/ https://reviews.llvm.org/D158540 Files: clang/docs/Release

[PATCH] D158540: Improve error message for constexpr constructors of virtual base classes

2023-10-03 Thread Nouman Amir via Phabricator via cfe-commits
NoumanAmir657 updated this revision to Diff 557557. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158540/new/ https://reviews.llvm.org/D158540 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Basic/DiagnosticSemaKinds.td clang/lib/Sema/SemaDeclCXX.cpp clang/test/CXX/dcl.dcl

[PATCH] D158540: Improve error message for constexpr constructors of virtual base classes

2023-10-03 Thread Nouman Amir via Phabricator via cfe-commits
NoumanAmir657 updated this revision to Diff 557555. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158540/new/ https://reviews.llvm.org/D158540 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Basic/DiagnosticSemaKinds.td clang/lib/Sema/SemaDeclCXX.cpp clang/test/CXX/dcl.dcl

[PATCH] D158540: Improve error message for constexpr constructors of virtual base classes

2023-09-30 Thread Nouman Amir via Phabricator via cfe-commits
NoumanAmir657 added a comment. In D158540#4652051 , @aaron.ballman wrote: > In D158540#4651859 , @NoumanAmir657 > wrote: > >> @aaron.Ballman >> Do I need to make changes other than this? The virtual base diagno

[PATCH] D158540: Improve error message for constexpr constructors of virtual base classes

2023-09-30 Thread Nouman Amir via Phabricator via cfe-commits
NoumanAmir657 updated this revision to Diff 557507. NoumanAmir657 set the repository for this revision to rG LLVM Github Monorepo. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158540/new/ https://reviews.llvm.org/D158540 Files: clang/docs/Release

[PATCH] D158540: Improve error message for constexpr constructors of virtual base classes

2023-09-30 Thread Nouman Amir via Phabricator via cfe-commits
NoumanAmir657 updated this revision to Diff 557504. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158540/new/ https://reviews.llvm.org/D158540 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Basic/DiagnosticSemaKinds.td clang/lib/Sema/SemaDeclCXX.cpp clang/test/CXX/dcl.dec

[PATCH] D158540: Improve error message for constexpr constructors of virtual base classes

2023-09-29 Thread Nouman Amir via Phabricator via cfe-commits
NoumanAmir657 updated this revision to Diff 557487. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158540/new/ https://reviews.llvm.org/D158540 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td clang/lib/Sema/SemaDeclCXX.cpp Index: clang/lib/Sema/SemaDeclCXX.cpp ==

[PATCH] D158540: Improve error message for constexpr constructors of virtual base classes

2023-09-29 Thread Nouman Amir via Phabricator via cfe-commits
NoumanAmir657 updated this revision to Diff 557480. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158540/new/ https://reviews.llvm.org/D158540 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td clang/lib/Sema/SemaDeclCXX.cpp Index: clang/lib/Sema/SemaDeclCXX.cpp ==

[PATCH] D158540: Improve error message for constexpr constructors of virtual base classes

2023-09-29 Thread Nouman Amir via Phabricator via cfe-commits
NoumanAmir657 updated this revision to Diff 557477. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158540/new/ https://reviews.llvm.org/D158540 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td clang/lib/Sema/SemaDeclCXX.cpp Index: clang/lib/Sema/SemaDeclCXX.cpp ==

[PATCH] D158540: Improve error message for constexpr constructors of virtual base classes

2023-09-28 Thread Nouman Amir via Phabricator via cfe-commits
NoumanAmir657 added a comment. @aaron.Ballman Do I need to make changes other than this? The virtual base diagnostic doesn't have a test case in files that would generate it. Should I add the above example as the test case? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158540/new/ ht

[PATCH] D158540: Improve error message for constexpr constructors of virtual base classes

2023-09-19 Thread Nouman Amir via Phabricator via cfe-commits
NoumanAmir657 added a comment. @aaron.ballman why the member is not an constexpr can be seen from getNumVBases(). The 'defaultedSpecialMemberIsConstexpr' returns false whenever getVNumBases is true for this so we can use that to identify when to give which error diagnostic. Can you verify whe

[PATCH] D158540: Improve error message for constexpr constructors of virtual base classes

2023-09-11 Thread Nouman Amir via Phabricator via cfe-commits
NoumanAmir657 added a comment. **Code:** struct Base { constexpr Base() = default; }; struct Derived : virtual Base { constexpr Derived() = default; }; struct NoCopyMove { constexpr NoCopyMove() {} NoCopyMove(const NoCopyMove&); NoCopyMove(NoCopyMove&&); }; str

[PATCH] D158540: Improve error message for constexpr constructors of virtual base classes

2023-09-05 Thread Nouman Amir via Phabricator via cfe-commits
NoumanAmir657 added a comment. In D158540#4632457 , @NoumanAmir657 wrote: > @aaron.ballman > This error gets generated on test cases even when a struct/class as no > virtual base class. > see this example on here: example

[PATCH] D158540: Improve error message for constexpr constructors of virtual base classes

2023-08-31 Thread Nouman Amir via Phabricator via cfe-commits
NoumanAmir657 added a comment. @aaron.ballman This error gets generated on test cases even when a struct/class as no virtual base class. see this example on here: example Is this right behaviour? The note for this should not be generated since this does not ha

[PATCH] D158540: Improve error message for constexpr constructors of virtual base classes

2023-08-31 Thread Nouman Amir via Phabricator via cfe-commits
NoumanAmir657 added a comment. In D158540#4632240 , @aaron.ballman wrote: > In D158540#4629042 , @NoumanAmir657 > wrote: > >> Do you want the note to be like this: >> >> ../llvm-test/x.cpp:5:1: note: virtual b

[PATCH] D158540: Improve error message for constexpr constructors of virtual base classes

2023-08-30 Thread Nouman Amir via Phabricator via cfe-commits
NoumanAmir657 added a comment. In D158540#4628958 , @aaron.ballman wrote: > In D158540#4628904 , @NoumanAmir657 > wrote: > >> In D158540#4628860 , >> @aaron.ballman wro

[PATCH] D158540: Improve error message for constexpr constructors of virtual base classes

2023-08-30 Thread Nouman Amir via Phabricator via cfe-commits
NoumanAmir657 added a comment. In D158540#4628958 , @aaron.ballman wrote: > In D158540#4628904 , @NoumanAmir657 > wrote: > >> In D158540#4628860 , >> @aaron.ballman wro

[PATCH] D158540: Improve error message for constexpr constructors of virtual base classes

2023-08-30 Thread Nouman Amir via Phabricator via cfe-commits
NoumanAmir657 added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:9396 def err_incorrect_defaulted_constexpr : Error< - "defaulted definition of %sub{select_special_member_kind}0 " - "is not constexpr">; + "%sub{select_special_member_kind}0 can

[PATCH] D158540: Improve error message for constexpr constructors of virtual base classes

2023-08-30 Thread Nouman Amir via Phabricator via cfe-commits
NoumanAmir657 added a comment. In D158540#4628860 , @aaron.ballman wrote: > In D158540#4628629 , @NoumanAmir657 > wrote: > >> In D158540#4628310 , >> @aaron.ballman wro

[PATCH] D158540: Improve error message for constexpr constructors of virtual base classes

2023-08-30 Thread Nouman Amir via Phabricator via cfe-commits
NoumanAmir657 added a comment. In D158540#4628310 , @aaron.ballman wrote: > In D158540#4628265 , @NoumanAmir657 > wrote: > >> No, I don't have code examples that showcase the importance of the note. As >> you s

[PATCH] D158540: Improve error message for constexpr constructors of virtual base classes

2023-08-30 Thread Nouman Amir via Phabricator via cfe-commits
NoumanAmir657 added a comment. No, I don't have code examples that showcase the importance of the note. As you said the class context would be obvious whenever we run into this error. The test files also don't show where the note would be helpful. CHANGES SINCE LAST ACTION https://reviews.llv

[PATCH] D158540: Improve error message for constexpr constructors of virtual base classes

2023-08-30 Thread Nouman Amir via Phabricator via cfe-commits
NoumanAmir657 added a comment. @xgupta the build is successful now. Earlier it failed due to format issues. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158540/new/ https://reviews.llvm.org/D158540 ___ cfe-commits mailing list cfe-commits@li

[PATCH] D158540: Improve error message for constexpr constructors of virtual base classes

2023-08-30 Thread Nouman Amir via Phabricator via cfe-commits
NoumanAmir657 updated this revision to Diff 554629. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158540/new/ https://reviews.llvm.org/D158540 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td clang/lib/Sema/SemaDeclCXX.cpp clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p3.cpp

[PATCH] D158540: Improve error message for constexpr constructors of virtual base classes

2023-08-30 Thread Nouman Amir via Phabricator via cfe-commits
NoumanAmir657 updated this revision to Diff 554626. NoumanAmir657 set the repository for this revision to rG LLVM Github Monorepo. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158540/new/ https://reviews.llvm.org/D158540 Files: clang/include/clan

[PATCH] D158540: Improve error message for constexpr constructors of virtual base classes

2023-08-29 Thread Nouman Amir via Phabricator via cfe-commits
NoumanAmir657 updated this revision to Diff 554571. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158540/new/ https://reviews.llvm.org/D158540 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td clang/lib/Sema/SemaDeclCXX.cpp clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p3.cpp

[PATCH] D158540: Improve error message for constexpr constructors of virtual base classes

2023-08-29 Thread Nouman Amir via Phabricator via cfe-commits
NoumanAmir657 updated this revision to Diff 554489. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158540/new/ https://reviews.llvm.org/D158540 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td clang/lib/Sema/SemaDeclCXX.cpp clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p3.cpp

[PATCH] D158540: Improve error message for constexpr constructors of virtual base classes

2023-08-29 Thread Nouman Amir via Phabricator via cfe-commits
NoumanAmir657 updated this revision to Diff 554485. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158540/new/ https://reviews.llvm.org/D158540 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td clang/lib/Sema/SemaDeclCXX.cpp clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p3.cpp

[PATCH] D158540: Improve error message for constexpr constructors of virtual base classes

2023-08-27 Thread Nouman Amir via Phabricator via cfe-commits
NoumanAmir657 added a comment. @xgupta It passed the test cases now CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158540/new/ https://reviews.llvm.org/D158540 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[PATCH] D158540: Improve error message for constexpr constructors of virtual base classes

2023-08-27 Thread Nouman Amir via Phabricator via cfe-commits
NoumanAmir657 updated this revision to Diff 553810. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158540/new/ https://reviews.llvm.org/D158540 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p3.cpp clang/test/CXX/dcl.dcl/dcl.spe

[PATCH] D158540: Improve error message for constexpr constructors of virtual base classes

2023-08-27 Thread Nouman Amir via Phabricator via cfe-commits
NoumanAmir657 added a comment. I figured it out and changed the test files. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158540/new/ https://reviews.llvm.org/D158540 ___ cfe-commits mailing list cfe-com

[PATCH] D158540: Improve error message for constexpr constructors of virtual base classes

2023-08-27 Thread Nouman Amir via Phabricator via cfe-commits
NoumanAmir657 added a comment. How am I supposed to update tests? I am new to this. I get the files on which the tests fail but how do I update them Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158540/new/ https://reviews.llvm.org/D158540 __

[PATCH] D158616: To allow RAV to visit initializer when bitfield and initializer both given

2023-08-24 Thread Nouman Amir via Phabricator via cfe-commits
NoumanAmir657 added a comment. The pre-commit checks passed now when I built again. Looking into test for this now Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158616/new/ https://reviews.llvm.org/D158616

[PATCH] D158616: To allow RAV to visit initializer when bitfield and initializer both given

2023-08-23 Thread Nouman Amir via Phabricator via cfe-commits
NoumanAmir657 created this revision. NoumanAmir657 added reviewers: nicholas, Eugene.Zelenko. Herald added a project: All. NoumanAmir657 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The RAV does not visit the initializer when the bitfiel

[PATCH] D158540: Improve error message for constexpr constructors of virtual base classes

2023-08-22 Thread Nouman Amir via Phabricator via cfe-commits
NoumanAmir657 created this revision. NoumanAmir657 added a reviewer: CornedBee. Herald added a project: All. NoumanAmir657 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The changes are for better diagnostic/error-messages. The error messa