[objcmt] Have the modern objc migration warning change from:

[NSNumber numberWithDouble:cppb];
warning: converting to boxing syntax requires a cast

to something like:

[NSNumber numberWithDouble:cppb];
warning: converting to boxing syntax requires casting 'bool' to 'double'

This is way better to fully understand the warning.
rdar://11705106

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158783 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Edit/RewriteObjCFoundationAPI.cpp b/lib/Edit/RewriteObjCFoundationAPI.cpp
index feecc70..6ef2e64 100644
--- a/lib/Edit/RewriteObjCFoundationAPI.cpp
+++ b/lib/Edit/RewriteObjCFoundationAPI.cpp
@@ -852,8 +852,9 @@
     DiagnosticsEngine &Diags = Ctx.getDiagnostics(); 
     // FIXME: Use a custom category name to distinguish migration diagnostics.
     unsigned diagID = Diags.getCustomDiagID(DiagnosticsEngine::Warning,
-                      "converting to boxing syntax requires a cast");
-    Diags.Report(Msg->getExprLoc(), diagID) << Msg->getSourceRange();
+                       "converting to boxing syntax requires casting %0 to %1");
+    Diags.Report(Msg->getExprLoc(), diagID) << OrigTy << FinalTy
+        << Msg->getSourceRange();
     return false;
   }
 
diff --git a/test/ARCMT/objcmt-boxing.m b/test/ARCMT/objcmt-boxing.m
index 68c1223..2ad65a1 100644
--- a/test/ARCMT/objcmt-boxing.m
+++ b/test/ARCMT/objcmt-boxing.m
@@ -81,7 +81,7 @@
   MyEnm myenum; 
   [NSNumber numberWithInteger:myenum];
   [NSNumber numberWithInteger:ME_foo];
-  [NSNumber numberWithDouble:cppb]; // expected-warning {{converting to boxing syntax requires a cast}}
+  [NSNumber numberWithDouble:cppb]; // expected-warning {{converting to boxing syntax requires casting 'bool' to 'double'}}
 }
 
 void boxString() {
diff --git a/test/ARCMT/objcmt-boxing.m.result b/test/ARCMT/objcmt-boxing.m.result
index 35da8dc..f101989 100644
--- a/test/ARCMT/objcmt-boxing.m.result
+++ b/test/ARCMT/objcmt-boxing.m.result
@@ -81,7 +81,7 @@
   MyEnm myenum; 
   @(myenum);
   @(ME_foo);
-  [NSNumber numberWithDouble:cppb]; // expected-warning {{converting to boxing syntax requires a cast}}
+  [NSNumber numberWithDouble:cppb]; // expected-warning {{converting to boxing syntax requires casting 'bool' to 'double'}}
 }
 
 void boxString() {