1 // RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s
4 decltype(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'.
20 auto lneed
= gned
.*[] {}; // expected-error-re {{use of undeclared identifier 'gned'{{$}}}}
22 void test(int aaa
, int bbb
, int thisvar
) { // expected-note {{'thisvar' declared here}}
23 int thatval
= aaa
* (bbb
+ thatvar
); // expected-error {{use of undeclared identifier 'thatvar'; did you mean 'thisvar'?}}
29 for (auto&& x
: e
) { // expected-error-re {{use of undeclared identifier 'e'{{$}}}}
30 auto Functor
= [x
]() {};
31 long Alignment
= __alignof__(Functor
);
36 namespace NewTypoExprFromResolvingTypoAmbiguity
{
52 void run(A
*annotations
) {
55 auto &annotation
= *annotations
;
56 auto new_it
= new_annotations
.find(5);
57 auto &new_anotation
= new_it
.second
; // expected-note {{'new_anotation' declared here}}
58 new_annotation
->Swap(&annotation
); // expected-error {{use of undeclared identifier 'new_annotation'; did you mean 'new_anotation'?}}