summaryrefslogtreecommitdiffstats
path: root/test/Parser/switch-recovery.cpp
blob: 8eb4cff4fbe1f1c7c84db03b1bfe095bec222304 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// RUN: %clang_cc1 -fsyntax-only -verify %s

// <rdar://problem/7971948>
struct A {};
struct B {
  void foo() {
    switch (a) { // expected-error{{use of undeclared identifier 'a'}}
    default:
      return;
    }
  }
};
OpenPOWER on IntegriCloud