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

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 15 08:47:08 PDT 2022


aaron.ballman added a comment.

In D123627#3452491 <https://reviews.llvm.org/D123627#3452491>, @efriedma wrote:

>> The reason you get the weird behavior with the note pointing to the same line as the declaration is because rintf() is a predefined builtin: https://godbolt.org/z/j3W759M7a (note the same lovely diagnostic note behavior).
>
> It points at the same location, but at least it says "'rintf' is a builtin" (diag::note_previous_builtin_declaration).  The new codepath specifically skips the code which emits that note.

This situation should now be improved in c7d4a05228090cb6b1b7f6e5d300f197897ac756 <https://reviews.llvm.org/rGc7d4a05228090cb6b1b7f6e5d300f197897ac756>.


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