Teach Sema::CheckTypenameType to use nested-name-specifiers with
source-location information. We don't actually preserve this
information in any of the resulting TypeLocs (yet), so it doesn't
matter.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126693 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaExprCXX.cpp b/lib/Sema/SemaExprCXX.cpp
index 5266d7d..79e6d3a 100644
--- a/lib/Sema/SemaExprCXX.cpp
+++ b/lib/Sema/SemaExprCXX.cpp
@@ -236,19 +236,11 @@
   if (isDependent) {
     // We didn't find our type, but that's okay: it's dependent
     // anyway.
-    NestedNameSpecifier *NNS = 0;
-    SourceRange Range;
-    if (SS.isSet()) {
-      NNS = (NestedNameSpecifier *)SS.getScopeRep();
-      Range = SourceRange(SS.getRange().getBegin(), NameLoc);
-    } else {
-      NNS = NestedNameSpecifier::Create(Context, &II);
-      Range = SourceRange(NameLoc);
-    }
-
-    QualType T = CheckTypenameType(ETK_None, NNS, II,
-                                   SourceLocation(),
-                                   Range, NameLoc);
+    
+    // FIXME: What if we have no nested-name-specifier?
+    QualType T = CheckTypenameType(ETK_None, SourceLocation(),
+                                   SS.getWithLocInContext(Context),
+                                   II, NameLoc);
     return ParsedType::make(T);
   }