On Steve's suggestion, moved handling of use of undeclared method in a message
to rewriter (my previous patch).

llvm-svn: 44665
diff --git a/clang/Driver/RewriteTest.cpp b/clang/Driver/RewriteTest.cpp
index b0c40f7..9b19cfb 100644
--- a/clang/Driver/RewriteTest.cpp
+++ b/clang/Driver/RewriteTest.cpp
@@ -1419,8 +1419,8 @@
     
   // Now do the "normal" pointer to function cast.
   QualType castType = Context->getFunctionType(returnType, 
-                                               &ArgTypes[0], ArgTypes.size(),
-                                               Exp->getMethodDecl()->isVariadic());
+    &ArgTypes[0], ArgTypes.size(),
+    Exp->getMethodDecl() ? Exp->getMethodDecl()->isVariadic() : false);
   castType = Context->getPointerType(castType);
   cast = new CastExpr(castType, cast, SourceLocation());
 
@@ -1444,8 +1444,8 @@
                         SourceLocation());
     // Now do the "normal" pointer to function cast.
     castType = Context->getFunctionType(returnType, 
-                                        &ArgTypes[0], ArgTypes.size(),
-                                        Exp->getMethodDecl()->isVariadic());
+      &ArgTypes[0], ArgTypes.size(),
+      Exp->getMethodDecl() ? Exp->getMethodDecl()->isVariadic() : false);
     castType = Context->getPointerType(castType);
     cast = new CastExpr(castType, cast, SourceLocation());