Skip to content
Commit cb642b91 authored by Alex Lorenz's avatar Alex Lorenz
Browse files

[Sema][TreeTransform] Re-create DesignatedInitExpr when a field designator

has no field declaration.

This commit fixes an invalid Winitializer-overrides warning that's shown
when analyzing a second (or any after the first) instantiation of a designated
initializer. This invalid warning is fixed by making sure that a
DesignatedInitExpr is rebuilt by the tree transformer when it has a field
designator whose FieldDecl* hasn't been yet initialized. This ensures that a
different DesignatedInitExpr is processed by Sema for every instantiation, and
thus the invalid warning is avoided.

rdar://28768441

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

llvm-svn: 284959
parent 9fe1b801
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