Add a wicked little test-case that illustrates what we have to deal
with to properly support member access expressions in templates. This
test is XFAIL'd, because we get it completely wrong, but I've made the
minimal changes to the representation to at least avoid a crash.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80856 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/NestedNameSpecifier.cpp b/lib/AST/NestedNameSpecifier.cpp
index 0376f9d..0c24c89 100644
--- a/lib/AST/NestedNameSpecifier.cpp
+++ b/lib/AST/NestedNameSpecifier.cpp
@@ -75,7 +75,17 @@
   Mockup.Specifier = T;
   return FindOrInsert(Context, Mockup);
 }
-  
+
+NestedNameSpecifier *
+NestedNameSpecifier::Create(ASTContext &Context, IdentifierInfo *II) {
+  assert(II && "Identifier cannot be NULL");
+  NestedNameSpecifier Mockup;
+  Mockup.Prefix.setPointer(0);
+  Mockup.Prefix.setInt(Identifier);
+  Mockup.Specifier = II;
+  return FindOrInsert(Context, Mockup);
+}
+
 NestedNameSpecifier *NestedNameSpecifier::GlobalSpecifier(ASTContext &Context) {
   if (!Context.GlobalNestedNameSpecifier)
     Context.GlobalNestedNameSpecifier = new (Context, 4) NestedNameSpecifier();