aaronpuchert added inline comments.
================ Comment at: clang/test/Sema/warn-strict-prototypes.c:11 +// function definition with 0 params, no prototype. +void foo1() {} // expected-warning {{this old-style function definition is not preceded by a prototype}} +// function definition with 0 params, prototype. ---------------- aaron.ballman wrote: > I'd like a few more test cases: > ``` > // Test that a non-prototyped definition with no preceding prototype whines > about lacking a preceding prototype > void fooN() {} // expected-warning {{this old-style function definition is > not preceded by a prototype}} > > // Test that an existing declaration with no prototype still warns that a > corresponding definition with a type list is still not preceded by a > prototype. > void fooN1(); // expected-warning {{this function declaration is not a > prototype}} > void fooN1(void) {} // expected-warning {{this old-style function definition > is not preceded by a prototype}} > ``` I guess we want the warning only on the declaration of `fooN1`, not the definition? Because that's not an old-style function definition. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66919/new/ https://reviews.llvm.org/D66919 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits