clang: lib/Format/Format.cpp File Reference (original) (raw)
Functions
const std::error_category &
clang::format::getParseCategory ()
std::error_code
clang::format::make_error_code (ParseError e)
llvm::Error
clang::format::make_string_error (const Twine &Message)
static void
clang::format::expandPresetsBraceWrapping (FormatStyle &Expanded)
static void
clang::format::expandPresetsSpaceBeforeParens (FormatStyle &Expanded)
static void
clang::format::expandPresetsSpacesInParens (FormatStyle &Expanded)
FormatStyle
clang::format::getLLVMStyle (FormatStyle::LanguageKind Language)
FormatStyle
clang::format::getGoogleStyle (FormatStyle::LanguageKind Language)
FormatStyle
clang::format::getChromiumStyle (FormatStyle::LanguageKind Language)
FormatStyle
clang::format::getMozillaStyle ()
FormatStyle
clang::format::getWebKitStyle ()
FormatStyle
FormatStyle
clang::format::getMicrosoftStyle (FormatStyle::LanguageKind Language)
FormatStyle
clang::format::getClangFormatStyle ()
FormatStyle
clang::format::getPredefinedStyle (StringRef Name, FormatStyle::LanguageKind Language, FormatStyle *Style)
clang::format::validateQualifierOrder (FormatStyle *Style)
std::error_code
clang::format::parseConfiguration (llvm::MemoryBufferRef Config, FormatStyle *Style, bool AllowUnknownOptions, llvm::SourceMgr::DiagHandlerTy DiagHandler, void *DiagHandlerCtxt, bool IsDotHFile)
std::string
clang::format::configurationAsText (const FormatStyle &Style)
static bool
clang::format::affectsRange (ArrayRef< tooling::Range > Ranges, unsigned Start, unsigned End)
static std::pair< unsigned, unsigned >
clang::format::FindCursorIndex (const ArrayRef< IncludeDirective > &Includes, const ArrayRef< unsigned > &Indices, unsigned Cursor)
std::string
clang::format::replaceCRLF (const std::string &Code)
static void
clang::format::sortCppIncludes (const FormatStyle &Style, const ArrayRef< IncludeDirective > &Includes, ArrayRef< tooling::Range > Ranges, StringRef FileName, StringRef Code, tooling::Replacements &Replaces, unsigned *Cursor)
clang::format::sortCppIncludes (const FormatStyle &Style, StringRef Code, ArrayRef< tooling::Range > Ranges, StringRef FileName, tooling::Replacements &Replaces, unsigned *Cursor)
static unsigned
clang::format::findJavaImportGroup (const FormatStyle &Style, StringRef ImportIdentifier)
static void
clang::format::sortJavaImports (const FormatStyle &Style, const ArrayRef< JavaImportDirective > &Imports, ArrayRef< tooling::Range > Ranges, StringRef FileName, StringRef Code, tooling::Replacements &Replaces)
clang::format::sortJavaImports (const FormatStyle &Style, StringRef Code, ArrayRef< tooling::Range > Ranges, StringRef FileName, tooling::Replacements &Replaces)
clang::format::isMpegTS (StringRef Code)
clang::format::isLikelyXml (StringRef Code)
clang::format::sortIncludes (const FormatStyle &Style, StringRef Code, ArrayRef< tooling::Range > Ranges, StringRef FileName, unsigned *Cursor)
template<typename T>
static Expected< tooling::Replacements >
clang::format::processReplacements (T ProcessFunc, StringRef Code, const tooling::Replacements &Replaces, const FormatStyle &Style)
Expected< tooling::Replacements >
clang::format::formatReplacements (StringRef Code, const tooling::Replacements &Replaces, const FormatStyle &Style)
Expected< tooling::Replacements >
clang::format::cleanupAroundReplacements (StringRef Code, const tooling::Replacements &Replaces, const FormatStyle &Style)
std::pair< tooling::Replacements, unsigned >
clang::format::internal::reformat (const FormatStyle &Style, StringRef Code, ArrayRef< tooling::Range > Ranges, unsigned FirstStartColumn, unsigned NextStartColumn, unsigned LastStartColumn, StringRef FileName, FormattingAttemptStatus *Status)
Reformats the given Ranges in the code fragment Code.
clang::format::reformat (const FormatStyle &Style, StringRef Code, ArrayRef< tooling::Range > Ranges, StringRef FileName, FormattingAttemptStatus *Status)
clang::format::cleanup (const FormatStyle &Style, StringRef Code, ArrayRef< tooling::Range > Ranges, StringRef FileName)
clang::format::reformat (const FormatStyle &Style, StringRef Code, ArrayRef< tooling::Range > Ranges, StringRef FileName, bool *IncompleteFormat)
clang::format::fixNamespaceEndComments (const FormatStyle &Style, StringRef Code, ArrayRef< tooling::Range > Ranges, StringRef FileName)
clang::format::sortUsingDeclarations (const FormatStyle &Style, StringRef Code, ArrayRef< tooling::Range > Ranges, StringRef FileName)
clang::format::getFormattingLangOpts (const FormatStyle &Style)
static FormatStyle::LanguageKind
clang::format::getLanguageByFileName (StringRef FileName)
static FormatStyle::LanguageKind
clang::format::getLanguageByComment (const Environment &Env)
FormatStyle::LanguageKind
clang::format::guessLanguage (StringRef FileName, StringRef Code)
llvm::ErrorOr< std::unique_ptr< llvm::MemoryBuffer > >
clang::format::loadAndParseConfigFile (StringRef ConfigFile, llvm::vfs::FileSystem *FS, FormatStyle *Style, bool AllowUnknownOptions, llvm::SourceMgr::DiagHandlerTy DiagHandler, bool IsDotHFile)
Expected< FormatStyle >
clang::format::getStyle (StringRef StyleName, StringRef FileName, StringRef FallbackStyleName, StringRef Code, llvm::vfs::FileSystem *FS, bool AllowUnknownOptions, llvm::SourceMgr::DiagHandlerTy DiagHandler)
static bool
clang::format::isClangFormatOnOff (StringRef Comment, bool On)
clang::format::isClangFormatOn (StringRef Comment)
clang::format::isClangFormatOff (StringRef Comment)
This file implements functions declared in Format.h.
This will be split into separate files as we go.
Definition in file Format.cpp.