[clang-tools-extra] [clang-tidy] Add check hicpp-ignored-remove-result (PR #73119)

Piotr Zegar via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 6 07:54:34 PST 2023


=?utf-8?q?Björn?= Svensson <bjorn.a.svensson at est.tech>,
=?utf-8?q?Björn?= Svensson <bjorn.a.svensson at est.tech>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/73119 at github.com>


================
@@ -0,0 +1,28 @@
+//===--- IgnoredRemoveResultCheck.cpp - clang-tidy ------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "IgnoredRemoveResultCheck.h"
+
+namespace clang::tidy::hicpp {
+
+IgnoredRemoveResultCheck::IgnoredRemoveResultCheck(llvm::StringRef Name,
+                                                   ClangTidyContext *Context)
+    : UnusedReturnValueCheck(Name, Context,
+                             "::std::remove;"
+                             "::std::remove_if;"
+                             "::std::unique;") {
----------------
PiotrZSL wrote:

no need for ; at the end

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


More information about the cfe-commits mailing list