Provide a proper source location when building an implicit dereference. Fixes PR3600

llvm-svn: 64993
diff --git a/clang/test/SemaCXX/copy-initialization.cpp b/clang/test/SemaCXX/copy-initialization.cpp
index e380cc1..a56a886 100644
--- a/clang/test/SemaCXX/copy-initialization.cpp
+++ b/clang/test/SemaCXX/copy-initialization.cpp
@@ -1,5 +1,4 @@
 // RUN: clang -fsyntax-only -verify %s 
-
 class X {
 public:
   explicit X(const X&);
@@ -15,3 +14,10 @@
   X x3 = ip;
   X x4 = fp; // expected-error{{cannot initialize 'x4' with an lvalue of type 'float *'}}
 }
+
+struct foo {
+ void bar();
+};
+
+// PR3600
+void test(const foo *P) { P->bar(); } // expected-error{{cannot initialize object parameter of type 'struct foo' with an expression of type 'struct foo const'}}