clang
17.0.0git
lib
Format
UsingDeclarationsSorter.h
Go to the documentation of this file.
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
15
#ifndef LLVM_CLANG_LIB_FORMAT_USINGDECLARATIONSSORTER_H
16
#define LLVM_CLANG_LIB_FORMAT_USINGDECLARATIONSSORTER_H
17
18
#include "
TokenAnalyzer.h
"
19
20
namespace
clang
{
21
namespace
format {
22
23
class
UsingDeclarationsSorter
:
public
TokenAnalyzer
{
24
public
:
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 format
34
}
// end namespace clang
35
36
#endif
TokenAnalyzer.h
This file declares an abstract TokenAnalyzer, and associated helper classes.
clang::format::Environment
Definition:
TokenAnalyzer.h:37
clang::format::FormatTokenLexer
Definition:
FormatTokenLexer.h:39
clang::format::TokenAnalyzer
Definition:
TokenAnalyzer.h:88
clang::format::TokenAnalyzer::Style
FormatStyle Style
Definition:
TokenAnalyzer.h:105
clang::format::TokenAnalyzer::Env
const Environment & Env
Definition:
TokenAnalyzer.h:107
clang::format::TokenAnnotator
Determines extra information about the tokens comprising an UnwrappedLine.
Definition:
TokenAnnotator.h:195
clang::format::UsingDeclarationsSorter
Definition:
UsingDeclarationsSorter.h:23
clang::format::UsingDeclarationsSorter::analyze
std::pair< tooling::Replacements, unsigned > analyze(TokenAnnotator &Annotator, SmallVectorImpl< AnnotatedLine * > &AnnotatedLines, FormatTokenLexer &Tokens) override
Definition:
UsingDeclarationsSorter.cpp:212
llvm::SmallVectorImpl
Definition:
Randstruct.h:18
clang
Definition:
CalledOnceCheck.h:17
clang::format::FormatStyle
The FormatStyle is used to configure the formatting to follow specific guidelines.
Definition:
Format.h:55
Generated on Wed May 31 2023 07:39:50 for clang by
1.9.6