brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · 49d27b3 Raw
34 lines · c
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#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_CLEANUPCTADCHECK_H10#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_CLEANUPCTADCHECK_H11 12#include "../utils/TransformerClangTidyCheck.h"13 14namespace clang::tidy::abseil {15 16/// Suggests switching the initialization pattern of `absl::Cleanup`17/// instances from the factory function to class template argument18/// deduction (CTAD), in C++17 and higher.19///20/// For the user-facing documentation see:21/// https://clang.llvm.org/extra/clang-tidy/checks/abseil/cleanup-ctad.html22class CleanupCtadCheck : public utils::TransformerClangTidyCheck {23public:24  CleanupCtadCheck(StringRef Name, ClangTidyContext *Context);25 26  bool isLanguageVersionSupported(const LangOptions &LangOpts) const override {27    return LangOpts.CPlusPlus17;28  }29};30 31} // namespace clang::tidy::abseil32 33#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_CLEANUPCTADCHECK_H34