#include "NamespaceCommentCheck.h"
#include "../utils/LexerUtils.h"
#include "clang/AST/ASTContext.h"
#include "clang/ASTMatchers/ASTMatchers.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Basic/TokenKinds.h"
#include "clang/Lex/Lexer.h"
#include "llvm/ADT/StringExtras.h"
#include <optional>
usingnamespaceclang::ast_matchers;
namespace clang::tidy::readability {
NamespaceCommentCheck::NamespaceCommentCheck(StringRef Name,
ClangTidyContext *Context)
: … { … }
void NamespaceCommentCheck::storeOptions(ClangTidyOptions::OptionMap &Opts) { … }
void NamespaceCommentCheck::registerMatchers(MatchFinder *Finder) { … }
static bool locationsInSameFile(const SourceManager &Sources,
SourceLocation Loc1, SourceLocation Loc2) { … }
static std::optional<std::string>
getNamespaceNameAsWritten(SourceLocation &Loc, const SourceManager &Sources,
const LangOptions &LangOpts) { … }
void NamespaceCommentCheck::check(const MatchFinder::MatchResult &Result) { … }
}