[AMDGPU][AsmParser][NFC] Get rid of custom default operand handlers.
[llvm-project.git] / clang / lib / Format / IntegerLiteralSeparatorFixer.h
blob2c158e4473bfe20f223aaacaa44cff1670dc0c14
1 //===--- IntegerLiteralSeparatorFixer.h -------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 ///
9 /// \file
10 /// This file declares IntegerLiteralSeparatorFixer that fixes C++ integer
11 /// literal separators.
12 ///
13 //===----------------------------------------------------------------------===//
15 #ifndef LLVM_CLANG_LIB_FORMAT_INTEGERLITERALSEPARATORFIXER_H
16 #define LLVM_CLANG_LIB_FORMAT_INTEGERLITERALSEPARATORFIXER_H
18 #include "TokenAnalyzer.h"
20 namespace clang {
21 namespace format {
23 class IntegerLiteralSeparatorFixer {
24 public:
25 std::pair<tooling::Replacements, unsigned> process(const Environment &Env,
26 const FormatStyle &Style);
28 private:
29 bool checkSeparator(const StringRef IntegerLiteral, int DigitsPerGroup) const;
30 std::string format(const StringRef IntegerLiteral, int DigitsPerGroup,
31 int DigitCount, bool RemoveSeparator) const;
33 char Separator;
36 } // end namespace format
37 } // end namespace clang
39 #endif