[DFAJumpThreading] Remove incoming StartBlock from all phis when unfolding select...
[llvm-project.git] / clang-tools-extra / pseudo / test / cxx / dangling-else.cpp
blob151f3931b53f9e0b2c47e3625ad5d402488891b1
1 // RUN: clang-pseudo -grammar=cxx -source=%s --start-symbol=statement-seq --print-forest | FileCheck %s
3 // Verify the else should belong to the nested if statement
4 if (true) if (true) {} else {}
6 // CHECK: statement-seq~selection-statement := IF ( condition ) statement
7 // CHECK-NEXT: ├─IF
8 // CHECK-NEXT: ├─(
9 // CHECK-NEXT: ├─condition~TRUE
10 // CHECK-NEXT: ├─)
11 // CHECK-NEXT: └─statement~selection-statement
12 // CHECK-NEXT: ├─IF
13 // CHECK-NEXT: ├─(
14 // CHECK-NEXT: ├─condition~TRUE
15 // CHECK-NEXT: ├─)
16 // CHECK-NEXT: ├─statement~compound-statement := { }
17 // CHECK-NEXT: │ ├─{
18 // CHECK-NEXT: │ └─}
19 // CHECK-NEXT: ├─ELSE
20 // CHECK-NEXT: └─statement~compound-statement := { }
21 // CHECK-NEXT: ├─{
22 // CHECK-NEXT: └─}