2014-09-18 20:53:13 +08:00
|
|
|
//===--- TodoCommentCheck.h - clang-tidy ------------------------*- C++ -*-===//
|
|
|
|
//
|
2019-01-19 16:50:56 +08:00
|
|
|
// 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
|
2014-09-18 20:53:13 +08:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_GOOGLE_TODOCOMMENTCHECK_H
|
|
|
|
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_GOOGLE_TODOCOMMENTCHECK_H
|
|
|
|
|
2019-03-25 20:38:26 +08:00
|
|
|
#include "../ClangTidyCheck.h"
|
2014-09-18 20:53:13 +08:00
|
|
|
|
|
|
|
namespace clang {
|
|
|
|
namespace tidy {
|
2015-03-05 21:46:14 +08:00
|
|
|
namespace google {
|
2014-09-18 20:53:13 +08:00
|
|
|
namespace readability {
|
|
|
|
|
2015-08-28 02:01:58 +08:00
|
|
|
/// Finds TODO comments without a username or bug number.
|
2014-09-18 20:53:13 +08:00
|
|
|
///
|
2015-08-28 02:01:58 +08:00
|
|
|
/// Corresponding cpplint.py check: 'readability/todo'
|
2020-10-22 19:30:30 +08:00
|
|
|
///
|
|
|
|
/// For the user-facing documentation see:
|
|
|
|
/// http://clang.llvm.org/extra/clang-tidy/checks/google-readability-todo.html
|
2014-09-18 20:53:13 +08:00
|
|
|
class TodoCommentCheck : public ClangTidyCheck {
|
|
|
|
public:
|
2014-09-19 02:59:50 +08:00
|
|
|
TodoCommentCheck(StringRef Name, ClangTidyContext *Context);
|
2019-09-26 21:47:29 +08:00
|
|
|
~TodoCommentCheck();
|
|
|
|
|
2019-03-23 02:58:12 +08:00
|
|
|
void registerPPCallbacks(const SourceManager &SM, Preprocessor *PP,
|
|
|
|
Preprocessor *ModuleExpanderPP) override;
|
2014-09-19 02:59:50 +08:00
|
|
|
|
|
|
|
private:
|
|
|
|
class TodoCommentHandler;
|
|
|
|
std::unique_ptr<TodoCommentHandler> Handler;
|
2014-09-18 20:53:13 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace readability
|
2015-03-05 21:46:14 +08:00
|
|
|
} // namespace google
|
2014-09-18 20:53:13 +08:00
|
|
|
} // namespace tidy
|
|
|
|
} // namespace clang
|
|
|
|
|
|
|
|
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_GOOGLE_TODOCOMMENTCHECK_H
|