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

//===--- UppercaseLiteralSuffixCheck.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 "UppercaseLiteralSuffixCheck.h"
#include "../utils/ASTUtils.h"
#include "clang/AST/ASTContext.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/Lex/Lexer.h"
#include "llvm/ADT/SmallString.h"
#include <cctype>
#include <optional>

usingnamespaceclang::ast_matchers;

namespace clang::tidy::readability {

namespace {

struct IntegerLiteralCheck {};
constexpr llvm::StringLiteral IntegerLiteralCheck::Name;
constexpr llvm::StringLiteral IntegerLiteralCheck::SkipFirst;
constexpr llvm::StringLiteral IntegerLiteralCheck::Suffixes;

struct FloatingLiteralCheck {};
constexpr llvm::StringLiteral FloatingLiteralCheck::Name;
constexpr llvm::StringLiteral FloatingLiteralCheck::SkipFirst;
constexpr llvm::StringLiteral FloatingLiteralCheck::Suffixes;

struct NewSuffix {};

std::optional<SourceLocation> getMacroAwareLocation(SourceLocation Loc,
                                                    const SourceManager &SM) {}

std::optional<SourceRange> getMacroAwareSourceRange(SourceRange Loc,
                                                    const SourceManager &SM) {}

std::optional<std::string>
getNewSuffix(llvm::StringRef OldSuffix,
             const std::vector<StringRef> &NewSuffixes) {}

template <typename LiteralType>
std::optional<NewSuffix>
shouldReplaceLiteralSuffix(const Expr &Literal,
                           const std::vector<StringRef> &NewSuffixes,
                           const SourceManager &SM, const LangOptions &LO) {}

} // namespace

UppercaseLiteralSuffixCheck::UppercaseLiteralSuffixCheck(
    StringRef Name, ClangTidyContext *Context)
    :{}

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

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

template <typename LiteralType>
bool UppercaseLiteralSuffixCheck::checkBoundMatch(
    const MatchFinder::MatchResult &Result) {}

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

} // namespace clang::tidy::readability