[ODRHash] Improve typedef handling.
Follow typedef chains to find the root type when processing types, and also
keep track of qualifiers.
llvm-svn: 306753
diff --git a/clang/test/Modules/odr_hash.cpp b/clang/test/Modules/odr_hash.cpp
index c94940c..f01c4e8 100644
--- a/clang/test/Modules/odr_hash.cpp
+++ b/clang/test/Modules/odr_hash.cpp
@@ -1762,6 +1762,22 @@
#else
S2 s2;
#endif
+
+#if defined(FIRST)
+using A3 = const int;
+using B3 = volatile A3;
+struct S3 {
+ B3 x = 1;
+};
+#elif defined(SECOND)
+using A3 = volatile const int;
+using B3 = A3;
+struct S3 {
+ B3 x = 1;
+};
+#else
+S3 s3;
+#endif
}
// Keep macros contained to one file.