[PATCH] D146358: [clang][AST] Print name instead of type when diagnosing uninitialized subobject in constexpr variables

2023-05-24 Thread Takuya Shimizu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG456d072405d2: Reland: [clang][AST] Print name instead of type when diagnosing uninitialized… (authored by hazohelet). Repository: rG LLVM Github

[PATCH] D146358: [clang][AST] Print name instead of type when diagnosing uninitialized subobject in constexpr variables

2023-05-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. In D146358#4364058 , @hazohelet wrote: > The cause of the regression has been fixed in the other patch. > This is a resubmission with rebase to the upstream. LGTM, feel free to land

[PATCH] D146358: [clang][AST] Print name instead of type when diagnosing uninitialized subobject in constexpr variables

2023-05-23 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet updated this revision to Diff 524655. hazohelet added a comment. The cause of the regression has been fixed in the other patch. This is a resubmission with rebase to the upstream. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146358/new/ https://reviews.llvm.org/D146358

[PATCH] D146358: [clang][AST] Print name instead of type when diagnosing uninitialized subobject in constexpr variables

2023-05-20 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet added a comment. In D146358#4357276 , @erichkeane wrote: > In D146358#4357106 , @hazohelet > wrote: > >> Thanks for the revert! >> >> It seems that the problem is around the list initializer in

[PATCH] D146358: [clang][AST] Print name instead of type when diagnosing uninitialized subobject in constexpr variables

2023-05-19 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In D146358#4357106 , @hazohelet wrote: > In D146358#4352792 , @erichkeane > wrote: > >> In D146358#4351787 , @hazohelet >> wrote: >> >>> In

[PATCH] D146358: [clang][AST] Print name instead of type when diagnosing uninitialized subobject in constexpr variables

2023-05-19 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet added a comment. In D146358#4352792 , @erichkeane wrote: > In D146358#4351787 , @hazohelet > wrote: > >> In D146358#4350810 , @erichkeane >> wrote: >> >>>

[PATCH] D146358: [clang][AST] Print name instead of type when diagnosing uninitialized subobject in constexpr variables

2023-05-18 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In D146358#4351787 , @hazohelet wrote: > In D146358#4350810 , @erichkeane > wrote: > >> Our downstream discovered that this causes a regression when compiling >> `utility` with

[PATCH] D146358: [clang][AST] Print name instead of type when diagnosing uninitialized subobject in constexpr variables

2023-05-17 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet added a comment. In D146358#4350810 , @erichkeane wrote: > Our downstream discovered that this causes a regression when compiling > `utility` with `ast-dump`. I've put up a minimal reproducer: > https://godbolt.org/z/oaezas7Ws > >

[PATCH] D146358: [clang][AST] Print name instead of type when diagnosing uninitialized subobject in constexpr variables

2023-05-17 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. Slightly smaller reproducer: https://godbolt.org/z/W5zjrKaz9 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146358/new/ https://reviews.llvm.org/D146358 ___ cfe-commits

[PATCH] D146358: [clang][AST] Print name instead of type when diagnosing uninitialized subobject in constexpr variables

2023-05-17 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. Our downstream discovered that this causes a regression when compiling `utility` with `ast-dump`. I've put up a minimal reproducer: https://godbolt.org/z/oaezas7Ws @hazohelet : Will you be able to look into this soon? Repository: rG LLVM Github Monorepo

[PATCH] D146358: [clang][AST] Print name instead of type when diagnosing uninitialized subobject in constexpr variables

2023-05-16 Thread Takuya Shimizu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG0e167fc0a214: [clang][AST] Print name instead of type when diagnosing uninitialized subobject… (authored by hazohelet). Repository: rG LLVM

[PATCH] D146358: [clang][AST] Print name instead of type when diagnosing uninitialized subobject in constexpr variables

2023-05-16 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet added a comment. In D146358#4343281 , @aaron.ballman wrote: > LGTM! Did you end up requesting commit access? If not, now is probably a good > time: https://llvm.org/docs/DeveloperPolicy.html#obtaining-commit-access Thanks, I have commit

[PATCH] D146358: [clang][AST] Print name instead of type when diagnosing uninitialized subobject in constexpr variables

2023-05-15 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! Did you end up requesting commit access? If not, now is probably a good time: https://llvm.org/docs/DeveloperPolicy.html#obtaining-commit-access Comment

