================
@@ -0,0 +1,35 @@
+//===----------------------------------------------------------------------===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_HEADERGUARDCHECK_H
+#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_HEADERGUARDCHECK_H
+
+#include "../utils/HeaderGuard.h"
+
+namespace clang::tidy::misc {
+
+/// Finds and fixes header guards.
+/// For the user-facing documentation see:
+/// https://clang.llvm.org/extra/clang-tidy/checks/misc/header-guard.html
+class HeaderGuardCheck : public utils::HeaderGuardCheck {
+public:
+  HeaderGuardCheck(StringRef Name, ClangTidyContext *Context);
+
+  bool shouldSuggestEndifComment(StringRef Filename) override;
+  void storeOptions(ClangTidyOptions::OptionMap &Opts) override;
+  std::string getHeaderGuard(StringRef Filename, StringRef OldGuard) override;
----------------
EugeneZelenko wrote:

Does check make sense for Objective C/C++? If not, `isLanguageVersionSupported` 
should be added.

https://github.com/llvm/llvm-project/pull/177315
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to