clang 20.0.0git
|
This file implements QualifierAlignmentFixer, a TokenAnalyzer that enforces either left or right const depending on the style. More...
#include "QualifierAlignmentFixer.h"
#include "FormatToken.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/Regex.h"
#include <algorithm>
#include <optional>
Go to the source code of this file.
Namespaces | |
namespace | clang |
The JSON file list parser is used to communicate input to InstallAPI. | |
namespace | clang::format |
Macros | |
#define | DEBUG_TYPE "format-qualifier-alignment-fixer" |
Functions | |
void | clang::format::addQualifierAlignmentFixerPasses (const FormatStyle &Style, SmallVectorImpl< AnalyzerPass > &Passes) |
static void | clang::format::replaceToken (const SourceManager &SourceMgr, tooling::Replacements &Fixes, const CharSourceRange &Range, std::string NewText) |
static void | clang::format::removeToken (const SourceManager &SourceMgr, tooling::Replacements &Fixes, const FormatToken *First) |
static void | clang::format::insertQualifierAfter (const SourceManager &SourceMgr, tooling::Replacements &Fixes, const FormatToken *First, const std::string &Qualifier) |
static void | clang::format::insertQualifierBefore (const SourceManager &SourceMgr, tooling::Replacements &Fixes, const FormatToken *First, const std::string &Qualifier) |
static bool | clang::format::endsWithSpace (const std::string &s) |
static bool | clang::format::startsWithSpace (const std::string &s) |
static void | clang::format::rotateTokens (const SourceManager &SourceMgr, tooling::Replacements &Fixes, const FormatToken *First, const FormatToken *Last, bool Left) |
static bool | clang::format::isConfiguredQualifier (const FormatToken *const Tok, const std::vector< tok::TokenKind > &Qualifiers) |
static bool | clang::format::isQualifier (const FormatToken *const Tok) |
void | clang::format::prepareLeftRightOrderingForQualifierAlignmentFixer (const std::vector< std::string > &Order, std::vector< std::string > &LeftOrder, std::vector< std::string > &RightOrder, std::vector< tok::TokenKind > &Qualifiers) |
bool | clang::format::isQualifierOrType (const FormatToken *Tok, const LangOptions &LangOpts) |
bool | clang::format::isConfiguredQualifierOrType (const FormatToken *Tok, const std::vector< tok::TokenKind > &Qualifiers, const LangOptions &LangOpts) |
bool | clang::format::isPossibleMacro (const FormatToken *Tok) |
This file implements QualifierAlignmentFixer, a TokenAnalyzer that enforces either left or right const depending on the style.
Definition in file QualifierAlignmentFixer.cpp.
#define DEBUG_TYPE "format-qualifier-alignment-fixer" |
Definition at line 23 of file QualifierAlignmentFixer.cpp.