Skip to content
Commit 22e2db60 authored by Mariya Podchishchaeva's avatar Mariya Podchishchaeva
Browse files

[clang] Reject flexible array member in a union in C++

It was rejected in C, and in a strange way accepted in C++. However, the
support was never properly tested and fully implemented, so just reject
it in C++ mode as well.

This change also fixes crash on attempt to initialize union with flexible
array member. Due to missing check on union, there was a null expression
added to init list that caused crash later.

Fixes https://github.com/llvm/llvm-project/issues/61746

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D147626
parent 15723e6f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment