summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
Diffstat (limited to 'clang')
-rw-r--r--clang/include/clang/Basic/DiagnosticSemaKinds.td3
-rw-r--r--clang/test/Driver/implicit-function-as-error.c1
-rw-r--r--clang/test/Misc/warning-flags.c3
3 files changed, 4 insertions, 3 deletions
diff --git a/clang/include/clang/Basic/DiagnosticSemaKinds.td b/clang/include/clang/Basic/DiagnosticSemaKinds.td
index ecf5c2d2604..6ac57489250 100644
--- a/clang/include/clang/Basic/DiagnosticSemaKinds.td
+++ b/clang/include/clang/Basic/DiagnosticSemaKinds.td
@@ -416,7 +416,8 @@ def note_unreachable_silence : Note<
/// Built-in functions.
def ext_implicit_lib_function_decl : ExtWarn<
- "implicitly declaring library function '%0' with type %1">;
+ "implicitly declaring library function '%0' with type %1">,
+ InGroup<ImplicitFunctionDeclare>;
def note_include_header_or_declare : Note<
"include the header <%0> or explicitly provide a declaration for '%1'">;
def note_previous_builtin_declaration : Note<"%0 is a builtin with type %1">;
diff --git a/clang/test/Driver/implicit-function-as-error.c b/clang/test/Driver/implicit-function-as-error.c
index 5949e2064ce..356078a3f4b 100644
--- a/clang/test/Driver/implicit-function-as-error.c
+++ b/clang/test/Driver/implicit-function-as-error.c
@@ -5,5 +5,6 @@
// to an error.
void radar_10894044() {
+ printf("Hi\n"); // expected-error {{implicitly declaring library function 'printf' with type 'int (const char *, ...)'}} expected-note {{include the header <stdio.h> or explicitly provide a declaration for 'printf'}}
radar_10894044_not_declared(); // expected-error {{implicit declaration of function 'radar_10894044_not_declared' is invalid in C99}}
}
diff --git a/clang/test/Misc/warning-flags.c b/clang/test/Misc/warning-flags.c
index 86274ad0bdb..92cb9a0ad6c 100644
--- a/clang/test/Misc/warning-flags.c
+++ b/clang/test/Misc/warning-flags.c
@@ -18,12 +18,11 @@ This test serves two purposes:
The list of warnings below should NEVER grow. It should gradually shrink to 0.
-CHECK: Warnings without flags (93):
+CHECK: Warnings without flags (92):
CHECK-NEXT: ext_excess_initializers
CHECK-NEXT: ext_excess_initializers_in_char_array_initializer
CHECK-NEXT: ext_expected_semi_decl_list
CHECK-NEXT: ext_explicit_specialization_storage_class
-CHECK-NEXT: ext_implicit_lib_function_decl
CHECK-NEXT: ext_initializer_string_for_char_array_too_long
CHECK-NEXT: ext_missing_declspec
CHECK-NEXT: ext_missing_whitespace_after_macro_name
OpenPOWER on IntegriCloud