llvm/clang-tools-extra/clang-tidy/readability/ConstReturnTypeCheck.cpp

//===--- ConstReturnTypeCheck.cpp - clang-tidy ---------------------------===//
//
// 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
//
//===----------------------------------------------------------------------===//

#include "ConstReturnTypeCheck.h"
#include "../utils/LexerUtils.h"
#include "clang/AST/ASTContext.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Lex/Lexer.h"
#include <optional>

usingnamespaceclang::ast_matchers;

namespace clang::tidy::readability {

// Finds the location of the qualifying `const` token in the `FunctionDecl`'s
// return type. Returns `std::nullopt` when the return type is not
// `const`-qualified or `const` does not appear in `Def`'s source, like when the
// type is an alias or a macro.
static std::optional<Token>
findConstToRemove(const FunctionDecl *Def,
                  const MatchFinder::MatchResult &Result) {}

namespace {

AST_MATCHER(QualType, isLocalConstQualified) {}

struct CheckResult {};

} // namespace

// Does the actual work of the check.
static CheckResult checkDef(const clang::FunctionDecl *Def,
                            const MatchFinder::MatchResult &MatchResult) {}

void ConstReturnTypeCheck::storeOptions(ClangTidyOptions::OptionMap &Opts) {}

void ConstReturnTypeCheck::registerMatchers(MatchFinder *Finder) {}

void ConstReturnTypeCheck::check(const MatchFinder::MatchResult &Result) {}

} // namespace clang::tidy::readability