1 //===--- UsingDeclarationsSorter.h ------------------------------*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
10 /// This file declares UsingDeclarationsSorter, a TokenAnalyzer that
11 /// sorts consecutive using declarations.
13 //===----------------------------------------------------------------------===//
15 #ifndef LLVM_CLANG_LIB_FORMAT_USINGDECLARATIONSSORTER_H
16 #define LLVM_CLANG_LIB_FORMAT_USINGDECLARATIONSSORTER_H
18 #include "TokenAnalyzer.h"
23 class UsingDeclarationsSorter
: public TokenAnalyzer
{
25 UsingDeclarationsSorter(const Environment
&Env
, const FormatStyle
&Style
);
27 std::pair
<tooling::Replacements
, unsigned>
28 analyze(TokenAnnotator
&Annotator
,
29 SmallVectorImpl
<AnnotatedLine
*> &AnnotatedLines
,
30 FormatTokenLexer
&Tokens
) override
;
33 } // end namespace format
34 } // end namespace clang