1*e5dd7070Spatrick //===--- UsingDeclarationsSorter.h ------------------------------*- C++ -*-===// 2*e5dd7070Spatrick // 3*e5dd7070Spatrick // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4*e5dd7070Spatrick // See https://llvm.org/LICENSE.txt for license information. 5*e5dd7070Spatrick // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6*e5dd7070Spatrick // 7*e5dd7070Spatrick //===----------------------------------------------------------------------===// 8*e5dd7070Spatrick /// 9*e5dd7070Spatrick /// \file 10*e5dd7070Spatrick /// This file declares UsingDeclarationsSorter, a TokenAnalyzer that 11*e5dd7070Spatrick /// sorts consecutive using declarations. 12*e5dd7070Spatrick /// 13*e5dd7070Spatrick //===----------------------------------------------------------------------===// 14*e5dd7070Spatrick 15*e5dd7070Spatrick #ifndef LLVM_CLANG_LIB_FORMAT_USINGDECLARATIONSSORTER_H 16*e5dd7070Spatrick #define LLVM_CLANG_LIB_FORMAT_USINGDECLARATIONSSORTER_H 17*e5dd7070Spatrick 18*e5dd7070Spatrick #include "TokenAnalyzer.h" 19*e5dd7070Spatrick 20*e5dd7070Spatrick namespace clang { 21*e5dd7070Spatrick namespace format { 22*e5dd7070Spatrick 23*e5dd7070Spatrick class UsingDeclarationsSorter : public TokenAnalyzer { 24*e5dd7070Spatrick public: 25*e5dd7070Spatrick UsingDeclarationsSorter(const Environment &Env, const FormatStyle &Style); 26*e5dd7070Spatrick 27*e5dd7070Spatrick std::pair<tooling::Replacements, unsigned> 28*e5dd7070Spatrick analyze(TokenAnnotator &Annotator, 29*e5dd7070Spatrick SmallVectorImpl<AnnotatedLine *> &AnnotatedLines, 30*e5dd7070Spatrick FormatTokenLexer &Tokens) override; 31*e5dd7070Spatrick }; 32*e5dd7070Spatrick 33*e5dd7070Spatrick } // end namespace format 34*e5dd7070Spatrick } // end namespace clang 35*e5dd7070Spatrick 36*e5dd7070Spatrick #endif 37