Lines Matching defs:FormatStyle
451 Expected<FormatStyle> FormatStyle =
454 if (!FormatStyle) {
455 llvm::errs() << toString(FormatStyle.takeError()) << "\n";
461 FormatStyle->QualifierAlignment =
462 StringSwitch<FormatStyle::QualifierAlignmentStyle>(
464 .Case("right", FormatStyle::QAS_Right)
465 .Case("left", FormatStyle::QAS_Left)
466 .Default(FormatStyle->QualifierAlignment);
468 if (FormatStyle->QualifierAlignment == FormatStyle::QAS_Left) {
469 FormatStyle->QualifierOrder = {"const", "volatile", "type"};
470 } else if (FormatStyle->QualifierAlignment == FormatStyle::QAS_Right) {
471 FormatStyle->QualifierOrder = {"type", "const", "volatile"};
473 FormatStyle->QualifierAlignment = FormatStyle::QAS_Custom;
477 FormatStyle->QualifierOrder = {Qualifiers.begin(), Qualifiers.end()};
482 FormatStyle->SortIncludes = FormatStyle::SI_CaseSensitive;
484 FormatStyle->SortIncludes = FormatStyle::SI_Never;
487 Replacements Replaces = sortIncludes(*FormatStyle, Code->getBuffer(), Ranges,
490 const bool IsJson = FormatStyle->isJson();
494 if (IsJson && !FormatStyle->DisableFormat) {
510 reformat(*FormatStyle, *ChangedCode, Ranges, AssumedFileName, &Status);
574 Expected<clang::format::FormatStyle> FormatStyle = clang::format::getStyle(
578 if (!FormatStyle) {
579 llvm::errs() << toString(FormatStyle.takeError()) << "\n";
582 std::string Config = clang::format::configurationAsText(*FormatStyle);