vbvictor wrote:
> The check’s goal is to clarify ambiguous arguments, and braced-init arguments
> are among the least self-describing forms at the call site. Since users
> already opt in to literal-commenting via existing options, adding another
> switch increases configuration surface without a strong use case. Making this
> behavior unconditional seems aligned with the check’s intent and keeps
> configuration simpler.
>From reading docs, the check main idea is to detect mismatched comments, like:
```cpp
void f(Foo foo);
...
f(/*bar=*/ {}); // warning!
```
But not to add new comments unconditionally.
With your current behavoir, you _always_ add comments which is not the aligned
behavoir (because every other `Comment` option is off-by-default)
Looking at this, we should provide two new options: `CommentAnonymousInitLists`
`CommentTypedInitLists`.
Last option is still needed because it's very opionated if explicitly spelled
type is enought to omit comment or not.
https://github.com/llvm/llvm-project/pull/180408
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits