Tweak the CXXScopeSpec API a bit, so that we require the
nested-name-specifier and source range to be set at the same time.

llvm-svn: 126347
diff --git a/clang/lib/Sema/SemaTemplate.cpp b/clang/lib/Sema/SemaTemplate.cpp
index f0a0103..ab6dde5 100644
--- a/clang/lib/Sema/SemaTemplate.cpp
+++ b/clang/lib/Sema/SemaTemplate.cpp
@@ -3610,7 +3610,7 @@
         = NestedNameSpecifier::Create(Context, 0, false,
                                       ClassType.getTypePtr());
       CXXScopeSpec SS;
-      SS.setScopeRep(Qualifier);
+      SS.Adopt(Qualifier, Loc);
 
       // The actual value-ness of this is unimportant, but for
       // internal consistency's sake, references to instance methods
@@ -5997,8 +5997,7 @@
                         SourceLocation KeywordLoc, SourceRange NNSRange,
                         SourceLocation IILoc) {
   CXXScopeSpec SS;
-  SS.setScopeRep(NNS);
-  SS.setRange(NNSRange);
+  SS.Adopt(NNS, NNSRange);
 
   DeclContext *Ctx = computeDeclContext(SS);
   if (!Ctx) {
@@ -6177,7 +6176,7 @@
     Rebuilder.TransformNestedNameSpecifier(NNS, SS.getRange());
   if (!Rebuilt) return true;
 
-  SS.setScopeRep(Rebuilt);
+  SS.Adopt(Rebuilt, SS.getRange());
   return false;
 }