| Issue |
171842
|
| Summary |
[clang-tidy] `bugprone-argument-comment` should comment inline `{}`-ctors as well
|
| Labels |
clang-tidy
|
| Assignees |
|
| Reporter |
Jacobfaib
|
`bugprone-argument-comment` currently supports adding comments for literal bools, integers, floats, strings and nullptrs. It should also support an option to add comments for anonymous `{}` used to construct objects as well:
```c++
void foo(T some_arg, const std::vector<int>& dims);
foo(some_arg, {});
// Should add /*dims=*/ like so
foo(some_arg, /*dims=*/{});
// Should also add a comment even if the type is named, as it's not necessarily true that
// the type of the argument is descriptive enough
foo(some_arg, /*dims=*/std::vector<int>{});
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs