[PATCH] D123627: Correctly diagnose prototype redeclaration errors in C

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 13 05:22:38 PDT 2022


aaron.ballman closed this revision.
aaron.ballman marked an inline comment as done.
aaron.ballman added a comment.

Thank you for the reviews, I've landed in 385e7df33046d7292612ee1e3ac00a59d8bc0441 <https://reviews.llvm.org/rG385e7df33046d7292612ee1e3ac00a59d8bc0441>.



================
Comment at: clang/test/Sema/warn-deprecated-non-prototype.c:64-70
 // FIXME: we get two diagnostics here when running in pedantic mode. The first
 // comes when forming the function type for the definition, and the second
 // comes from merging the function declarations together. The second is the
 // point at which we know the behavior has changed (because we can see the
 // previous declaration at that point), but we've already issued the type
 // warning by that point. It's not ideal to be this chatty, but this situation
 // should be pretty rare.
----------------
jyknight wrote:
> Reword to indicate that the second diagnostic is now an error.
Good catch!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D123627



More information about the cfe-commits mailing list