1template <typename T> struct Foo;
2
3typedef Foo<int> BarInt;
4typedef Foo<double> BarDouble;
5
6template <typename T> using Bar = Foo<T>;
7
8template <typename T>
9struct [[clang::preferred_name(BarInt), clang::preferred_name(BarDouble),
10 clang::preferred_name(Bar<short>), clang::preferred_name(Bar<short>),
11 clang::preferred_name(Bar<double>),
12 clang::preferred_name(Bar<char>)]] Foo{};
13
14int main() {
15 BarInt barInt;
16 BarDouble barDouble;
17 Bar<short> barShort;
18 Bar<char> barChar;
19
20 Foo<int> varInt;
21 Foo<double> varDouble;
22 Foo<short> varShort;
23 Foo<char> varChar;
24 Foo<Foo<int>> varFooInt;
25 return 0;
26}
27

source code of lldb/test/API/lang/cpp/preferred_name/main.cpp