[PATCH] D146358: [clang][AST] Print name instead of type when diagnosing uninitialized subobject in constexpr variables

2023-05-15 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet updated this revision to Diff 522165. hazohelet added a comment. Rebase and Ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146358/new/ https://reviews.llvm.org/D146358 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Basic/DiagnosticASTKinds.td

[PATCH] D146358: [clang][AST] Print name instead of type when diagnosing uninitialized subobject in constexpr variables

2023-05-08 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet added a comment. Ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146358/new/ https://reviews.llvm.org/D146358 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D146358: [clang][AST] Print name instead of type when diagnosing uninitialized subobject in constexpr variables

2023-04-26 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. @aaron.ballman Are you OK with the approach taken here? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146358/new/ https://reviews.llvm.org/D146358 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D146358: [clang][AST] Print name instead of type when diagnosing uninitialized subobject in constexpr variables

2023-04-17 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet updated this revision to Diff 514252. hazohelet added a comment. Remove `gnu::weak` diff CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146358/new/ https://reviews.llvm.org/D146358 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Basic/DiagnosticASTKinds.td

[PATCH] D146358: [clang][AST] Print name instead of type when diagnosing uninitialized subobject in constexpr variables

2023-04-17 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet added a comment. In D146358#4268327 , @tbaeder wrote: > So, if I understand the code correctly, we call `CheckEvaluationResult` with > `SubObjectDecl=nullptr` when we're not checking an actual field but just an > array/record, so we can't run

[PATCH] D146358: [clang][AST] Print name instead of type when diagnosing uninitialized subobject in constexpr variables

2023-04-14 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. So, if I understand the code correctly, we call `CheckEvaluationResult` with `SubObjectDecl=nullptr` when we're not checking an actual field but just an array/record, so we can't run into this problem anyway, so the assert seems fine. I don't fully understand the

[PATCH] D146358: [clang][AST] Print name instead of type when diagnosing uninitialized subobject in constexpr variables

2023-04-07 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet updated this revision to Diff 511659. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146358/new/ https://reviews.llvm.org/D146358 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Basic/DiagnosticASTKinds.td clang/lib/AST/ExprConstant.cpp

[PATCH] D146358: [clang][AST] Print name instead of type when diagnosing uninitialized subobject in constexpr variables

