In Microsoft mode(-fms-compatibility), prefer an integral conversion to a floating-to-integral conversion if the integral conversion is between types of the same size.

For example:
 void f(float);
 void f(int);
 int main {
    long a;
    f(a);
 }
Here, MSVC will call f(int) instead of generating a compile error as clang will do in standard mode.
This fixes a few errors when parsing MFC code with clang.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140007 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaCXX/MicrosoftCompatibility.cpp b/test/SemaCXX/MicrosoftCompatibility.cpp
new file mode 100644
index 0000000..fa4ed3e
--- /dev/null
+++ b/test/SemaCXX/MicrosoftCompatibility.cpp
@@ -0,0 +1,18 @@
+// RUN: %clang_cc1 %s -triple i686-pc-win32 -fsyntax-only -Wmicrosoft -verify -fms-compatibility
+
+
+
+namespace ms_conversion_rules {
+
+void f(float a);
+void f(int a);
+
+void test()
+{
+    long a = 0;
+    f((long)0);
+	f(a);
+}
+
+}
+