diff options
Diffstat (limited to 'test/Modules/odr_hash.cpp')
-rw-r--r-- | test/Modules/odr_hash.cpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/test/Modules/odr_hash.cpp b/test/Modules/odr_hash.cpp index 294e925627c6..58814dd6b3fb 100644 --- a/test/Modules/odr_hash.cpp +++ b/test/Modules/odr_hash.cpp @@ -1078,6 +1078,39 @@ S<X> s; #endif } +namespace MultipleTypedefs { +#if defined(FIRST) +typedef int B1; +typedef B1 A1; +struct S1 { + A1 x; +}; +#elif defined(SECOND) +typedef int A1; +struct S1 { + A1 x; +}; +#else +S1 s1; +#endif + +#if defined(FIRST) +struct T2 { int x; }; +typedef T2 B2; +typedef B2 A2; +struct S2 { + T2 x; +}; +#elif defined(SECOND) +struct T2 { int x; }; +typedef T2 A2; +struct S2 { + T2 x; +}; +#else +S2 s2; +#endif +} // Keep macros contained to one file. #ifdef FIRST |