Index: lib/Sema/SemaDecl.cpp
===================================================================
--- lib/Sema/SemaDecl.cpp	(revision 148554)
+++ lib/Sema/SemaDecl.cpp	(working copy)
@@ -7460,14 +7460,11 @@
   } else
     return;
 
-  if (Name->isStr("NSLog") || Name->isStr("NSLogv")) {
+  if (getLangOptions().ObjC1 && (Name->isStr("NSLog") || Name->isStr("NSLogv"))) {
     // FIXME: NSLog and NSLogv should be target specific
-    if (const FormatAttr *Format = FD->getAttr<FormatAttr>()) {
-      // FIXME: We known better than our headers.
-      const_cast<FormatAttr *>(Format)->setType(Context, "printf");
-    } else
+    if (!FD->hasAttr<FormatAttr>())
       FD->addAttr(::new (Context) FormatAttr(FD->getLocation(), Context,
-                                             "printf", 1,
+                                             "NSString", 1,
                                              Name->isStr("NSLogv") ? 0 : 2));
   } else if (Name->isStr("asprintf") || Name->isStr("vasprintf")) {
     // FIXME: asprintf and vasprintf aren't C99 functions. Should they be
