New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
clang crashes when bitfields are initialized out-of-order #63605
Comments
C++ doesn't allow out-of-order initialization, but the compiler shouldn't crash. |
@llvm/issue-subscribers-clang-frontend |
So it looks like in I think the correct fix is to use I did some testing with this and it looks like it does the right thing. I need to do some more testing. |
I have a fix but I ran into an ancillary issue w/ the diagnostic and how it was designed, it is not ideal but this bug feels bad enough that maybe I will put a fix in for the main issue and tackle the new issue I found as a second step. |
…d initializers in C++ In C++ we are not allowed to use designated initializers to initialize fields out of order. In some cases when diagnosing this we are crashing because we are not indexing correctly and therefore going out of bounds. This fixes: llvm#63605 Differential Revision: https://reviews.llvm.org/D154675 (cherry picked from commit c9ef33e) Conflicts: clang/docs/ReleaseNotes.rst clang/test/SemaCXX/cxx2a-initializer-aggregates.cpp
$ cat test.cpp
The text was updated successfully, but these errors were encountered: