brintos

brintos / llvm-project-archived public Read only

0
0
Text · 301 B · a0d44a3 Raw
9 lines · cpp
1// RUN: %clang_cc1 -fsyntax-only -std=c++14 -verify %s2 3void f() {4  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}}6  case 5: break;7  }8}9