Clang Project

clang_source_code/test/CXX/class/class.nested.type/p1.cpp
1// RUN: %clang_cc1 -fsyntax-only -verify %s
2
3class X {
4public:
5  typedef int I; // expected-note{{'X::I' declared here}}
6  class Y { }; // expected-note{{'X::Y' declared here}}
7  I a;
8};
9
10I b; // expected-error{{unknown type name 'I'; did you mean 'X::I'?}}
11Y c; // expected-error{{unknown type name 'Y'; did you mean 'X::Y'?}}
12X::Y d;
13X::I e;
14