summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Daniel Dupas <devlists@shadowlab.org>2012-01-27 23:21:02 +0000
committerJean-Daniel Dupas <devlists@shadowlab.org>2012-01-27 23:21:02 +0000
commit400dd1c3d03733a57a3cc8f9870b5fcab388d62a (patch)
tree5bc5d6e111213609be006709eee0b2edaf9b664b
parentc26e5fb86b65b2c72b850a06a822b8af15890613 (diff)
downloadbcm5719-llvm-400dd1c3d03733a57a3cc8f9870b5fcab388d62a.tar.gz
bcm5719-llvm-400dd1c3d03733a57a3cc8f9870b5fcab388d62a.zip
Remove the "C" in "implicitly declaring C library function" diagnostic
because all functions are not C functions (i.e. NSLog). llvm-svn: 149150
-rw-r--r--clang/include/clang/Basic/DiagnosticSemaKinds.td2
-rw-r--r--clang/test/Analysis/dead-stores.c2
-rw-r--r--clang/test/Analysis/exercise-ps.c2
-rw-r--r--clang/test/Rewriter/finally.m2
-rw-r--r--clang/test/Sema/block-return.c2
-rw-r--r--clang/test/Sema/implicit-builtin-decl.c2
-rw-r--r--clang/test/SemaObjC/builtin_objc_lib_functions.m14
-rw-r--r--clang/test/SemaObjC/builtin_objc_nslog.m4
-rw-r--r--clang/test/SemaObjC/ivar-lookup-resolution-builtin.m2
9 files changed, 16 insertions, 16 deletions
diff --git a/clang/include/clang/Basic/DiagnosticSemaKinds.td b/clang/include/clang/Basic/DiagnosticSemaKinds.td
index c350917477e..948236edc6a 100644
--- a/clang/include/clang/Basic/DiagnosticSemaKinds.td
+++ b/clang/include/clang/Basic/DiagnosticSemaKinds.td
@@ -268,7 +268,7 @@ def warn_unreachable : Warning<"will never be executed">,
/// Built-in functions.
def ext_implicit_lib_function_decl : ExtWarn<
- "implicitly declaring C library function '%0' with type %1">;
+ "implicitly declaring library function '%0' with type %1">;
def note_please_include_header : Note<
"please include the header <%0> or explicitly provide a "
"declaration for '%1'">;
diff --git a/clang/test/Analysis/dead-stores.c b/clang/test/Analysis/dead-stores.c
index 56e38cb07c4..4c0c1bc130b 100644
--- a/clang/test/Analysis/dead-stores.c
+++ b/clang/test/Analysis/dead-stores.c
@@ -11,7 +11,7 @@ void f1() {
void f2(void *b) {
char *c = (char*)b; // no-warning
char *d = b+1; // expected-warning {{never read}} expected-warning{{unused variable 'd'}}
- printf("%s", c); // expected-warning{{implicitly declaring C library function 'printf' with type 'int (const char *, ...)'}} \
+ printf("%s", c); // expected-warning{{implicitly declaring library function 'printf' with type 'int (const char *, ...)'}} \
// expected-note{{please include the header <stdio.h> or explicitly provide a declaration for 'printf'}}
}
diff --git a/clang/test/Analysis/exercise-ps.c b/clang/test/Analysis/exercise-ps.c
index 5dd1f3f12bd..b592c330e60 100644
--- a/clang/test/Analysis/exercise-ps.c
+++ b/clang/test/Analysis/exercise-ps.c
@@ -18,6 +18,6 @@ void_typedef f2_helper();
static void f2(void *buf) {
F12_typedef* x;
x = f2_helper();
- memcpy((&x[1]), (buf), 1); // expected-warning{{implicitly declaring C library function 'memcpy' with type 'void *(void *, const void *}} \
+ memcpy((&x[1]), (buf), 1); // expected-warning{{implicitly declaring library function 'memcpy' with type 'void *(void *, const void *}} \
// expected-note{{please include the header <string.h> or explicitly provide a declaration for 'memcpy'}}
}
diff --git a/clang/test/Rewriter/finally.m b/clang/test/Rewriter/finally.m
index ab5d8387cca..bb5375152b0 100644
--- a/clang/test/Rewriter/finally.m
+++ b/clang/test/Rewriter/finally.m
@@ -2,7 +2,7 @@
int main() {
@try {
- printf("executing try"); // expected-warning{{implicitly declaring C library function 'printf' with type 'int (const char *, ...)'}} \
+ printf("executing try"); // expected-warning{{implicitly declaring library function 'printf' with type 'int (const char *, ...)'}} \
// expected-note{{please include the header <stdio.h> or explicitly provide a declaration for 'printf'}}
return(0); // expected-warning{{rewriter doesn't support user-specified control flow semantics for @try/@finally (code may not execute properly)}}
} @finally {
diff --git a/clang/test/Sema/block-return.c b/clang/test/Sema/block-return.c
index 70fb3e104e9..e8c651652bc 100644
--- a/clang/test/Sema/block-return.c
+++ b/clang/test/Sema/block-return.c
@@ -81,7 +81,7 @@ void foo4() {
int (^xx)(const char *s) = ^(char *s) { return 1; }; // expected-error {{incompatible block pointer types initializing 'int (^)(const char *)' with an expression of type 'int (^)(char *)'}}
int (*yy)(const char *s) = funk; // expected-warning {{incompatible pointer types initializing 'int (*)(const char *)' with an expression of type 'int (char *)'}}
- int (^nested)(char *s) = ^(char *str) { void (^nest)(void) = ^(void) { printf("%s\n", str); }; next(); return 1; }; // expected-warning{{implicitly declaring C library function 'printf' with type 'int (const char *, ...)'}} \
+ int (^nested)(char *s) = ^(char *str) { void (^nest)(void) = ^(void) { printf("%s\n", str); }; next(); return 1; }; // expected-warning{{implicitly declaring library function 'printf' with type 'int (const char *, ...)'}} \
// expected-note{{please include the header <stdio.h> or explicitly provide a declaration for 'printf'}}
}
diff --git a/clang/test/Sema/implicit-builtin-decl.c b/clang/test/Sema/implicit-builtin-decl.c
index d80414d5fea..8cdd36518e8 100644
--- a/clang/test/Sema/implicit-builtin-decl.c
+++ b/clang/test/Sema/implicit-builtin-decl.c
@@ -1,6 +1,6 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s
void f() {
- int *ptr = malloc(sizeof(int) * 10); // expected-warning{{implicitly declaring C library function 'malloc' with type}} \
+ int *ptr = malloc(sizeof(int) * 10); // expected-warning{{implicitly declaring library function 'malloc' with type}} \
// expected-note{{please include the header <stdlib.h> or explicitly provide a declaration for 'malloc'}} \
// expected-note{{'malloc' is a builtin with type 'void *}}
}
diff --git a/clang/test/SemaObjC/builtin_objc_lib_functions.m b/clang/test/SemaObjC/builtin_objc_lib_functions.m
index 1aa5c75b7ca..956ee12573f 100644
--- a/clang/test/SemaObjC/builtin_objc_lib_functions.m
+++ b/clang/test/SemaObjC/builtin_objc_lib_functions.m
@@ -1,29 +1,29 @@
// RUN: %clang_cc1 -x objective-c %s -fsyntax-only -verify
// rdar://8592641
-Class f0() { return objc_getClass("a"); } // expected-warning {{implicitly declaring C library function 'objc_getClass' with type 'id (const char *)'}} \
+Class f0() { return objc_getClass("a"); } // expected-warning {{implicitly declaring library function 'objc_getClass' with type 'id (const char *)'}} \
// expected-note {{please include the header <objc/runtime.h> or explicitly provide a declaration for 'objc_getClass'}}
// rdar://8735023
-Class f1() { return objc_getMetaClass("a"); } // expected-warning {{implicitly declaring C library function 'objc_getMetaClass' with type 'id (const char *)'}} \
+Class f1() { return objc_getMetaClass("a"); } // expected-warning {{implicitly declaring library function 'objc_getMetaClass' with type 'id (const char *)'}} \
// expected-note {{please include the header <objc/runtime.h> or explicitly provide a declaration for 'objc_getMetaClass'}}
-void f2(id val) { objc_enumerationMutation(val); } // expected-warning {{implicitly declaring C library function 'objc_enumerationMutation' with type 'void (id)'}} \
+void f2(id val) { objc_enumerationMutation(val); } // expected-warning {{implicitly declaring library function 'objc_enumerationMutation' with type 'void (id)'}} \
// expected-note {{please include the header <objc/runtime.h> or explicitly provide a declaration for 'objc_enumerationMutation'}}
-long double f3(id self, SEL op) { return objc_msgSend_fpret(self, op); } // expected-warning {{implicitly declaring C library function 'objc_msgSend_fpret' with type 'long double (id, SEL, ...)'}} \
+long double f3(id self, SEL op) { return objc_msgSend_fpret(self, op); } // expected-warning {{implicitly declaring library function 'objc_msgSend_fpret' with type 'long double (id, SEL, ...)'}} \
// expected-note {{please include the header <objc/message.h> or explicitly provide a declaration for 'objc_msgSend_fpret'}}
id f4(struct objc_super *super, SEL op) { // expected-warning {{declaration of 'struct objc_super' will not be visible outside of this function}}
- return objc_msgSendSuper(super, op); // expected-warning {{implicitly declaring C library function 'objc_msgSendSuper' with type 'id (void *, SEL, ...)'}} \
+ return objc_msgSendSuper(super, op); // expected-warning {{implicitly declaring library function 'objc_msgSendSuper' with type 'id (void *, SEL, ...)'}} \
// expected-note {{please include the header <objc/message.h> or explicitly provide a declaration for 'objc_msgSendSuper'}}
}
id f5(id val, id *dest) {
- return objc_assign_strongCast(val, dest); // expected-warning {{implicitly declaring C library function 'objc_assign_strongCast' with type 'id (id, id *)'}} \
+ return objc_assign_strongCast(val, dest); // expected-warning {{implicitly declaring library function 'objc_assign_strongCast' with type 'id (id, id *)'}} \
// expected-note {{please include the header <objc/objc-auto.h> or explicitly provide a declaration for 'objc_assign_strongCast'}}
}
int f6(Class exceptionClass, id exception) {
- return objc_exception_match(exceptionClass, exception); // expected-warning {{implicitly declaring C library function 'objc_exception_match' with type 'int (id, id)'}} \
+ return objc_exception_match(exceptionClass, exception); // expected-warning {{implicitly declaring library function 'objc_exception_match' with type 'int (id, id)'}} \
// expected-note {{please include the header <objc/objc-exception.h> or explicitly provide a declaration for 'objc_exception_match'}}
}
diff --git a/clang/test/SemaObjC/builtin_objc_nslog.m b/clang/test/SemaObjC/builtin_objc_nslog.m
index 7c84c5fe234..c940b16cdc3 100644
--- a/clang/test/SemaObjC/builtin_objc_nslog.m
+++ b/clang/test/SemaObjC/builtin_objc_nslog.m
@@ -3,11 +3,11 @@
#include <stdarg.h>
void f1(id arg) {
- NSLog(@"%@", arg); // expected-warning {{implicitly declaring C library function 'NSLog' with type 'void (id, ...)'}} \
+ NSLog(@"%@", arg); // expected-warning {{implicitly declaring library function 'NSLog' with type 'void (id, ...)'}} \
// expected-note {{please include the header <Foundation/NSObjCRuntime.h> or explicitly provide a declaration for 'NSLog'}}
}
void f2(id str, va_list args) {
- NSLogv(@"%@", args); // expected-warning {{implicitly declaring C library function 'NSLogv' with type }} \
+ NSLogv(@"%@", args); // expected-warning {{implicitly declaring library function 'NSLogv' with type }} \
// expected-note {{please include the header <Foundation/NSObjCRuntime.h> or explicitly provide a declaration for 'NSLogv'}}
}
diff --git a/clang/test/SemaObjC/ivar-lookup-resolution-builtin.m b/clang/test/SemaObjC/ivar-lookup-resolution-builtin.m
index 2e90e8e0442..1254c1299d6 100644
--- a/clang/test/SemaObjC/ivar-lookup-resolution-builtin.m
+++ b/clang/test/SemaObjC/ivar-lookup-resolution-builtin.m
@@ -28,7 +28,7 @@
@implementation Test1
- (int) InstMethod
{
- return index; // expected-warning {{implicitly declaring C library function 'index'}} \
+ return index; // expected-warning {{implicitly declaring library function 'index'}} \
// expected-note {{please include the header <strings.h> or explicitly provide a declaration for 'index'}} \
// expected-warning {{incompatible pointer to integer conversion returning}}
}
OpenPOWER on IntegriCloud