[clang-tools-extra] [clang-tidy] Make bugprone-argument-comment useful for C code (PR #237623)

via cfe-commits cfe-commits at lists.llvm.org
Sun Nov 1 08:31:32 PST 2026


================
@@ -29,10 +29,26 @@ underscores and case when comparing names -- otherwise they are taken into
 account. Default is `false`.
 ```
 
+```{option} IgnoreMacros
+When `false`, the check also adds missing comments to calls in a macro
+argument, such as `ASSERT(f(0))`. It never adds them to calls in a macro body,
+or to arguments that you pass through another macro, such as `f(ID(0))`. The
+check compares argument comments with parameter names regardless of this
+option. Default is `true`.
+```
+
 ```{option} IgnoreSingleArgument
 When `true`, the check will ignore the single argument. Default is `false`.
 ```
 
+```{option} IgnoredParameterNames
+A semicolon-separated list of regular expressions for the parameter names that
+the check skips. The check neither compares the argument comment of a matching
+parameter nor adds a missing comment for it. A regular expression matches
+anywhere in the name unless you anchor it. Use the option for names that say
+nothing about the parameter, such as `^[a-z]$;^arg[0-9]*$`. Default is empty.
----------------
EugeneZelenko wrote:

```suggestion
nothing about the parameter, such as `^[a-z]$;^arg[0-9]*$`. Default is empty
string.
```

https://github.com/llvm/llvm-project/pull/237623


More information about the cfe-commits mailing list