summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorJames Y Knight <jyknight@google.com>2019-05-06 21:37:59 +0000
committerJames Y Knight <jyknight@google.com>2019-05-06 21:37:59 +0000
commit1fe312b34b742599be26a144b5318a1c9bfc65d4 (patch)
tree7bf4b78a5027fb0e58974ed4c15cae5cbc53523e /clang/test
parent214de0f8eeeb41e074467a9ba98714479d28a54d (diff)
downloadbcm5719-llvm-1fe312b34b742599be26a144b5318a1c9bfc65d4.tar.gz
bcm5719-llvm-1fe312b34b742599be26a144b5318a1c9bfc65d4.zip
PR41183: Don't emit strict-prototypes warning for an implicit function
declaration. It should emit _only_ an implicit-function-declaration warning, not both of them. Differential Revision: https://reviews.llvm.org/D59711 llvm-svn: 360084
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/Sema/warn-strict-prototypes.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/clang/test/Sema/warn-strict-prototypes.c b/clang/test/Sema/warn-strict-prototypes.c
index 0c23b3b2c24..5565a09060f 100644
--- a/clang/test/Sema/warn-strict-prototypes.c
+++ b/clang/test/Sema/warn-strict-prototypes.c
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple i386-pc-unknown -fsyntax-only -Wstrict-prototypes -verify %s
+// RUN: %clang_cc1 -triple i386-pc-unknown -fsyntax-only -Wstrict-prototypes -Wno-implicit-function-declaration -verify %s
// RUN: %clang_cc1 -triple i386-pc-unknown -fsyntax-only -Wstrict-prototypes -fdiagnostics-parseable-fixits %s 2>&1 | FileCheck %s
// function declaration with unspecified params
@@ -71,3 +71,9 @@ void __attribute__((cdecl)) foo12(d) // expected-warning {{this old-style functi
// rdar://problem/33251668
void foo13(...) __attribute__((overloadable));
void foo13(...) __attribute__((overloadable)) {}
+
+// We should not generate a strict-prototype warning for an implicit
+// declaration. Leave that up to the implicit-function-declaration warning.
+void foo14(void) {
+ foo14_call(); // no-warning
+}
OpenPOWER on IntegriCloud