blob: 573c6aa1171a8a5388c50af8cdcdb20c1c34946d [file] [log] [blame]
Pirama Arumuga Nainar33337ca2015-05-06 11:48:57 -07001// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s
2
3namespace PR23186 {
4decltype(ned); // expected-error-re {{use of undeclared identifier 'ned'{{$}}}}
5// The code below was triggering an UNREACHABLE in ASTContext::getTypeInfoImpl
6// once the above code failed to recover properly after making the bogus
7// correction of 'ned' to 'new'.
8template <typename>
9struct S {
10 enum { V };
11 void f() {
12 switch (0)
13 case V:
14 ;
15 }
16};
17}