Add test for C++ [over.over.]p1, the contexts in which one can take the address of an overloaded function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75146 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaOverload.cpp b/lib/Sema/SemaOverload.cpp
index 1efa175..d10d32c 100644
--- a/lib/Sema/SemaOverload.cpp
+++ b/lib/Sema/SemaOverload.cpp
@@ -3702,7 +3702,7 @@
   }
 
   // We only look at pointers or references to functions.
-  FunctionType = Context.getCanonicalType(FunctionType.getUnqualifiedType());
+  FunctionType = Context.getCanonicalType(FunctionType).getUnqualifiedType();
   if (!FunctionType->isFunctionType())
     return 0;