Retain complete source-location information for C++
nested-name-specifiers throughout the parser, and provide a new class
(NestedNameSpecifierLoc) that contains a nested-name-specifier along
with its type-source information.

Right now, this information is completely useless, because we don't
actually store the source-location information anywhere in the
AST. Call this Step 1/N.

llvm-svn: 126391
diff --git a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
index 73511fb..de4cd46 100644
--- a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
+++ b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
@@ -670,7 +670,7 @@
   if (isFriend) {
     if (Qualifier) {
       CXXScopeSpec SS;
-      SS.Adopt(Qualifier, Pattern->getQualifierRange());
+      SS.MakeTrivial(SemaRef.Context, Qualifier, Pattern->getQualifierRange());
       DC = SemaRef.computeDeclContext(SS);
       if (!DC) return 0;
     } else {
@@ -983,7 +983,7 @@
     DC = Owner;
   else if (isFriend && Qualifier) {
     CXXScopeSpec SS;
-    SS.Adopt(Qualifier, D->getQualifierRange());
+    SS.MakeTrivial(SemaRef.Context, Qualifier, D->getQualifierRange());
     DC = SemaRef.computeDeclContext(SS);
     if (!DC) return 0;
   } else {
@@ -1272,7 +1272,7 @@
   if (isFriend) {
     if (Qualifier) {
       CXXScopeSpec SS;
-      SS.Adopt(Qualifier, D->getQualifierRange());
+      SS.MakeTrivial(SemaRef.Context, Qualifier, D->getQualifierRange());
       DC = SemaRef.computeDeclContext(SS);
 
       if (DC && SemaRef.RequireCompleteDeclContext(SS, DC))
@@ -1688,7 +1688,7 @@
                                        D->isTypeName());
 
   CXXScopeSpec SS;
-  SS.Adopt(NNS, D->getNestedNameRange());
+  SS.MakeTrivial(SemaRef.Context, NNS, D->getNestedNameRange());
 
   if (CheckRedeclaration) {
     Prev.setHideTags(false);
@@ -1756,7 +1756,7 @@
     return 0;
 
   CXXScopeSpec SS;
-  SS.Adopt(NNS, D->getTargetNestedNameRange());
+  SS.MakeTrivial(SemaRef.Context, NNS, D->getTargetNestedNameRange());
 
   // Since NameInfo refers to a typename, it cannot be a C++ special name.
   // Hence, no tranformation is required for it.
@@ -1782,7 +1782,7 @@
     return 0;
 
   CXXScopeSpec SS;
-  SS.Adopt(NNS, D->getTargetNestedNameRange());
+  SS.MakeTrivial(SemaRef.Context, NNS, D->getTargetNestedNameRange());
 
   DeclarationNameInfo NameInfo
     = SemaRef.SubstDeclarationNameInfo(D->getNameInfo(), TemplateArgs);