[PATCH] D125814: Fix strict prototype diagnostic wording for definitions

James Y Knight via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 17 11:13:17 PDT 2022


jyknight added a comment.

This confuses me.

Looking at behavior with default flags:

We won't emit a -Wdeprecated-non-prototype warning for `int foo();`, until we subsequently find `int foo(int arg) { return 5; }`. Since we definitely have the context of what's going on at that point, in order to have determined that there's a conflict, what prevents doing the "right thing": emitting only 1 warning (at the definition site) and 1 note (at the declaration site)?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D125814/new/

https://reviews.llvm.org/D125814



More information about the cfe-commits mailing list