sammccall added a comment.

This check is enabled by default in LLVM (`Checks: misc-*` in 
`llvm-project/.clang-tidy`)

The warning on mutable non-ref local variables is pretty noisy: a *lot* of 
existing code does not do this, for defensible reasons (some of us think that 
the ratio of extra safety to extra syntactic noise for locals is too low). The 
LLVM style guide doesn't take a position on this.

Should this check

- be disabled for LLVM? (i.e. this is opt-in for codebases with strong 
const-correctness rules, LLVM does not, it was unintentionally enabled by 
`misc-*`)
- be configured only to warn on references? (i.e. we expect that is de-facto 
LLVM style and so uncontroversial)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D54943

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

Reply via email to