Fixing commit r187768: Moved diagnosis of forward declarations of variable templates from Parser to Sema.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187770 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaOverload.cpp b/lib/Sema/SemaOverload.cpp
index fae4d02..1a9b829 100644
--- a/lib/Sema/SemaOverload.cpp
+++ b/lib/Sema/SemaOverload.cpp
@@ -2584,17 +2584,9 @@
   for (FunctionProtoType::arg_type_iterator O = OldType->arg_type_begin(),
        N = NewType->arg_type_begin(),
        E = OldType->arg_type_end(); O && (O != E); ++O, ++N) {
-    if (!(*O)->isReferenceType() && !(*N)->isReferenceType()) {
-      if (!Context.hasSameType(O->getUnqualifiedType(),
-                               N->getUnqualifiedType())) {
-        if (ArgPos) *ArgPos = O - OldType->arg_type_begin();
-        return false;
-      }
-    } else {
-      if (!Context.hasSameType(*O, *N)) {
-        if (ArgPos) *ArgPos = O - OldType->arg_type_begin();
-        return false;
-      }
+    if (!Context.hasSameType(*O, *N)) {
+      if (ArgPos) *ArgPos = O - OldType->arg_type_begin();
+      return false;
     }
   }
   return true;