[PATCH] D124446: [clang-tidy] Add the misc-discarded-return-value check

Gabor Marton via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 5 01:49:02 PDT 2022


martong added inline comments.


================
Comment at: clang-tools-extra/clang-tidy/misc/DiscardedReturnValueCheck.cpp:106-126
+// FIXME: Move ASTMatcher library.
+// Note: Taken from UnusedUsingDeclsCheck.
+AST_POLYMORPHIC_MATCHER_P(
+    forEachTemplateArgument,
+    AST_POLYMORPHIC_SUPPORTED_TYPES(ClassTemplateSpecializationDecl,
+                                    TemplateSpecializationType, FunctionDecl),
+    clang::ast_matchers::internal::Matcher<TemplateArgument>, InnerMatcher) {
----------------
Could you please have this in an independent parent patch?


================
Comment at: clang-tools-extra/clang-tidy/misc/DiscardedReturnValueCheck.h:28
+public:
+  struct Function {
+    std::size_t ConsumedCalls;
----------------
The name `Function` is a bit misleading to me, what about `FunctionInfo`?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D124446



More information about the cfe-commits mailing list