Due to missing check on union, there was a null expression
added to init list that caused crash later.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
The precommit CI failures seem unrelated to these changes.
clang/test/Sema/init.c | ||
---|---|---|
168–169 | I think we might want to move this to its own test file so we can test the various edge cases. I'd like to see a RUN line that tests explicitly in -fms-compatibility mode to demonstrate that we do not issue this diagnostic, and RUN lines for C++ mode as well. |
Comment Actions
LGTM with a minor tweak to the test, thanks!
clang/test/Sema/flexible-array-in-union.c | ||
---|---|---|
1–16 ↗ | (On Diff #523723) | Slight tweak to get rid of the preprocessor stuff and simplify the test a bit; NFC. |
clang/test/Sema/flexible-array-in-union.c | ||
---|---|---|
1–16 ↗ | (On Diff #523723) | Neat! Thank you. |
I think we might want to move this to its own test file so we can test the various edge cases. I'd like to see a RUN line that tests explicitly in -fms-compatibility mode to demonstrate that we do not issue this diagnostic, and RUN lines for C++ mode as well.