UsingDeclarationsSorter.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  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-exception
  6. //
  7. //===----------------------------------------------------------------------===//
  8. ///
  9. /// \file
  10. /// This file declares UsingDeclarationsSorter, a TokenAnalyzer that
  11. /// sorts consecutive using declarations.
  12. ///
  13. //===----------------------------------------------------------------------===//
  14. #ifndef LLVM_CLANG_LIB_FORMAT_USINGDECLARATIONSSORTER_H
  15. #define LLVM_CLANG_LIB_FORMAT_USINGDECLARATIONSSORTER_H
  16. #include "TokenAnalyzer.h"
  17. namespace clang {
  18. namespace format {
  19. class UsingDeclarationsSorter : public TokenAnalyzer {
  20. public:
  21. UsingDeclarationsSorter(const Environment &Env, const FormatStyle &Style);
  22. std::pair<tooling::Replacements, unsigned>
  23. analyze(TokenAnnotator &Annotator,
  24. SmallVectorImpl<AnnotatedLine *> &AnnotatedLines,
  25. FormatTokenLexer &Tokens) override;
  26. };
  27. } // end namespace format
  28. } // end namespace clang
  29. #endif