Don't a.k.a. through the primary typedef of an anonymous tag decl.

llvm-svn: 93362
diff --git a/clang/lib/Sema/Sema.cpp b/clang/lib/Sema/Sema.cpp
index fefe924..171101b 100644
--- a/clang/lib/Sema/Sema.cpp
+++ b/clang/lib/Sema/Sema.cpp
@@ -110,6 +110,12 @@
     if (isa<VectorType>(Underlying))
       break;
 
+    // Don't desugar through the primary typedef of an anonymous type.
+    if (isa<TagType>(Underlying) && isa<TypedefType>(QT))
+      if (cast<TagType>(Underlying)->getDecl()->getTypedefForAnonDecl() ==
+          cast<TypedefType>(QT)->getDecl())
+        break;
+
     // Otherwise, we're tearing through something opaque; note that
     // we'll eventually need an a.k.a. clause and keep going.
     AKA = true;