[PATCH] D79494: [clang-tidy] Exclude function calls in std namespace for bugprone-argument-comment.

Dmitri Gribenko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 6 09:07:34 PDT 2020


gribozavr2 added inline comments.


================
Comment at: clang-tools-extra/clang-tidy/bugprone/ArgumentCommentCheck.cpp:67
+               // leading underscores in parameter names (libstdc++), suggesting
+               // them does more harm than good.
+               unless(hasDeclaration((isFromStdNamespace()))))
----------------
"Ignore APIs from the standard library, since their names are not specified by the standard, and standard library implementations in practice have to use reserved names to avoid conflicts with same-named macros."


================
Comment at: clang-tools-extra/clang-tidy/bugprone/ArgumentCommentCheck.cpp:68
+               // them does more harm than good.
+               unless(hasDeclaration((isFromStdNamespace()))))
+          .bind("expr"),
----------------
Please use the isInStdNamespace() matcher instead.


================
Comment at: clang-tools-extra/clang-tidy/bugprone/ArgumentCommentCheck.cpp:68
+               // them does more harm than good.
+               unless(hasDeclaration((isFromStdNamespace()))))
+          .bind("expr"),
----------------
gribozavr2 wrote:
> Please use the isInStdNamespace() matcher instead.
I think there are redundant parentheses around `isFromStdNamespace()`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79494/new/

https://reviews.llvm.org/D79494





More information about the cfe-commits mailing list