Sema: Provide a valid source location when instantiating templates based on a CXXDefaultArgExpr.

Fixes PR13758.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168521 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaTemplate/default-expr-arguments.cpp b/test/SemaTemplate/default-expr-arguments.cpp
index 1eefa9f..4e76a5a 100644
--- a/test/SemaTemplate/default-expr-arguments.cpp
+++ b/test/SemaTemplate/default-expr-arguments.cpp
@@ -303,3 +303,21 @@
   {
   }
 }
+
+namespace PR13758 {
+  template <typename T> struct move_from {
+    T invalid; // expected-error {{field has incomplete type 'void'}}
+  };
+  template <class K>
+  struct unordered_map {
+    explicit unordered_map(int n = 42);
+    unordered_map(move_from<K> other);
+  };
+  template<typename T>
+  void StripedHashTable() {
+    new unordered_map<void>(); // expected-note {{in instantiation of template class 'PR13758::move_from<void>' requested here}}
+  }
+  void tt() {
+    StripedHashTable<int>(); // expected-note {{in instantiation of function template specialization 'PR13758::StripedHashTable<int>' requested here}}
+  }
+}