The codegen for conditions assumes that a normal variable declaration is used in a condition, but this is not the case when a structured binding is used.
This fixes PR36747.
Thanks Nicolas Lesser for contributing the patch.
Paths
| Differential D44534
Fix codegen for structured binding binding in conditions ClosedPublic Authored by Rakete1111 on Mar 15 2018, 12:54 PM.
Details Summary The codegen for conditions assumes that a normal variable declaration is used in a condition, but this is not the case when a structured binding is used. This fixes PR36747. Thanks Nicolas Lesser for contributing the patch.
Diff Detail
Event TimelineThis revision is now accepted and ready to land.Mar 17 2018, 2:02 PM Closed by commit rC327780: Fix codegen for structured binding binding in conditions (authored by lichray). · Explain WhyMar 17 2018, 2:03 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 138829 lib/CodeGen/CGStmt.cpp
test/Parser/decomposed-condition.cpp
|