2023-04-07 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:2357-2361 +if (SubobjectDecl) { + Info.FFDiag(DiagLoc, diag::note_constexpr_uninitialized) << SubobjectDecl; + Info.Note(SubobjectDecl->getLocation(), +

[PATCH] D146358: [clang][AST] Print name instead of type when diagnosing uninitialized subobject in constexpr variables

2023-04-05 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:2357-2361 +if (SubobjectDecl) { + Info.FFDiag(DiagLoc, diag::note_constexpr_uninitialized) << SubobjectDecl; + Info.Note(SubobjectDecl->getLocation(), +

[PATCH] D146358: [clang][AST] Print name instead of type when diagnosing uninitialized subobject in constexpr variables

2023-04-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:2357-2361 +if (SubobjectDecl) { + Info.FFDiag(DiagLoc, diag::note_constexpr_uninitialized) << SubobjectDecl; + Info.Note(SubobjectDecl->getLocation(), +

[PATCH] D146358: [clang][AST] Print name instead of type when diagnosing uninitialized subobject in constexpr variables

2023-03-30 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet updated this revision to Diff 509686. hazohelet added a comment. Added release note CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146358/new/ https://reviews.llvm.org/D146358 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Basic/DiagnosticASTKinds.td

[PATCH] D146358: [clang][AST] Print name instead of type when diagnosing uninitialized subobject in constexpr variables

2023-03-30 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet added a comment. @aaron.ballman Thanks for the review! I'll add a release note. Comment at: clang/lib/AST/ExprConstant.cpp:2357-2361 +if (SubobjectDecl) { + Info.FFDiag(DiagLoc, diag::note_constexpr_uninitialized) << SubobjectDecl; +

[PATCH] D146358: [clang][AST] Print name instead of type when diagnosing uninitialized subobject in constexpr variables

2023-03-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Thank you for working on this! The changes should also come with a release note in `clang/docs/ReleaseNotes.rst` to note the improvement. Comment at: clang/lib/AST/ExprConstant.cpp:2357-2361 +if (SubobjectDecl) { + Info.FFDiag(DiagLoc,

[PATCH] D146358: [clang][AST] Print name instead of type when diagnosing uninitialized subobject in constexpr variables

2023-03-29 Thread suman meena via Phabricator via cfe-commits
simideveloper added a comment. ok, no problem and thanks for those further issues @hazohelet CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146358/new/ https://reviews.llvm.org/D146358 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D146358: [clang][AST] Print name instead of type when diagnosing uninitialized subobject in constexpr variables

2023-03-29 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet added a comment. In D146358#4230122 , @simideveloper wrote: > hey, I was working on the same issue so can we collaborate on this issue? @simideveloper Thanks for your interest in collaborating on this issue, and sorry if I discouraged you

[PATCH] D146358: [clang][AST] Print name instead of type when diagnosing uninitialized subobject in constexpr variables

2023-03-29 Thread suman meena via Phabricator via cfe-commits
simideveloper added a comment. hey, I was working on the same issue so can we collaborate on this issue? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146358/new/ https://reviews.llvm.org/D146358 ___ cfe-commits mailing list

[PATCH] D146358: [clang][AST] Print name instead of type when diagnosing uninitialized subobject in constexpr variables

2023-03-28 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. In D146358#4229120 , @hazohelet wrote: > In D146358#4227938 , @cjdb wrote: > >> In D146358#4204412 , @tbaeder >> wrote: >> >>> "subobject named

[PATCH] D146358: [clang][AST] Print name instead of type when diagnosing uninitialized subobject in constexpr variables

2023-03-28 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet added a comment. In D146358#4227938 , @cjdb wrote: > In D146358#4204412 , @tbaeder wrote: > >> "subobject named 'foo'" sounds a bit weird to me, I'd expect just "subobject >> 'foo'", but that's just a

[PATCH] D146358: [clang][AST] Print name instead of type when diagnosing uninitialized subobject in constexpr variables

2023-03-28 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. In D146358#4204412 , @tbaeder wrote: > "subobject named 'foo'" sounds a bit weird to me, I'd expect just "subobject > 'foo'", but that's just a suggestion and I'll wait for a native spearker to > chime in on this. My expert brain

[PATCH] D146358: [clang][AST] Print name instead of type when diagnosing uninitialized subobject in constexpr variables

2023-03-28 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a subscriber: cjdb. tbaeder added a comment. Pinging @cjdb and @aaron.ballman for some feedback on the wording CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146358/new/ https://reviews.llvm.org/D146358 ___ cfe-commits mailing

[PATCH] D146358: [clang][AST] Print name instead of type when diagnosing uninitialized subobject in constexpr variables

2023-03-19 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet updated this revision to Diff 506358. hazohelet added a comment. Address comments from @shafik and @tbaeder CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146358/new/ https://reviews.llvm.org/D146358 Files: clang/include/clang/Basic/DiagnosticASTKinds.td

[PATCH] D146358: [clang][AST] Print name instead of type when diagnosing uninitialized subobject in constexpr variables

2023-03-19 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. "subobject named 'foo'" sounds a bit weird to me, I'd expect just "subobject 'foo'", but that's just a suggestion and I'll wait for a native spearker to chime in on this. Comment at: clang/lib/AST/Interp/Interp.cpp:373 +

[PATCH] D146358: [clang][AST] Print name instead of type when diagnosing uninitialized subobject in constexpr variables

2023-03-18 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added inline comments. Comment at: clang/lib/AST/Interp/Interp.cpp:373 + const FieldDecl *SubObjDecl) { + S.FFDiag(SI, diag::note_constexpr_uninitialized) << SubObjDecl; + S.Note(SubObjDecl->getLocation(),

[PATCH] D146358: [clang][AST] Print name instead of type when diagnosing uninitialized subobject in constexpr variables

2023-03-18 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added a comment. Thank you for submitting this fix. Comment at: clang/lib/AST/ExprConstant.cpp:2270 + Info, MTE->getExprLoc(), TempType, *V, Kind, + nullptr, CheckedTemps)) return false;

[PATCH] D146358: [clang][AST] Print name instead of type when diagnosing uninitialized subobject in constexpr variables

2023-03-18 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet created this revision. hazohelet added reviewers: aaron.ballman, tbaeder, shafik. Herald added a project: All. hazohelet requested review of this revision. Herald added a project: clang. This patch improves the diagnostic on uninitialized subobjects in constexpr variables by modifying