[clang-tools-extra] [clang-tidy] Check inherited constructors in bugprone-argument-comment (PR #179105)
via cfe-commits
cfe-commits at lists.llvm.org
Sun Feb 1 04:58:53 PST 2026
================
@@ -268,6 +268,14 @@ void ArgumentCommentCheck::checkCallArgs(ASTContext *Ctx,
return;
Callee = Callee->getFirstDecl();
+ if (const auto *Ctor = dyn_cast<CXXConstructorDecl>(Callee)) {
+ if (Ctor->isInheritingConstructor()) {
+ if (const auto *BaseCtor =
+ Ctor->getInheritedConstructor().getConstructor()) {
----------------
zeyi2 wrote:
Nit: could we remove the braces?
```c++
if (const auto *BaseCtor =
Ctor->getInheritedConstructor().getConstructor())
Callee = BaseCtor->getFirstDecl();
```
https://github.com/llvm/llvm-project/pull/179105
More information about the cfe-commits
mailing list