aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.

Thanks for your patience while I thought about this more. I think the direction 
makes sense, so this LGTM with some extra test cases.



================
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.
----------------
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}}
```


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

Reply via email to