Path: blob/main/contrib/llvm-project/clang/lib/Format/IntegerLiteralSeparatorFixer.h
35233 views
//===--- IntegerLiteralSeparatorFixer.h -------------------------*- C++ -*-===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//7///8/// \file9/// This file declares IntegerLiteralSeparatorFixer that fixes C++ integer10/// literal separators.11///12//===----------------------------------------------------------------------===//1314#ifndef LLVM_CLANG_LIB_FORMAT_INTEGERLITERALSEPARATORFIXER_H15#define LLVM_CLANG_LIB_FORMAT_INTEGERLITERALSEPARATORFIXER_H1617#include "TokenAnalyzer.h"1819namespace clang {20namespace format {2122class IntegerLiteralSeparatorFixer {23public:24std::pair<tooling::Replacements, unsigned> process(const Environment &Env,25const FormatStyle &Style);2627private:28bool checkSeparator(const StringRef IntegerLiteral, int DigitsPerGroup) const;29std::string format(const StringRef IntegerLiteral, int DigitsPerGroup,30int DigitCount, bool RemoveSeparator) const;3132char Separator;33};3435} // end namespace format36} // end namespace clang3738#endif394041