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.

Oh, good catch! It looks like `getNoteDiagForInvalidRedeclaration()` doesn't 
consider using that particular note and it probably should, I'll look into 
that. Thanks!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D123627

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to