blob: a0d44a34ffed1d2eac01989df49ed209fcdc0490 [file] [log] [blame]
Richard Smithfccb5122016-10-18 20:27:16 +00001// RUN: %clang_cc1 -fsyntax-only -std=c++14 -verify %s
2
3void f() {
Richard Smithcbaaa292017-08-13 22:26:53 +00004 if (bool b = true; b) {} // expected-warning {{'if' initialization statements are a C++17 extension}}
5 switch (int n = 5; n) { // expected-warning {{'switch' initialization statements are a C++17 extension}}
Richard Smithfccb5122016-10-18 20:27:16 +00006 case 5: break;
7 }
8}