Benjamin Kramer | 498cce5 | 2014-08-13 13:57:57 +0000 | [diff] [blame^] | 1 | //===--- HeaderGuardCheck.h - clang-tidy ------------------------*- C++ -*-===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | |
| 10 | #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_LLVM_HEADER_GUARD_CHECK_H |
| 11 | #define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_LLVM_HEADER_GUARD_CHECK_H |
| 12 | |
| 13 | #include "../utils/HeaderGuard.h" |
| 14 | |
| 15 | namespace clang { |
| 16 | namespace tidy { |
| 17 | |
| 18 | /// Finds and fixes header guards that do not adhere to LLVM style. |
| 19 | class LLVMHeaderGuardCheck : public HeaderGuardCheck { |
| 20 | public: |
| 21 | bool shouldSuggestEndifComment(StringRef Filename) override { return false; } |
| 22 | bool shouldFixHeaderGuard(StringRef Filename) override; |
| 23 | std::string getHeaderGuard(StringRef Filename, StringRef OldGuard) override; |
| 24 | }; |
| 25 | |
| 26 | } // namespace tidy |
| 27 | } // namespace clang |
| 28 | |
| 29 | #endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_LLVM_HEADER_GUARD_CHECK_H |