maflcko wrote:

> > Also, do we want to put this new behaviour behind an option? (general 
> > question to other reviewers)
> 
> I’m new to clang-tidy, so I may be missing context, but my view is that this 
> probably shouldn’t be gated behind a new option.

As already mentioned, there is a separate option for each feature, like 
`CommentBoolLiterals`, `CommentStringLiterals`, etc. So simply from a 
consistency perspective, it would seem odd to exclude this one.

Moreover, there are patterns where the user would not want to care about the 
comment. For example:

```cpp
struct Opts{
  bool audio{false};
  bool video{false};
  bool compress{false};
};
connect(Endpoint& ep, const Opts& opts);

int main() {
  Endpoint e{};
  connect(e, {.video=true, .compress=true});
}
```

So offering those users a simple way to run the check, except for this one 
part, seems reasonable and consistent.

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

Reply via email to