diff options
author | Ed Schouten <ed@nuxi.nl> | 2015-09-04 16:07:39 +0000 |
---|---|---|
committer | Ed Schouten <ed@nuxi.nl> | 2015-09-04 16:07:39 +0000 |
commit | e8eab68b55b233f3a9c20c085e5bac928d6ac97b (patch) | |
tree | 7445d64dd01405a64022f320c2394450568254ae /clang/test | |
parent | 13f0bb8b3aaf160459e56c4809a627de258549a6 (diff) | |
download | bcm5719-llvm-e8eab68b55b233f3a9c20c085e5bac928d6ac97b.tar.gz bcm5719-llvm-e8eab68b55b233f3a9c20c085e5bac928d6ac97b.zip |
Put ext_implicit_lib_function_decl in ImplicitFunctionDeclare.
If we build with -Werror=implicit-function-declaration, only implicit
function declarations of non-library functions throw compiler errors.
For library functions, we only produce a warning. There is no way to
promote both of these cases to an error without promoting other
warnings.
It makes little sense to introduce an additional compiler flag just to
control this specific warning. In my opinion it should just be part of
the same group.
llvm-svn: 246857
Diffstat (limited to 'clang/test')
-rw-r--r-- | clang/test/Driver/implicit-function-as-error.c | 1 | ||||
-rw-r--r-- | clang/test/Misc/warning-flags.c | 3 |
2 files changed, 2 insertions, 2 deletions
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 |