[TableGen] Fix validateOperandClass for non Phyical Reg (#118146)
[llvm-project.git] / clang-tools-extra / clang-tidy / hicpp / IgnoredRemoveResultCheck.cpp
blobb1a18485ce168d2bf94528d1c5a6f453537c6e79
1 //===--- IgnoredRemoveResultCheck.cpp - clang-tidy ------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
9 #include "IgnoredRemoveResultCheck.h"
11 namespace clang::tidy::hicpp {
13 IgnoredRemoveResultCheck::IgnoredRemoveResultCheck(llvm::StringRef Name,
14 ClangTidyContext *Context)
15 : UnusedReturnValueCheck(Name, Context,
17 "::std::remove$",
18 "::std::remove_if$",
19 "::std::unique$",
20 }) {
21 // The constructor for ClangTidyCheck needs to have been called
22 // before we can access options via Options.get().
23 AllowCastToVoid = Options.get("AllowCastToVoid", true);
26 void IgnoredRemoveResultCheck::storeOptions(ClangTidyOptions::OptionMap &Opts) {
27 Options.store(Opts, "AllowCastToVoid", AllowCastToVoid);
30 } // namespace clang::tidy::hicpp