Create a new InjectedClassNameType to represent bare-word references to the 
injected class name of a class template or class template partial specialization.
This is a non-canonical type;  the canonical type is still a template 
specialization type.  This becomes the TypeForDecl of the pattern declaration,
which cleans up some amount of code (and complicates some other parts, but
whatever).

Fixes PR6326 and probably a few others, primarily by re-establishing a few
invariants about TypeLoc sizes.     



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98134 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/ASTDiagnostic.cpp b/lib/AST/ASTDiagnostic.cpp
index 7402b7d..866b7f7 100644
--- a/lib/AST/ASTDiagnostic.cpp
+++ b/lib/AST/ASTDiagnostic.cpp
@@ -56,6 +56,12 @@
       QT = cast<QualifiedNameType>(Ty)->desugar();
       continue;
     }
+
+    // ...or an injected class name...
+    if (isa<InjectedClassNameType>(Ty)) {
+      QT = cast<InjectedClassNameType>(Ty)->desugar();
+      continue;
+    }
     
     // ...or a substituted template type parameter.
     if (isa<SubstTemplateTypeParmType>(Ty)) {