aaron.ballman added a comment.

In D75714#1912400 <https://reviews.llvm.org/D75714#1912400>, @njames93 wrote:

> In D75714#1912326 <https://reviews.llvm.org/D75714#1912326>, @lebedev.ri 
> wrote:
>
> > What's the use case here?
>
>
> Mainly syntactic sugar, If you have a function that maybe returns a 
> `FixItHint` or `SourceRange` you can pass it directly to the 
> `DiagnosticBuilder`.


This comes up with a fair amount of regularity, even just for things like 
printing a simple integer (consider optional attribute arguments, etc). 
However, it seems like we might want to express this via the format string so 
that we don't run into a situation where an unavailable optional argument 
changes the indexing in the case where it's not additional information like a 
source range or fixit.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D75714



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

Reply via email to