37 lines · c
1//===--- UsingDeclarationsSorter.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-exception6//7//===----------------------------------------------------------------------===//8///9/// \file10/// This file declares UsingDeclarationsSorter, a TokenAnalyzer that11/// sorts consecutive using declarations.12///13//===----------------------------------------------------------------------===//14 15#ifndef LLVM_CLANG_LIB_FORMAT_USINGDECLARATIONSSORTER_H16#define LLVM_CLANG_LIB_FORMAT_USINGDECLARATIONSSORTER_H17 18#include "TokenAnalyzer.h"19 20namespace clang {21namespace format {22 23class UsingDeclarationsSorter : public TokenAnalyzer {24public:25 UsingDeclarationsSorter(const Environment &Env, const FormatStyle &Style);26 27 std::pair<tooling::Replacements, unsigned>28 analyze(TokenAnnotator &Annotator,29 SmallVectorImpl<AnnotatedLine *> &AnnotatedLines,30 FormatTokenLexer &Tokens) override;31};32 33} // end namespace format34} // end namespace clang35 36#endif37