brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · 5321fd8 Raw
31 lines · cpp
1//===----------------------------------------------------------------------===//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-exception6//7//===----------------------------------------------------------------------===//8 9#include "IgnoredRemoveResultCheck.h"10 11namespace clang::tidy::hicpp {12 13IgnoredRemoveResultCheck::IgnoredRemoveResultCheck(llvm::StringRef Name,14                                                   ClangTidyContext *Context)15    : UnusedReturnValueCheck(Name, Context,16                             {17                                 "::std::remove$",18                                 "::std::remove_if$",19                                 "::std::unique$",20                             }) {21  // The constructor for ClangTidyCheck needs to have been called22  // before we can access options via Options.get().23  AllowCastToVoid = Options.get("AllowCastToVoid", true);24}25 26void IgnoredRemoveResultCheck::storeOptions(ClangTidyOptions::OptionMap &Opts) {27  Options.store(Opts, "AllowCastToVoid", AllowCastToVoid);28}29 30} // namespace clang::tidy::hicpp31