zequanwu added a comment.

In D79895#2107604 <https://reviews.llvm.org/D79895#2107604>, @nick wrote:

> This diagnostic bring headaches because frequently `-Wunused-variable` 
> suppression is done via no-op pseudo-consuming function like 
> `boost::ignore_unused` 
> <https://www.boost.org/doc/libs/1_73_0/libs/core/doc/html/core/ignore_unused.html>.
>  Particularly, it fires in Boost here 
> https://github.com/boostorg/concept_check/blob/e69c81326d5a4359ac53f9c6fe53fc2baf24df50/include/boost/concept_check.hpp#L135-L141.
>  Is it possible to make the diagnostic not fire for empty body consuming 
> functions?


This warning can be turned off by the flag 
`-Wno-uninitialized-const-reference`. I don't think we can just make the 
diagnostic not fire for empty body consuming functions, if the function 
declaration and definition are in different translation units.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D79895



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

Reply via email to