zwuis wrote:

> > LHS of member expression (`A.B`/`A->B`) if RHS is enumerator or static 
> > member
> 
> In this case though, the type of `A` still matters, right? If `A` is a 
> function call, we can't replace it with a function that returns void (like 
> `modernize-use-std-print` wants to do, for example), so it's not discarded in 
> the sense these checks are interested in. Maybe there's a better name than 
> `isDiscarded`?
> 
> > explicitly cast to `void`
> 
> Checks differ on how they want to handle this case (for example, 
> `bugprone-standalone-empty` doesn't consider `(void)v.empty();` to be 
> discarded), so I think this should be left to individual checks.

Makes sense to me. It's ok to me to only document it.

https://github.com/llvm/llvm-project/pull/184069
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to