Home | History | Annotate | Download | only in SemaCXX
      1 // RUN: %clang_cc1 -fsyntax-only -std=c++14 -verify %s
      2 auto check1() {
      3   return 1;
      4   return s; // expected-error {{use of undeclared identifier 's'}}
      5 }
      6 
      7 int test = 11; // expected-note {{'test' declared here}}
      8 auto check2() {
      9   return "s";
     10   return tes; // expected-error {{use of undeclared identifier 'tes'; did you mean 'test'?}}
     11 }
     12 
     13 namespace BarNamespace {
     14 namespace NestedNamespace { // expected-note {{'BarNamespace::NestedNamespace' declared here}}
     15 typedef int type;
     16 }
     17 }
     18 struct FooRecord { };
     19 FooRecord::NestedNamespace::type x; // expected-error {{no member named 'NestedNamespace' in 'FooRecord'; did you mean 'BarNamespace::NestedNamespace'?}}
     20 
     21 void cast_expr(int g) { +int(n)(g); } // expected-error {{undeclared identifier 'n'}}
     22