llvm-project
a61ea9fd - [clang-tidy] Add an option in 'readability-named-parameter' to print names without comment (#147953)

Commit
65 days ago
[clang-tidy] Add an option in 'readability-named-parameter' to print names without comment (#147953) Add InsertPlainNamesInForwardDecls option to readability-named-parameter check to insert parameter names without comments for forward declarations only. When enabled, forward declarations get plain parameter names (e.g., `int param`) while function definitions continue to use commented names (e.g., `int /*param*/`). Named parameters in forward decls don't cause compiler warnings and some developers prefer to have names without comments but in sync between declarations and the definition. Default behavior remains unchanged (InsertPlainNamesInForwardDecls=false). Example with InsertPlainNamesInForwardDecls=true: ```cpp // Forward declaration - gets plain name because the definition has name. void func(int param); void func(int param) { ... = param; } ```
Author
Parents
Loading