Home | History | Annotate | Download | only in Parser

Lines Matching full:else

1 // RUN: %clang_cc1 -fsyntax-only -verify -Wdangling-else %s
6 { if (a) if (b) d++; else e++; } // expected-warning {{add explicit braces to avoid dangling else}}
7 { if (a) while (b) if (c) d++; else e++; } // expected-warning {{add explicit braces to avoid dangling else}}
8 { if (a) switch (b) if (c) d++; else e++; } // expected-warning {{add explicit braces to avoid dangling else}}
9 { if (a) for (;;) if (c) d++; else e++; } // expected-warning {{add explicit braces to avoid dangling else}}
10 { if (a) if (b) if (d) d++; else e++; else d--; } // expected-warning {{add explicit braces to avoid dangling else}}
15 } else e++; // expected-warning {{add explicit braces to avoid dangling else}}
20 { if (a) if (b) d++; else e++; else d--; }
21 { if (a) if (b) if (d) d++; else e++; else d--; else e--; }
22 { if (a) do if (b) d++; else e++; while (c); }
26 else e++;
31 } else e++;
47 else \