blob: cc6f194c898de68b89c85a3bfb7b0c15f40d2808 [file] [log] [blame]
Jean-Daniel Dupas78536ae2012-01-24 22:32:46 +00001// RUN: %clang_cc1 -x objective-c %s -fsyntax-only -verify
2
3#include <stdarg.h>
4
5void f1(id arg) {
Jean-Daniel Dupas400dd1c2012-01-27 23:21:02 +00006 NSLog(@"%@", arg); // expected-warning {{implicitly declaring library function 'NSLog' with type 'void (id, ...)'}} \
Alp Toker5d96e0a2014-07-11 20:53:51 +00007 // expected-note {{include the header <Foundation/NSObjCRuntime.h> or explicitly provide a declaration for 'NSLog'}}
Jean-Daniel Dupas78536ae2012-01-24 22:32:46 +00008}
9
10void f2(id str, va_list args) {
Jean-Daniel Dupas400dd1c2012-01-27 23:21:02 +000011 NSLogv(@"%@", args); // expected-warning {{implicitly declaring library function 'NSLogv' with type }} \
Alp Toker5d96e0a2014-07-11 20:53:51 +000012 // expected-note {{include the header <Foundation/NSObjCRuntime.h> or explicitly provide a declaration for 'NSLogv'}}
Jean-Daniel Dupas78536ae2012-01-24 22:32:46 +000013}