aaron.ballman added a comment. In D122895#3511632 <https://reviews.llvm.org/D122895#3511632>, @jyknight wrote:
> The warnings for this case aren't great: > > int foo(); > > int > foo(int arg) { > return 5; > } Yeah, that's not ideal, I'm looking into it to see if I can improve that scenario or not. Thankfully, IMO, such code is likely to be extremely rare. Most people writing that declaration either expect an arbitrary number of args (they really don't want the prototype) and so the definition is extremely suspect that it only accepts one, or they wrote the declaration assuming it would accept *no* args (the C++ behavior) and then the definition becomes flat-out a bug. Do you have evidence this code pattern appears with some frequency? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122895/new/ https://reviews.llvm.org/D122895 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits