HomePhabricator

[clang][Sema] Don't try to initialize implicit variable of invalid anonymous…

Authored by TaWeiTu on Tue, Mar 30, 6:05 PM.

Description

[clang][Sema] Don't try to initialize implicit variable of invalid anonymous union/struct

This fixes https://bugs.llvm.org/show_bug.cgi?id=49534, where the call to the constructor
of the anonymous union is checked and triggers assertion failure when trying to retrieve
the alignment of the this argument (which is a union with virtual function).

The extra check for alignment was introduced in D97187.

Reviewed By: tmatheson

Differential Revision: https://reviews.llvm.org/D98548