Necessary to parse MFC code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131076
91177308-0d34-0410-b5e6-
96231b3b80d8
return true;
}
+ // MSVC allows implicit function to void* type conversion.
+ if (getLangOptions().Microsoft && FromPointeeType->isFunctionType() &&
+ ToPointeeType->isVoidType()) {
+ ConvertedType = BuildSimilarlyQualifiedPointerType(FromTypePtr,
+ ToPointeeType,
+ ToType, Context);
+ return true;
+ }
+
// When we're overloading in C, we allow a special kind of pointer
// conversion for compatible-but-not-identical pointee types.
if (!getLangOptions().CPlusPlus &&
static void static_func() // expected-warning {{static declaration of 'static_func' follows non-static declaration}}
{
-}
\ No newline at end of file
+}
+
+long function_prototype(int a);
+long (*function_ptr)(int a);
+
+void function_to_voidptr_conv() {
+ void *a1 = function_prototype;
+ void *a2 = &function_prototype;
+ void *a1 = function_ptr;
+ void *a2 = &function_ptr;
+}