[PATCH] D152788: [Clang] Show type in enum out of range diagnostic

2023-06-22 Thread Dimitry Andric via Phabricator via cfe-commits
dim added a comment. In D152788#4439714 , @shafik wrote: > Thank you for this improvement! Well, it would still be nice to have the instantiation trace, as Aaron suggested. So that is probably one of those "exercise for the reader" things. :D

[PATCH] D152788: [Clang] Show type in enum out of range diagnostic

2023-06-21 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added a comment. Thank you for this improvement! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152788/new/ https://reviews.llvm.org/D152788 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D152788: [Clang] Show type in enum out of range diagnostic

2023-06-14 Thread Dimitry Andric 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 rG69d42eef4bec: [Clang] Show type in enum out of range diagnostic (authored by dim). Changed prior to commit:

[PATCH] D152788: [Clang] Show type in enum out of range diagnostic

2023-06-14 Thread Dimitry Andric via Phabricator via cfe-commits
dim added inline comments. Comment at: clang/test/SemaCXX/constant-expression-cxx11.cpp:2479-2486 +template struct Bitfield { + static constexpr T max = static_cast((1 << size) - 1); +}; + +void testValueInRangeOfEnumerationValuesViaTemplate() { + Bitfield good; + Bitfield

[PATCH] D152788: [Clang] Show type in enum out of range diagnostic

2023-06-14 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! Comment at: clang/test/SemaCXX/constant-expression-cxx11.cpp:2479-2486 +template struct Bitfield { + static constexpr T max = static_cast((1 << size) -

[PATCH] D152788: [Clang] Show type in enum out of range diagnostic

2023-06-13 Thread Dimitry Andric via Phabricator via cfe-commits
dim updated this revision to Diff 531013. dim added a comment. Squash. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152788/new/ https://reviews.llvm.org/D152788 Files: clang/docs/ReleaseNotes.rst

[PATCH] D152788: [Clang] Show type in enum out of range diagnostic

2023-06-13 Thread Dimitry Andric via Phabricator via cfe-commits
dim updated this revision to Diff 531011. dim added a comment. Add release note and test with template instantiation. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152788/new/ https://reviews.llvm.org/D152788 Files: clang/docs/ReleaseNotes.rst

[PATCH] D152788: [Clang] Show type in enum out of range diagnostic

2023-06-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Thank you for this, I like the changes! Can you add a test showing template instantiation (the case that you were struggling to identify the enumeration from) and a release note? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D152788: [Clang] Show type in enum out of range diagnostic

2023-06-13 Thread Dimitry Andric via Phabricator via cfe-commits
dim created this revision. dim added reviewers: aaron.ballman, erichkeane, shafik, thakis. Herald added a project: All. dim requested review of this revision. Herald added a project: clang. When the diagnostic for an out of range enum value is printed, it currently does not show the actual enum