reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

References

include/llvm/DebugInfo/CodeView/Formatters.h
   56       Stream << formatv("{0:X+4}", V.getIndex());
include/llvm/Support/JSON.h
  691     OS << llvm::formatv("[{0}:{1}, byte={2}]: {3}", Line, Column, Offset, Msg);
lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
  692       CommentOS << formatv("{0:X+} [{1}]", TI.getIndex(), GHR);
lib/DebugInfo/CodeView/RecordName.cpp
  137   Name = formatv("{0} {1}", Ret, Params).sstr<256>();
  146   Name = formatv("{0} {1}::{2}", Ret, Class, Params).sstr<256>();
  167     Name = formatv("{0} {1}::*", Pointee, Class);
  207   Name = formatv("<vftable {0} methods>", Shape.getEntryCount());
lib/DebugInfo/CodeView/TypeDumpVisitor.cpp
  355   W->printString("Guid", formatv("{0}", TS.getGuid()).str());
lib/DebugInfo/DWARF/DWARFAbbreviationDeclaration.cpp
  130   OS << formatv("{0}", getTag());
  133     OS << formatv("\t{0}\t{1}", Spec.Attr, Spec.Form);
lib/DebugInfo/DWARF/DWARFAcceleratorTable.cpp
  220       W.startLine() << "Form: " << formatv("{0}", Atom.second) << '\n';
  409   W.startLine() << formatv("Tag: {0}\n", Tag);
  412     W.startLine() << formatv("{0}: {1}\n", Attr.Index, Attr.Form);
  566   W.startLine() << formatv("Tag: {0}\n", Abbr->Tag);
  569     W.startLine() << formatv("{0}: ", std::get<0>(Tuple).Index);
lib/DebugInfo/DWARF/DWARFDie.cpp
  274   WithColor(OS, HighlightColor::Attribute) << formatv("{0}", Attr);
  277     OS << formatv(" [{0}]", Form);
  589             << formatv("{0}", getTag());
lib/DebugInfo/DWARF/DWARFGdbIndex.cpp
   37   OS << formatv("\n  Types CU list offset = {0:x}, has {1} entries:\n",
   41     OS << formatv("    {0}: offset = {1:x8}, type_offset = {2:x8}, "
lib/DebugInfo/DWARF/DWARFVerifier.cpp
  465                     llvm::formatv("{0:x8}", *SectionOffset));
  927       error() << formatv("Name Index @ {0:x} does not index any CU\n",
  937         error() << formatv(
  945         error() << formatv("Name Index @ {0:x} references a CU @ {1:x}, but "
  956       warn() << formatv("CU @ {0:x} not covered by any Name Index\n", KV.first);
  976     warn() << formatv("Name Index @ {0:x} does not contain a hash table.\n",
  988       error() << formatv("Bucket {0} of Name Index @ {1:x} contains invalid "
 1023       error() << formatv("Name Index @ {0:x}: Name table entries [{1}, {2}] "
 1041       error() << formatv(
 1059         error() << formatv("Name Index @ {0:x}: String ({1}) at index {2} "
 1079     error() << formatv("NameIndex @ {0:x}: Abbreviation {1:x}: {2} uses an "
 1088       error() << formatv(
 1116     warn() << formatv("NameIndex @ {0:x}: Abbreviation {1:x} contains an "
 1123     error() << formatv("NameIndex @ {0:x}: Abbreviation {1:x}: {2} uses an "
 1135     warn() << formatv("Name Index @ {0:x}: Verifying indexes of type units is "
 1145       warn() << formatv("NameIndex @ {0:x}: Abbreviation {1:x} references an "
 1152         error() << formatv("NameIndex @ {0:x}: Abbreviation {1:x} contains "
 1162       error() << formatv("NameIndex @ {0:x}: Indexing multiple compile units "
 1169       error() << formatv(
 1205     error() << formatv(
 1221       error() << formatv("Name Index @ {0:x}: Entry @ {1:x} contains an "
 1231       error() << formatv("Name Index @ {0:x}: Entry @ {1:x} references a "
 1238       error() << formatv("Name Index @ {0:x}: Entry @ {1:x}: mismatched CU of "
 1245       error() << formatv("Name Index @ {0:x}: Entry @ {1:x}: mismatched Tag of "
 1254       error() << formatv("Name Index @ {0:x}: Entry @ {1:x}: mismatched Name "
 1265                     error() << formatv("Name Index @ {0:x}: Name {1} ({2}) is "
 1272                         << formatv("Name Index @ {0:x}: Name {1} ({2}): {3}\n",
 1409       error() << formatv("Name Index @ {0:x}: Entry for DIE @ {1:x} ({2}) with "
lib/ExecutionEngine/JITLink/EHFrameSupport.cpp
  227             formatv("{0:x2}", LSDAPointerEncoding) + " in CIE at " +
  228             formatv("{0:x16}", CIESymbol.getAddress()));
  240             formatv("{0:x2}", PersonalityPointerEncoding) + " in CIE at " +
  241             formatv("{0:x16}", CIESymbol.getAddress()));
  255             formatv("{0:x2}", FDEPointerEncoding) + " in CIE at " +
  256             formatv("{0:x16}", CIESymbol.getAddress()));
  289         "FDE at " + formatv("{0:x16}", EHFrameAddress + RecordOffset) +
  291         formatv("{0:x16}", CIEPointerAddress - CIEPointer));
  310                                     formatv("{0:x16}", PCBegin) +
  315         "FDE PC-begin " + formatv("{0:x16}", PCBegin) +
  317         formatv("{0:x16}", TargetSymbol->getAddress()));
  335           ") for FDE at " + formatv("{0:x16}", EHFrameAddress + RecordOffset));
  346       return make_error<JITLinkError>("FDE LSDA " + formatv("{0:x16}", LSDA) +
  351           "FDE LSDA " + formatv("{0:x16}", LSDA) +
  353           formatv("{0:x16}", LSDASymbol->getAddress()));
lib/ExecutionEngine/JITLink/JITLink.cpp
   93   return OS << formatv("{0:x16}", B.getAddress()) << " -- "
   94             << formatv("{0:x16}", B.getAddress() + B.getSize()) << ": "
  128      << ", size = " << formatv("{0:x8}", Sym.getSize())
  129      << ", addr = " << formatv("{0:x16}", Sym.getAddress()) << " ("
  130      << formatv("{0:x16}", Sym.getAddressable().getAddress()) << " + "
  131      << formatv("{0:x8}", Sym.getOffset());
  140   OS << "edge@" << formatv("{0:x16}", B.getAddress() + E.getOffset()) << ": "
  141      << formatv("{0:x16}", B.getAddress()) << " + " << E.getOffset() << " -- "
lib/ExecutionEngine/JITLink/JITLinkGeneric.cpp
  282              << formatv("{0:x16}", Sym->getAddress()) << "\n";
lib/ExecutionEngine/JITLink/MachOLinkGraphBuilder.cpp
  134       dbgs() << "  " << *Name << ": " << formatv("{0:x16}", NSec.Address)
  135              << " -- " << formatv("{0:x16}", NSec.Address + NSec.Size)
  193           formatv(" [ {0:x16} -- {1:x16} ] ", Cur.Address,
  196           formatv(" [ {0:x16} -- {1:x16} ] ", Next.Address,
  252       dbgs() << ": value = " << formatv("{0:x16}", Value)
  253              << ", type = " << formatv("{0:x2}", Type)
  254              << ", desc = " << formatv("{0:x4}", Desc) << ", sect = ";
  388                  << formatv("{0:x16}", NSec.Address) << " -- "
  389                  << formatv("{0:x16}", NSec.Address + NSec.Size) << "\n";
  427                << formatv("{0:x16}", NSec.Address) << " -- "
  428                << formatv("{0:x16}", NSec.Address + AnonBlockSize) << " ]\n";
  458         dbgs() << "    Creating block for " << formatv("{0:x16}", BlockStart)
  459                << " -- " << formatv("{0:x16}", BlockEnd) << ": "
  461                << formatv("{0:x16}", BlockOffset) << " with "
  485           dbgs() << "      " << formatv("{0:x16}", NSym.Value) << " -- "
  486                  << formatv("{0:x16}", SymEnd) << ": ";
lib/ExecutionEngine/JITLink/MachOLinkGraphBuilder.h
  181                                       formatv("{0:u}", Index));
  194                                       formatv("{0:u}", Index));
  215                                     formatv("{0:x16}", Address));
lib/ExecutionEngine/JITLink/MachO_arm64.cpp
   99         formatv("{0:x8}", RI.r_address) +
  100         ", symbolnum=" + formatv("{0:x6}", RI.r_symbolnum) +
  101         ", kind=" + formatv("{0:x1}", RI.r_type) +
  104         ", length=" + formatv("{0:d}", RI.r_length));
  258                                             formatv("{0:x16}", FixupAddress));
lib/ExecutionEngine/JITLink/MachO_x86_64.cpp
  102         formatv("{0:x8}", RI.r_address) +
  103         ", symbolnum=" + formatv("{0:x6}", RI.r_symbolnum) +
  104         ", kind=" + formatv("{0:x1}", RI.r_type) +
  107         ", length=" + formatv("{0:d}", RI.r_length));
lib/IR/PassTimingInfo.cpp
  124       num <= 1 ? PassDesc.str() : formatv("{0} #{1}", PassDesc, num).str();
  175   std::string FullDesc = formatv("{0} #{1}", PassID, Count).str();
lib/Object/WindowsResource.cpp
  851     auto RelocationName = formatv("$R{0:X-6}", i & 0xffffff).sstr<COFF::NameSize>();
lib/Passes/PassBuilder.cpp
 1471             formatv("invalid LoopUnrollPass parameter '{0}' ", ParamName).str(),
 1490           formatv("invalid LoopUnrollPass parameter '{0}' ", ParamName).str(),
 1510             formatv("invalid argument to MemorySanitizer pass track-origins "
 1517           formatv("invalid MemorySanitizer pass parameter '{0}' ", ParamName)
 1545             formatv("invalid argument to SimplifyCFG pass bonus-threshold "
 1552           formatv("invalid SimplifyCFG pass parameter '{0}' ", ParamName).str(),
 1573           formatv("invalid LoopVectorize parameter '{0}' ", ParamName).str(),
 1591           formatv("invalid LoopUnswitch pass parameter '{0}' ", ParamName)
 1610           formatv("invalid MergedLoadStoreMotion pass parameter '{0}' ",
 1854         formatv("invalid use of '{0}' pass as module pipeline", Name).str(),
 1864           formatv("unknown default pipeline alias '{0}'", Name).str(),
 1929       formatv("unknown module pass '{0}'", Name).str(),
 1983         formatv("invalid use of '{0}' pass as cgscc pipeline", Name).str(),
 2012       formatv("unknown cgscc pass '{0}'", Name).str(),
 2059         formatv("invalid use of '{0}' pass as function pipeline", Name).str(),
 2095       formatv("unknown function pass '{0}'", Name).str(),
 2130         formatv("invalid use of '{0}' pass as loop pipeline", Name).str(),
 2166   return make_error<StringError>(formatv("unknown loop pass '{0}'", Name).str(),
 2264         formatv("invalid pipeline '{0}'", PipelineText).str(),
 2287           formatv("unknown {0} name '{1}'",
 2307         formatv("invalid pipeline '{0}'", PipelineText).str(),
 2313         formatv("unknown cgscc pass '{0}' in pipeline '{1}'", FirstName,
 2332         formatv("invalid pipeline '{0}'", PipelineText).str(),
 2338         formatv("unknown function pass '{0}' in pipeline '{1}'", FirstName,
 2356         formatv("invalid pipeline '{0}'", PipelineText).str(),
 2379           formatv("unknown alias analysis name '{0}'", Name).str(),
lib/Passes/StandardInstrumentations.cpp
   43     return std::make_pair(M, formatv(" (function: {0})", F->getName()).str());
   52         return std::make_pair(M, formatv(" (scc: {0})", C->getName()).str());
   67     return std::make_pair(M, formatv(" (loop: {0})", ss.str()).str());
  130     std::string Extra = formatv(" (scc: {0})", C->getName());
  181   SmallString<20> Banner = formatv("*** IR Dump Before {0} ***", PassID);
  196   SmallString<20> Banner = formatv("*** IR Dump After {0} ***", PassID);
  217       formatv("*** IR Dump After {0} *** invalidated: ", PassID);
lib/Support/FileCheck.cpp
 1311   std::string Message = formatv("{0}: {1} string found in input",
 1316     Message += formatv(" ({0} out of {1})", MatchedCount, Pat.getCount()).str();
 1374   std::string Message = formatv("{0}: {1} string not found in input",
 1379     Message += formatv(" ({0} out of {1})", MatchedCount, Pat.getCount()).str();
lib/Support/Signals.cpp
  185       OS << right_justify(formatv("#{0}", frame_no++).str(),
lib/Testing/Support/Annotations.cpp
   94   return O << llvm::formatv("[{0}, {1})", R.Begin, R.End);
lib/Transforms/Utils/MisExpect.cpp
   77       formatv("{0:P} ({1} / {2})", PercentageCorrect, ProfCount, TotalCount);
   78   auto RemStr = formatv(
lib/XRay/RecordPrinter.cpp
   16   OS << formatv("<Buffer: size = {0} bytes>", R.size()) << Delim;
   21   OS << formatv("<Wall Time: seconds = {0}.{1,0+6}>", R.seconds(), R.nanos())
   27   OS << formatv("<CPU: id = {0}, tsc = {1}>", R.cpuid(), R.tsc()) << Delim;
   32   OS << formatv("<TSC Wrap: base = {0}>", R.tsc()) << Delim;
   37   OS << formatv(
   45   OS << formatv("<Custom Event: delta = +{0}, size = {1}, data = '{2}'>",
   52   OS << formatv(
   60   OS << formatv("<Call Argument: data = {0} (hex = {0:x})>", R.arg()) << Delim;
   65   OS << formatv("<PID: {0}>", R.pid()) << Delim;
   70   OS << formatv("<Thread ID: {0}>", R.tid()) << Delim;
   83     OS << formatv("<Function Enter: #{0} delta = +{1}>", R.functionId(),
   87     OS << formatv("<Function Enter With Arg: #{0} delta = +{1}>",
   91     OS << formatv("<Function Exit: #{0} delta = +{1}>", R.functionId(),
   95     OS << formatv("<Function Tail Exit: #{0} delta = +{1}>", R.functionId(),
tools/clang/lib/Driver/Driver.cpp
 1529   std::string Usage = llvm::formatv("{0} [options] file...", Name).str();
tools/clang/lib/StaticAnalyzer/Core/SarifDiagnostics.cpp
  355   OS << llvm::formatv("{0:2}\n", json::Value(std::move(Sarif)));
tools/clang/lib/Tooling/Inclusions/HeaderIncludes.cpp
  318       llvm::formatv(IsAngled ? "<{0}>" : "\"{0}\"", IncludeName);
  335   std::string NewInclude = llvm::formatv("#include {0}\n", QuotedName);
tools/clang/lib/Tooling/Syntax/BuildTree.cpp
  165         R += llvm::formatv("- '{0}' covers '{1}'+{2} tokens\n",
tools/clang/lib/Tooling/Syntax/Tokens.cpp
  107   return OS << llvm::formatv("FileRange(file = {0}, offsets = {1}-{2})",
  164   return llvm::formatv("spelled tokens: [{0},{1}), expanded tokens: [{2},{3})",
  561   return llvm::formatv("Token({0}, length = {1})", tok::getTokenName(kind()),
  566   return llvm::formatv("{0}   {1}", tok::getTokenName(kind()), text(SM));
  609     OS << llvm::formatv("file '{0}'\n", Entry->getName())
  621       OS << llvm::formatv(
tools/clang/tools/extra/clang-tidy/google/AvoidNSObjectNewCheck.cpp
   83         llvm::formatv("[{0} {1}]", ClassName, FactorySelector);
   88     std::string NewCall = llvm::formatv("[[{0} alloc] init]", Receiver);
tools/clang/tools/extra/clangd/ClangdLSPServer.cpp
  280           llvm::formatv("failed to receive a client reply for request ({0})",
  727         llvm::formatv("Unsupported command \"{0}\".", Params.command).str(),
tools/clang/tools/extra/clangd/CodeComplete.cpp
 1810   LSP.detail = BundleSize > 1 ? llvm::formatv("[{0} overloads]", BundleSize)
tools/clang/tools/extra/clangd/DraftStore.cpp
   74           llvm::formatv(
   91           llvm::formatv("Change's rangeLength ({0}) doesn't match the "
tools/clang/tools/extra/clangd/FindSymbols.cpp
   49         formatv("Could not resolve path for symbol '{0}': {1}",
tools/clang/tools/extra/clangd/FormattedString.cpp
  190       R += llvm::formatv("codeblock({0}) [\n{1}\n]\n", C.Language, C.Contents);
tools/clang/tools/extra/clangd/IncludeFixer.cpp
  177                 Fix{llvm::formatv("Add include {0} for symbol {1}{2}",
  405   auto ReqStr = llvm::formatv("{0}", toJSON(Req)).str();
tools/clang/tools/extra/clangd/JSONTransport.cpp
  109     OS << llvm::formatv(Pretty ? "{0:2}" : "{0}", Message);
tools/clang/tools/extra/clangd/Logger.cpp
   56   Logs << llvm::formatv("{0}[{1:%H:%M:%S.%L}] {2}\n", indicator(Level),
tools/clang/tools/extra/clangd/Logger.h
   46   detail::log(L, llvm::formatv(Fmt, detail::wrap(std::forward<Ts>(Vals))...));
tools/clang/tools/extra/clangd/Quality.cpp
  252   OS << llvm::formatv("=== Symbol quality: {0}\n", S.evaluate());
  253   OS << llvm::formatv("\tReferences: {0}\n", S.References);
  254   OS << llvm::formatv("\tDeprecated: {0}\n", S.Deprecated);
  255   OS << llvm::formatv("\tReserved name: {0}\n", S.ReservedName);
  256   OS << llvm::formatv("\tCategory: {0}\n", static_cast<int>(S.Category));
  426   OS << llvm::formatv("=== Symbol relevance: {0}\n", S.evaluate());
  427   OS << llvm::formatv("\tName: {0}\n", S.Name);
  428   OS << llvm::formatv("\tName match: {0}\n", S.NameMatch);
  430     OS << llvm::formatv(
  433   OS << llvm::formatv("\tForbidden: {0}\n", S.Forbidden);
  434   OS << llvm::formatv("\tNeedsFixIts: {0}\n", S.NeedsFixIts);
  435   OS << llvm::formatv("\tIsInstanceMember: {0}\n", S.IsInstanceMember);
  436   OS << llvm::formatv("\tContext: {0}\n", getCompletionKindString(S.Context));
  437   OS << llvm::formatv("\tQuery type: {0}\n", static_cast<int>(S.Query));
  438   OS << llvm::formatv("\tScope: {0}\n", static_cast<int>(S.Scope));
  440   OS << llvm::formatv("\tSymbol URI: {0}\n", S.SymbolURI);
  441   OS << llvm::formatv("\tSymbol scope: {0}\n",
  446     OS << llvm::formatv("\tIndex URI proximity: {0} (distance={1})\n",
  449   OS << llvm::formatv("\tSema file proximity: {0}\n", S.SemaFileProximityScore);
  451   OS << llvm::formatv("\tSema says in scope: {0}\n", S.SemaSaysInScope);
  453     OS << llvm::formatv("\tIndex scope boost: {0}\n",
  456   OS << llvm::formatv(
  495   OS << llvm::formatv("=== Signature Quality:\n");
  496   OS << llvm::formatv("\tNumber of parameters: {0}\n", S.NumberOfParameters);
  497   OS << llvm::formatv("\tNumber of optional parameters: {0}\n",
  499   OS << llvm::formatv("\tKind: {0}\n", S.Kind);
tools/clang/tools/extra/clangd/SourceCode.cpp
  158         llvm::formatv("Line value can't be negative ({0})", P.line),
  162         llvm::formatv("Character value can't be negative ({0})", P.character),
  169           llvm::formatv("Line value is out of range ({0})", P.line),
  181         llvm::formatv("{0} offset {1} is invalid for line {2}", lspEncoding(),
tools/clang/tools/extra/clangd/URI.cpp
  174     return make_string_error(llvm::formatv("Invalid scheme: {0} (decoded: {1})",
tools/clang/tools/extra/clangd/index/dex/dexp/Dexp.cpp
   47   llvm::outs() << llvm::formatv("{0} took {1:ms+n}.\n", Name, Duration);
  148     llvm::outs() << llvm::formatv(OutputFormat, "Rank", "Symbol ID",
  152       llvm::outs() << llvm::formatv(OutputFormat, Rank++, Sym.ID.str(),
  233         llvm::outs() << llvm::formatv(
  305         llvm::outs() << llvm::formatv("{0,16} - {1}\n", C.Name, C.Description);
tools/clang/tools/extra/clangd/refactor/Rename.cpp
  136       llvm::formatv("Cannot rename symbol: {0}", Message(Reason)),
tools/clang/tools/extra/clangd/refactor/tweaks/DumpAST.cpp
   44     return llvm::formatv("Dump {0} AST", Node->getNodeKind().asStringRef());
  124     return llvm::formatv(
tools/clang/tools/extra/clangd/refactor/tweaks/ExpandMacro.cpp
  129   return llvm::formatv("Expand macro '{0}'", MacroName);
tools/clang/tools/extra/clangd/refactor/tweaks/RemoveUsingNamespace.cpp
  202   return llvm::formatv("Remove using namespace, re-qualify names instead.");
tools/clang/tools/extra/clangd/unittests/DiagnosticsTests.cpp
   70     *result_listener << llvm::formatv("expected:\n{0:2}\ngot\n{1:2}",
tools/clang/tools/extra/clangd/unittests/FindTargetTests.cpp
  572       DumpedReferences += llvm::formatv("{0}: {1}\n", I, Refs[I]);
tools/clang/tools/extra/clangd/unittests/GlobalCompilationDatabaseTests.cpp
  228       OS << llvm::formatv(Contents.data(),
tools/clang/tools/extra/clangd/unittests/SemanticHighlightingTests.cpp
   92     Result += llvm::formatv("${0}[[{1}]]", T.Kind,
tools/clang/tools/libclang/CIndexCodeCompletion.cpp
  753       llvm::formatv("-code-completion-at={0}:{1}:{2}", complete_filename,
tools/clang/unittests/Tooling/DependencyScannerTest.cpp
   86   std::string HeaderPath = llvm::formatv("{0}root{0}header.h", Sept);
   87   std::string SymlinkPath = llvm::formatv("{0}root{0}symlink.h", Sept);
   88   std::string TestPath = llvm::formatv("{0}root{0}test.cpp", Sept);
  133   std::string HeaderPath = llvm::formatv("{0}root{0}header.h", Sept);
  134   std::string SymlinkPath = llvm::formatv("{0}root{0}symlink.h", Sept);
  135   std::string TestPath = llvm::formatv("{0}root{0}test.cpp", Sept);
  136   std::string Test2Path = llvm::formatv("{0}root{0}test2.cpp", Sept);
  172   std::string HeaderPath = llvm::formatv("{0}root{0}header.h", Sept);
  173   std::string SymlinkPath = llvm::formatv("{0}root{0}symlink.h", Sept);
  174   std::string TestPath = llvm::formatv("{0}root{0}test.cpp", Sept);
tools/lld/wasm/Writer.cpp
  244     log(formatv("mem: {0,-15} offset={1,-8} size={2,-8} align={3}", seg->name,
  261     log(formatv("mem: {0,-15} offset={1,-8} size={2,-8} align={3}",
tools/lldb/include/lldb/Interpreter/CommandReturnObject.h
  114     AppendMessage(llvm::formatv(format, std::forward<Args>(args)...).str());
  124     AppendError(llvm::formatv(format, std::forward<Args>(args)...).str());
tools/lldb/include/lldb/Utility/Log.h
  142     Format(file, function, llvm::formatv(format, std::forward<Args>(args)...));
  150            llvm::formatv(format, llvm::toString(std::move(error)),
tools/lldb/include/lldb/Utility/Status.h
  176     SetErrorString(llvm::formatv(format, std::forward<Args>(args)...).str());
tools/lldb/include/lldb/Utility/Stream.h
  423     PutCString(llvm::formatv(format, std::forward<Args>(args)...).str());
tools/lldb/source/Host/common/Host.cpp
  651     OS << formatv("{0}{1:x-2}", type, WS.status);
tools/lldb/source/Host/common/TCPSocket.cpp
  123     return llvm::formatv("connect://[{0}]:{1}", GetRemoteIPAddress(),
  283       llvm::errs() << llvm::formatv(
tools/lldb/source/Host/common/UDPSocket.cpp
  139     return llvm::formatv("udp://[{0}]:{1}", m_sockaddr.GetIPAddress(),
tools/lldb/source/Host/posix/DomainSocket.cpp
  149     return llvm::formatv("{0}://{1}",
tools/lldb/source/Interpreter/Options.cpp
  933   std::string short_opt = llvm::formatv("-{0}", char(long_option.val)).str();
  935       llvm::formatv("--{0}", long_option.definition->long_option);
 1028           llvm::formatv("Invalid option with value '{0}'.", char(val)).str(),
 1043             llvm::formatv("Option '{0}' is missing argument specifier.",
 1056           llvm::formatv("error with options table; invalid value in has_arg "
tools/lldb/source/Plugins/Language/CPlusPlus/LibCxxBitset.cpp
  109   m_elements[idx] = CreateValueObjectFromData(llvm::formatv("[{0}]", idx).str(),
tools/lldb/source/Plugins/Language/CPlusPlus/LibCxxList.cpp
  288   return CreateValueObjectFromData(llvm::formatv("[{0}]", idx).str(), data,
tools/lldb/source/Plugins/Language/CPlusPlus/LibCxxOptional.cpp
   74   return val_sp->Clone(ConstString(llvm::formatv("Value").str()));
tools/lldb/source/Plugins/Language/CPlusPlus/LibCxxTuple.cpp
   80         elem_sp->Clone(ConstString(llvm::formatv("[{0}]", idx).str())).get();
tools/lldb/source/Plugins/ObjectFile/Breakpad/BreakpadRecords.cpp
  297   return OS << llvm::formatv("FUNC {0}{1:x-} {2:x-} {3:x-} {4}",
  333   return OS << llvm::formatv("{0:x-} {1:x-} {2} {3}", R.Address, R.Size,
  354   return OS << llvm::formatv("PUBLIC {0}{1:x-} {2:x-} {3}",
  402   OS << llvm::formatv("{0:x-} ", R.Address);
  404     OS << llvm::formatv("{0:x-} ", *R.Size);
  477   return OS << llvm::formatv(
tools/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
 1151           llvm::formatv("netbsd{0}.{1}.{2}", version_major, version_minor,
 1699     return llvm::formatv("{0}[{1}]", SegmentName, SegmentCount).str();
tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
 1107           llvm::formatv("--log-file={0}", env_debugserver_log_file).str());
 1122           llvm::formatv("--log-channels={0}", env_debugserver_log_channels)
tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
 3975   std::string packet = formatv("QPassSignals:{0:$[;]@(x-2)}", range).str();
tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
  302     llvm::errs() << llvm::formatv("failed to attach to process {0}: {1}", pid,
tools/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
   67   s.value(llvm::formatv("Python Obj: {0:X}", GetValue()).str());
tools/lldb/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.cpp
  328               llvm::formatv("<unnamed-type-$S{0}>", unnamed_type_index).str();
tools/lldb/source/Symbol/ClangASTContext.cpp
 6918           child_name = llvm::formatv("[{0}]", idx);
tools/lldb/source/Symbol/CxxModuleHandler.cpp
  103     OS << llvm::formatv("error when reconstructing context of kind {0}:{1}",
tools/lldb/source/Target/MemoryRegionInfo.cpp
   13   return OS << llvm::formatv("MemoryRegionInfo([{0}, {1}), {2}, {3}, {4}, {5}, "
tools/lldb/source/Utility/Log.cpp
   51   stream << llvm::formatv("Logging categories for '{0}':\n", entry.first());
   54                     stream << llvm::formatv("  {0} - {1}\n", name, description);
   78     stream << llvm::formatv("error: unrecognized log category '{0}'\n",
  207     error_stream << llvm::formatv("Invalid log channel '{0}'.\n", channel);
  222     error_stream << llvm::formatv("Invalid log channel '{0}'.\n", channel);
  236     stream << llvm::formatv("Invalid log channel '{0}'.\n", channel);
  291     OS << llvm::formatv("{0:f9} ", now.count());
  296     OS << llvm::formatv("[{0,0+4}/{1,0+4}] ", getpid(),
  307     OS << llvm::formatv(format_str.c_str(), thread_name);
  317     OS << llvm::formatv("{0,-60:60} ", (file + ":" + function).str());
tools/lldb/source/Utility/StructuredData.cpp
  175   s.value(llvm::formatv("{0:X}", m_object));
tools/lldb/tools/lldb-server/LLDBServerUtilities.cpp
   30     errs() << llvm::formatv(
   57       errs() << formatv("Unable to setup logging for channel \"{0}\": {1}",
tools/lldb/tools/lldb-server/lldb-gdbserver.cpp
  195     llvm::errs() << llvm::formatv("error: failed to launch '{0}': {1}\n",
  452           llvm::errs() << llvm::formatv(
tools/lldb/tools/lldb-server/lldb-platform.cpp
  209         llvm::errs() << llvm::formatv("error: port offset {0} is not in the "
  226         llvm::errs() << llvm::formatv("error: port number {0} is not in the "
tools/lldb/tools/lldb-test/FormatUtil.h
   49     printLine(llvm::formatv(Fmt, std::forward<Ts>(Items)...));
tools/lldb/tools/lldb-test/lldb-test.cpp
  281       llvm::formatv(Format, std::forward<Args>(args)...).str(),
  291     errs() << formatv("Failed to create target '{0}: {1}\n", Filename, ST);
  300     errs() << formatv("Could not open file '{0}: {1}\n", Filename,
  452   outs() << formatv("Found {0} functions:\n", List.GetSize());
  489   outs() << formatv("Found {0} blocks:\n", List.GetSize());
  534   outs() << formatv("Found {0} types:\n", Map.GetSize());
  573   outs() << formatv("Found {0} variables:\n", List.GetSize());
  929   outs() << formatv("Command: {0} = malloc(size={1}, alignment={2})\n", Label,
  947     outs() << formatv("Malloc error: {0}\n", ST);
  952   outs() << formatv("Malloc: address = {0:x}\n", Addr);
  966            << formatv(", previous allocation at [{0:x}, {1:x})\n", I.start(),
  988   outs() << formatv("Command: free({0})\n", Label);
  999     outs() << formatv("Free error: {0}\n", ST);
 1006     outs() << formatv("Free: [{0:x}, {1:x})\n", Interval.start(),
 1027     outs() << formatv("Failed: {0}\n", Result.GetErrorData());
tools/lldb/tools/lldb-vscode/JSONUtils.cpp
  537       line_strm << llvm::formatv("{0:X+}: <{1}> {2} {3,12} {4}", inst_addr,
tools/lldb/tools/lldb-vscode/lldb-vscode.cpp
 1227           llvm::formatv("Could not load program '{0}'.", program).str());
tools/lldb/unittests/Host/HostTest.cpp
   16   EXPECT_EQ("W01", formatv("{0:g}", WaitStatus{WaitStatus::Exit, 1}).str());
   17   EXPECT_EQ("X02", formatv("{0:g}", WaitStatus{WaitStatus::Signal, 2}).str());
   18   EXPECT_EQ("S03", formatv("{0:g}", WaitStatus{WaitStatus::Stop, 3}).str());
   20             formatv("{0}", WaitStatus{WaitStatus::Exit, 4}).str());
tools/lldb/unittests/Host/MainLoopTest.cpp
   45         llvm::formatv("localhost:{0}", listen_socket_up->GetLocalPortNumber())
tools/lldb/unittests/Signals/UnixSignalsTest.cpp
   33   std::string location = llvm::formatv("{0}:{1}", file, line);
tools/lldb/unittests/Symbol/PostfixExpressionTest.cpp
   44     return llvm::formatv("{0}({1}, {2})", ToString(binary.GetOpType()),
   51     return llvm::formatv("int({0})", integer.GetValue());
   55     return llvm::formatv("reg({0})", reg.GetRegNum());
   63     return llvm::formatv("{0}({1})", ToString(unary.GetOpType()),
tools/lldb/unittests/Target/MemoryRegionInfoTest.cpp
   16   EXPECT_EQ("yes", llvm::formatv("{0}", MemoryRegionInfo::eYes).str());
   17   EXPECT_EQ("no", llvm::formatv("{0}", MemoryRegionInfo::eNo).str());
   18   EXPECT_EQ("don't know", llvm::formatv("{0}", MemoryRegionInfo::eDontKnow).str());
tools/lldb/unittests/Utility/ConstStringTest.cpp
   16   EXPECT_EQ("foo", llvm::formatv("{0}", ConstString("foo")).str());
tools/lldb/unittests/Utility/FileSpecTest.cpp
  275   EXPECT_EQ("(empty)", llvm::formatv("{0}", F).str());
  276   EXPECT_EQ("(empty)", llvm::formatv("{0:D}", F).str());
  277   EXPECT_EQ("(empty)", llvm::formatv("{0:F}", F).str());
  280   EXPECT_EQ("C:\\foo\\bar.txt", llvm::formatv("{0}", F).str());
  281   EXPECT_EQ("C:\\foo\\", llvm::formatv("{0:D}", F).str());
  282   EXPECT_EQ("bar.txt", llvm::formatv("{0:F}", F).str());
  285   EXPECT_EQ("foo\\bar.txt", llvm::formatv("{0}", F).str());
  286   EXPECT_EQ("foo\\", llvm::formatv("{0:D}", F).str());
  287   EXPECT_EQ("bar.txt", llvm::formatv("{0:F}", F).str());
  290   EXPECT_EQ("foo", llvm::formatv("{0}", F).str());
  291   EXPECT_EQ("foo", llvm::formatv("{0:F}", F).str());
  292   EXPECT_EQ("(empty)", llvm::formatv("{0:D}", F).str());
tools/lldb/unittests/Utility/LogTest.cpp
  241   EXPECT_EQ(llvm::formatv("[{0,0+4}/{1,0+4}] Hello World\n", ::getpid(),
tools/lldb/unittests/Utility/StateTest.cpp
   17   EXPECT_EQ("invalid", llvm::formatv("{0}", eStateInvalid).str());
   18   EXPECT_EQ("unloaded", llvm::formatv("{0}", eStateUnloaded).str());
   19   EXPECT_EQ("connected", llvm::formatv("{0}", eStateConnected).str());
   20   EXPECT_EQ("attaching", llvm::formatv("{0}", eStateAttaching).str());
   21   EXPECT_EQ("launching", llvm::formatv("{0}", eStateLaunching).str());
   22   EXPECT_EQ("stopped", llvm::formatv("{0}", eStateStopped).str());
   23   EXPECT_EQ("running", llvm::formatv("{0}", eStateRunning).str());
   24   EXPECT_EQ("stepping", llvm::formatv("{0}", eStateStepping).str());
   25   EXPECT_EQ("crashed", llvm::formatv("{0}", eStateCrashed).str());
   26   EXPECT_EQ("detached", llvm::formatv("{0}", eStateDetached).str());
   27   EXPECT_EQ("exited", llvm::formatv("{0}", eStateExited).str());
   28   EXPECT_EQ("suspended", llvm::formatv("{0}", eStateSuspended).str());
tools/lldb/unittests/Utility/StatusTest.cpp
   20   EXPECT_EQ("", llvm::formatv("{0}", Status()).str());
   21   EXPECT_EQ("Hello Status", llvm::formatv("{0}", Status("Hello Status")).str());
   22   EXPECT_EQ("Hello", llvm::formatv("{0:5}", Status("Hello Error")).str());
tools/lldb/unittests/Utility/TimeoutTest.cpp
   26             llvm::formatv("{0}", Timeout<std::milli>(llvm::None)).str());
   28             llvm::formatv("{0}", Timeout<std::milli>(seconds(1))).str());
tools/lldb/unittests/tools/lldb-server/tests/MessageObjects.cpp
  371   return OS << formatv("RegisterValue[{0}]: {1:@[x-2]}", RegVal.GetByteSize(),
tools/lldb/unittests/tools/lldb-server/tests/MessageObjects.h
  175       llvm::formatv(format.data(), std::forward<Args>(args)...).str();
tools/lldb/unittests/tools/lldb-server/tests/TestClient.cpp
  156   return SendMessage(formatv("Z0,{0:x-},1", address).str());
  162   return Continue(formatv("vCont;c:{0:x-}", thread_id).str());
  201         formatv("Error sending message `{0}`: {1}", message, result).str(),
  223     std::string Message = formatv("qRegisterInfo{0:x-}", Reg).str();
  261           formatv("Expected connection close after sending {0}. Got {1}/{2} "
tools/lldb/unittests/tools/lldb-server/tests/TestClient.h
   68         llvm::formatv("Unexpected Stop Reply {0}", m_stop_reply->getKind()),
tools/llvm-ar/llvm-ar.cpp
  484     outs() << ' ' << formatv("{0:%b %e %H:%M %Y}", ModTimeInNs);
tools/llvm-cfi-verify/llvm-cfi-verify.cpp
  221   outs() << formatv("\nTotal Indirect CF Instructions: {0}\n"
tools/llvm-exegesis/lib/Analysis.cpp
   98       OS, formatv(SimpleFloatFormat.data(), Value).sstr<SerializationLen>());
tools/llvm-exegesis/lib/SnippetGenerator.cpp
  162   CT.Info = formatv("{0}, repeating an unconstrained assignment", Msg);
tools/llvm-exegesis/lib/X86/Target.cpp
  230           CT.Config = formatv("{3}(%{0}, %{1}, {2})", RegInfo.getName(BaseReg),
tools/llvm-jitlink/llvm-jitlink.cpp
  209           OS << formatv("\n{0:x16}:", NextAddr);
  217           OS << formatv("\n{0:x16}:", NextAddr);
  221           OS << formatv(" {0:x-2}", SymData[NextAddr - SymStart]);
tools/llvm-objdump/llvm-objdump.cpp
  646             formatv(
tools/llvm-pdbutil/BytesOutputStyle.cpp
  221     std::string Label = formatv("Block {0}", I).str();
  318     P.formatMsfStreamData(formatv("Type {0}", TI).str(), File, Layout, OneType);
tools/llvm-pdbutil/DumpOutputStyle.cpp
  552     NameInsert = formatv("[{0}]", SectionName).str();
  899     std::string Label = formatv("namespace '{0}'", Stat.Key);
 1042             TIs.push_back(formatv("{0,+10:X+}", fmtle(I)));
tools/llvm-pdbutil/FormatUtil.cpp
   55     return formatv("{0} \"{1}\"", Label, Name).str();
   59   return formatv("{0} \"{1}\"", Label, TN).str();
   66     return formatv("{0} \"{1}\"", Label, Name).str();
   70   return formatv("{0} \"{1}\"", Label, TN).str();
   85       Result += formatv("{0}", fmt_repeat(' ', IndentLevel));
   95     Result += formatv("\n{0}{1}", fmt_repeat(' ', IndentLevel), S);
  172   return formatv("{0:4}:{1:4}", Segment, Offset);
tools/llvm-pdbutil/FormatUtil.h
   45   return formatv("unknown ({0})",
tools/llvm-pdbutil/InputFile.cpp
  257     return make_error<StringError>(formatv("File {0} not found", Path),
  263         formatv("Unable to identify file type for file {0}", Path), EC);
  288         formatv("File {0} is not a supported file type", Path),
  294         formatv("File {0} could not be opened", Path), Result.getError());
tools/llvm-pdbutil/LinePrinter.cpp
  237       OS << formatv("  {0}",
  254     OS << formatv("Block {0} (\n", uint32_t(Blocks.front()));
tools/llvm-pdbutil/LinePrinter.h
   45     printLine(formatv(Fmt, std::forward<Ts>(Items)...));
   48     print(formatv(Fmt, std::forward<Ts>(Items)...));
tools/llvm-pdbutil/MinimalSymbolDumper.cpp
  326   return formatv("[{0},+{1})",
  336     GapStrs.push_back(formatv("({0},{1})", G.GapStartOffset, G.Range).str());
  369     return formatv("{0}", TI).str();
  374     return formatv("{0} ({1}...)", TI, Name);
  376     return formatv("{0} ({1})", TI, Name);
tools/llvm-pdbutil/MinimalTypeDumper.cpp
   50           formatv("forward ref ({0} {1})", Direction, *ETI).str();
  204   return formatv("mode = {0}, opts = {1}, kind = {2}", formatPointerMode(Mode),
  386         formatv("\n{0}",
tools/llvm-pdbutil/PrettyFunctionDumper.cpp
  125         << formatv("+{0,2}", Prologue);
  132         << formatv("-{0,2}", Epilogue);
  136       << formatv(" | sizeof={0,3}", Symbol.getLength());
tools/llvm-pdbutil/PrettyTypeDumper.cpp
   97     errs() << formatv("Filtering and sorting {0} types", UnfilteredCount);
  105       errs() << formatv("Examined {0}/{1} items.  {2} items discarded\n",
tools/llvm-pdbutil/StreamUtil.cpp
   26     return formatv("Named Stream \"{0}\"", Name).str();
   28     return formatv("Module \"{0}\"", Name).str();
tools/llvm-readobj/COFFDumper.cpp
 1138         std::string PC = formatv("+{0:X}", uint32_t(Line.Offset));
tools/llvm-readobj/ELFDumper.cpp
 4270       OS << formatv("{0:x}",
tools/llvm-readobj/ObjDumper.cpp
   71           createError(formatv("could not find section '{0}'", S.first).str()),
   77           createError(formatv("could not find section {0}", S.first).str()),
tools/llvm-readobj/llvm-readobj.cpp
  457                        formatv("{0}bit", 8 * Obj->getBytesInAddress()));
tools/llvm-xray/xray-account.cpp
  360   OS << llvm::formatv(StatsHeaderFormat, "funcid", "count", "min", "med", "90p",
  362      << llvm::formatv("  {0,-12}\n", "function");
  364     OS << llvm::formatv(StatsFormat, FuncId, Count, Row.Min, Row.Median,
  448         << llvm::formatv(
tools/llvm-xray/xray-color-helper.cpp
  211   return llvm::formatv("#{0:X-2}{1:X-2}{2:X-2}", std::get<0>(t), std::get<1>(t),
tools/llvm-xray/xray-converter.cpp
  251     OS << llvm::formatv(
  259     OS << llvm::formatv(
  352     OS << llvm::formatv(
  357       OS << llvm::formatv(R"(, "parent": "{0}")",
tools/llvm-xray/xray-graph-diff.cpp
  330     return formatv(R"({0:P})", RelDiff);
  340     return formatv(R"({0})", truncateString(VertexId, TrunLen).str());
  343       return formatv(R"({0})", truncateString(VertexId, TrunLen).str());
  349     return formatv(R"({{{0}|{1:P}})", truncateString(VertexId, TrunLen).str(),
  394     OS << formatv(R"(F{0} -> F{1} [tooltip="{2} -> {3}" label="{4}" )"
  406       OS << formatv(R"(F{0} [label="F0"])"
  411     OS << formatv(R"(F{0} [label="{1}" color="{2}"])"
tools/llvm-xray/xray-stacks.cpp
  120     Stream << formatv(
  458     OS << formatv("{0,-5} {1,-60} {2,+12} {3,+16}\n", "lvl", "function",
  465       OS << formatv("#{0,-4} {1,-60} {2,+12} {3,+16}\n", Level++,
  474     OS << formatv("#{0,-4} {1,-60} {2,+12} {3,+16}\n", Level++,
  680     return formatv("Found record {0} with no matching function entry\n",
  683     return formatv("Unknown error type for record {0}\n",
tools/polly/lib/Exchange/JSONExporter.cpp
  188     F.os() << formatv("{0:3}", jscop);
unittests/ADT/APFloatTest.cpp
 3413           << formatv("({0:x} + {1:x}) + ({2:x} + {3:x})", Op1[0], Op1[1],
 3423           << formatv("({0:x} + {1:x}) + ({2:x} + {3:x})", Op2[0], Op2[1],
 3477           << formatv("({0:x} + {1:x}) + ({2:x} + {3:x})", Op1[0], Op1[1],
 3481           << formatv("({0:x} + {1:x}) + ({2:x} + {3:x})", Op1[0], Op1[1],
 3491           << formatv("({0:x} + {1:x}) + ({2:x} + {3:x})", Op2[0], Op2[1],
 3495           << formatv("({0:x} + {1:x}) + ({2:x} + {3:x})", Op2[0], Op2[1],
 3526         << formatv("({0:x} + {1:x}) - ({2:x} + {3:x})", Op1[0], Op1[1], Op2[0],
 3530         << formatv("({0:x} + {1:x}) - ({2:x} + {3:x})", Op1[0], Op1[1], Op2[0],
 3581           << formatv("({0:x} + {1:x}) * ({2:x} + {3:x})", Op1[0], Op1[1],
 3591           << formatv("({0:x} + {1:x}) * ({2:x} + {3:x})", Op2[0], Op2[1],
 3654           << formatv("({0:x} + {1:x}) * ({2:x} + {3:x})", Op1[0], Op1[1],
 3658           << formatv("({0:x} + {1:x}) * ({2:x} + {3:x})", Op1[0], Op1[1],
 3668           << formatv("({0:x} + {1:x}) * ({2:x} + {3:x})", Op2[0], Op2[1],
 3672           << formatv("({0:x} + {1:x}) * ({2:x} + {3:x})", Op2[0], Op2[1],
 3701         << formatv("({0:x} + {1:x}) / ({2:x} + {3:x})", Op1[0], Op1[1], Op2[0],
 3705         << formatv("({0:x} + {1:x}) / ({2:x} + {3:x})", Op1[0], Op1[1], Op2[0],
 3734         << formatv("remainder({0:x} + {1:x}), ({2:x} + {3:x}))", Op1[0], Op1[1],
 3738         << formatv("remainder(({0:x} + {1:x}), ({2:x} + {3:x}))", Op1[0],
 3769         << formatv("fmod(({0:x} + {1:x}),  ({2:x} + {3:x}))", Op1[0], Op1[1],
 3773         << formatv("fmod(({0:x} + {1:x}), ({2:x} + {3:x}))", Op1[0], Op1[1],
 3840         << formatv("compare(({0:x} + {1:x}), ({2:x} + {3:x}))", Op1[0], Op1[1],
 3872         << formatv("({0:x} + {1:x}) = ({2:x} + {3:x})", Op1[0], Op1[1], Op2[0],
unittests/ADT/TwineTest.cpp
   34   EXPECT_EQ("hi", Twine(formatv("{0}", "hi")).str());
   71             repr(Twine(formatv("howdy")).concat(Twine())));
   73             repr(Twine().concat(Twine(formatv("howdy")))));
   98   EXPECT_EQ(0, *Twine(formatv("{0}{1}", "how", "dy"))
  113   (void)Twine(formatv("{0}", Formatter));
  115   (void)Twine(formatv("{0}", Formatter)).str();
unittests/Analysis/ProfileSummaryInfoTest.cpp
   91           formatv(ModuleString, formatv(SummaryString, ProfKind).str()).str(),
   91           formatv(ModuleString, formatv(SummaryString, ProfKind).str()).str(),
   94       return parseAssemblyString(formatv(ModuleString, "").str(), Err, C);
unittests/BinaryFormat/DwarfTest.cpp
  196   EXPECT_EQ("DW_AT_name", formatv("{0}", DW_AT_name).str());
  197   EXPECT_EQ("DW_AT_unknown_3fff", formatv("{0}", DW_AT_hi_user).str());
  198   EXPECT_EQ("DW_FORM_addr", formatv("{0}", DW_FORM_addr).str());
  199   EXPECT_EQ("DW_FORM_unknown_1f00", formatv("{0}", DW_FORM_lo_user).str());
  200   EXPECT_EQ("DW_IDX_compile_unit", formatv("{0}", DW_IDX_compile_unit).str());
  201   EXPECT_EQ("DW_IDX_unknown_3fff", formatv("{0}", DW_IDX_hi_user).str());
  202   EXPECT_EQ("DW_TAG_compile_unit", formatv("{0}", DW_TAG_compile_unit).str());
  203   EXPECT_EQ("DW_TAG_unknown_ffff", formatv("{0}", DW_TAG_hi_user).str());
unittests/Support/Chrono.cpp
   53   EXPECT_EQ("2006-01-02 15:04:05.123456789", formatv("{0}", T).str());
   55   EXPECT_EQ("15:04:05", formatv("{0:%H:%M:%S}", T).str());
   57   EXPECT_EQ("123", formatv("{0:%L}", T).str());
   58   EXPECT_EQ("123456", formatv("{0:%f}", T).str());
   59   EXPECT_EQ("123456789", formatv("{0:%N}", T).str());
   61   EXPECT_EQ("%foo", formatv("{0:%%foo}", T).str());
   82   EXPECT_EQ("1 h", formatv("{0}", hours(1)).str());
   83   EXPECT_EQ("1 m", formatv("{0}", minutes(1)).str());
   84   EXPECT_EQ("1 s", formatv("{0}", seconds(1)).str());
   85   EXPECT_EQ("1 ms", formatv("{0}", milliseconds(1)).str());
   86   EXPECT_EQ("1 us", formatv("{0}", microseconds(1)).str());
   87   EXPECT_EQ("1 ns", formatv("{0}", nanoseconds(1)).str());
   89   EXPECT_EQ("1 s", formatv("{0:+}", seconds(1)).str());
   90   EXPECT_EQ("1", formatv("{0:-}", seconds(1)).str());
   92   EXPECT_EQ("1000 ms", formatv("{0:ms}", seconds(1)).str());
   93   EXPECT_EQ("1000000 us", formatv("{0:us}", seconds(1)).str());
   94   EXPECT_EQ("1000", formatv("{0:ms-}", seconds(1)).str());
   96   EXPECT_EQ("1,000 ms", formatv("{0:+n}", milliseconds(1000)).str());
   97   EXPECT_EQ("0x3e8", formatv("{0:-x}", milliseconds(1000)).str());
   98   EXPECT_EQ("010", formatv("{0:-3}", milliseconds(10)).str());
   99   EXPECT_EQ("10,000", formatv("{0:ms-n}", seconds(10)).str());
  101   EXPECT_EQ("1.00 s", formatv("{0}", duration<float>(1)).str());
  102   EXPECT_EQ("0.123 s", formatv("{0:+3}", duration<float>(0.123f)).str());
  103   EXPECT_EQ("1.230e-01 s", formatv("{0:+e3}", duration<float>(0.123f)).str());
  107   EXPECT_EQ("1.00", formatv("{0:-}", microfortnights(1)).str());
  108   EXPECT_EQ("1209.60 ms", formatv("{0:ms}", microfortnights(1)).str());
unittests/Support/FormatVariadicTest.cpp
  263   EXPECT_EQ("", formatv("").str());
  264   EXPECT_EQ("Test", formatv("Test").str());
  268   EXPECT_EQ("1", formatv("{0}", 1).str());
  269   EXPECT_EQ("c", formatv("{0}", 'c').str());
  270   EXPECT_EQ("-3", formatv("{0}", -3).str());
  271   EXPECT_EQ("Test", formatv("{0}", "Test").str());
  272   EXPECT_EQ("Test2", formatv("{0}", StringRef("Test2")).str());
  273   EXPECT_EQ("Test3", formatv("{0}", std::string("Test3")).str());
  278   EXPECT_EQ("0", formatv("{0}", 0).str());
  279   EXPECT_EQ("2748", formatv("{0}", 0xABC).str());
  280   EXPECT_EQ("-2748", formatv("{0}", -0xABC).str());
  283   EXPECT_EQ("0xFF", formatv("{0:X}", 255).str());
  284   EXPECT_EQ("0xFF", formatv("{0:X+}", 255).str());
  285   EXPECT_EQ("0xff", formatv("{0:x}", 255).str());
  286   EXPECT_EQ("0xff", formatv("{0:x+}", 255).str());
  287   EXPECT_EQ("FF", formatv("{0:X-}", 255).str());
  288   EXPECT_EQ("ff", formatv("{0:x-}", 255).str());
  292   EXPECT_EQ("0xFF", formatv("{0:X2}", 255).str());
  293   EXPECT_EQ("0xFF", formatv("{0:X+2}", 255).str());
  294   EXPECT_EQ("0x0ff", formatv("{0:x3}", 255).str());
  295   EXPECT_EQ("0x0ff", formatv("{0:x+3}", 255).str());
  296   EXPECT_EQ("00FF", formatv("{0:X-4}", 255).str());
  297   EXPECT_EQ("00ff", formatv("{0:x-4}", 255).str());
  301             formatv("{0:X16}", -2401053088876216593LL).str());
  303             formatv("{0:X16}", 0xFEEBDAEDFEEBDAEDULL).str());
  304   EXPECT_EQ("0x00000000DEADBEEF", formatv("{0:X16}", 0xDEADBEEF).str());
  307   EXPECT_EQ("0xff", formatv("{0,4:x}", 255).str());
  308   EXPECT_EQ(" 0xff", formatv("{0,5:x+}", 255).str());
  309   EXPECT_EQ("  FF", formatv("{0,4:X-}", 255).str());
  310   EXPECT_EQ("   ff", formatv("{0,5:x-}", 255).str());
  313   EXPECT_EQ("  0x0ff", formatv("{0,7:x3}", 255).str());
  314   EXPECT_EQ(" 0x00ff", formatv("{0,7:x+4}", 255).str());
  315   EXPECT_EQ("  000FF", formatv("{0,7:X-5}", 255).str());
  316   EXPECT_EQ(" 0000ff", formatv("{0,7:x-6}", 255).str());
  319   EXPECT_EQ("    255", formatv("{0,7:3}", 255).str());
  320   EXPECT_EQ("   0255", formatv("{0,7:4}", 255).str());
  321   EXPECT_EQ("  00255", formatv("{0,7:5}", 255).str());
  322   EXPECT_EQ(" 000255", formatv("{0,7:6}", 255).str());
  328     EXPECT_EQ("0x00000000", formatv("{0}", (void *)0).str());
  329     EXPECT_EQ("0x00000ABC", formatv("{0}", (void *)0xABC).str());
  331     EXPECT_EQ("0x0000000000000000", formatv("{0}", (void *)0).str());
  332     EXPECT_EQ("0x0000000000000ABC", formatv("{0}", (void *)0xABC).str());
  336   EXPECT_EQ("0x0", formatv("{0:0}", (void *)0).str());
  337   EXPECT_EQ("0xABC", formatv("{0:0}", (void *)0xABC).str());
  338   EXPECT_EQ("0x0000", formatv("{0:4}", (void *)0).str());
  339   EXPECT_EQ("0x0ABC", formatv("{0:4}", (void *)0xABC).str());
  342   EXPECT_EQ("0x0ABC", formatv("{0:X4}", (void *)0xABC).str());
  343   EXPECT_EQ("0x0abc", formatv("{0:x4}", (void *)0xABC).str());
  344   EXPECT_EQ("0ABC", formatv("{0:X-4}", (void *)0xABC).str());
  345   EXPECT_EQ("0abc", formatv("{0:x-4}", (void *)0xABC).str());
  350   EXPECT_EQ("0", formatv("{0:N}", 0).str());
  351   EXPECT_EQ("10", formatv("{0:N}", 10).str());
  352   EXPECT_EQ("100", formatv("{0:N}", 100).str());
  353   EXPECT_EQ("1,000", formatv("{0:N}", 1000).str());
  354   EXPECT_EQ("1,234,567,890", formatv("{0:N}", 1234567890).str());
  355   EXPECT_EQ("-10", formatv("{0:N}", -10).str());
  356   EXPECT_EQ("-100", formatv("{0:N}", -100).str());
  357   EXPECT_EQ("-1,000", formatv("{0:N}", -1000).str());
  358   EXPECT_EQ("-1,234,567,890", formatv("{0:N}", -1234567890).str());
  362   EXPECT_EQ(" 1", formatv("{0,2:N}", 1).str());
  366   EXPECT_EQ(" 1,000", formatv("{0,6:N}", 1000).str());
  367   EXPECT_EQ(" -1,000", formatv("{0,7:N}", -1000).str());
  370   EXPECT_EQ("      1,000", formatv("{0,11:N}", 1000).str());
  371   EXPECT_EQ("     -1,000", formatv("{0,11:N}", -1000).str());
  372   EXPECT_EQ("   -100,000", formatv("{0,11:N}", -100000).str());
  382   EXPECT_EQ(FooArray, formatv("{0}", FooArray).str());
  383   EXPECT_EQ(FooPtr, formatv("{0}", FooPtr).str());
  384   EXPECT_EQ(FooRef, formatv("{0}", FooRef).str());
  385   EXPECT_EQ(FooLiteral, formatv("{0}", FooLiteral).str());
  386   EXPECT_EQ(FooString, formatv("{0}", FooString).str());
  390   EXPECT_EQ("FooA", formatv("{0:4}", FooArray).str());
  391   EXPECT_EQ("FooP", formatv("{0:4}", FooPtr).str());
  392   EXPECT_EQ("FooR", formatv("{0:4}", FooRef).str());
  393   EXPECT_EQ("FooS", formatv("{0:4}", FooString).str());
  396   EXPECT_EQ("  FooA", formatv("{0,6:4}", FooArray).str());
  397   EXPECT_EQ("  FooP", formatv("{0,6:4}", FooPtr).str());
  398   EXPECT_EQ("  FooR", formatv("{0,6:4}", FooRef).str());
  399   EXPECT_EQ("  FooS", formatv("{0,6:4}", FooString).str());
  404   EXPECT_EQ("C", formatv("{0}", 'C').str());
  405   EXPECT_EQ("  C", formatv("{0,3}", 'C').str());
  410   EXPECT_EQ("37", formatv("{0:D}", (char)37).str());
  411   EXPECT_EQ("  037", formatv("{0,5:D3}", (char)37).str());
  416   EXPECT_EQ("true", formatv("{0}", true).str());
  417   EXPECT_EQ("false", formatv("{0}", false).str());
  418   EXPECT_EQ("true", formatv("{0:t}", true).str());
  419   EXPECT_EQ("false", formatv("{0:t}", false).str());
  422   EXPECT_EQ("TRUE", formatv("{0:T}", true).str());
  423   EXPECT_EQ("FALSE", formatv("{0:T}", false).str());
  426   EXPECT_EQ("1", formatv("{0:D}", true).str());
  427   EXPECT_EQ("0", formatv("{0:D}", false).str());
  428   EXPECT_EQ("1", formatv("{0:d}", true).str());
  429   EXPECT_EQ("0", formatv("{0:d}", false).str());
  432   EXPECT_EQ("YES", formatv("{0:Y}", true).str());
  433   EXPECT_EQ("NO", formatv("{0:Y}", false).str());
  436   EXPECT_EQ("yes", formatv("{0:y}", true).str());
  437   EXPECT_EQ("no", formatv("{0:y}", false).str());
  444   EXPECT_EQ("0.000000E+00", formatv("{0:E}", 0.0).str());
  445   EXPECT_EQ("-0.000000E+00", formatv("{0:E}", -0.0).str());
  446   EXPECT_EQ("1.100000E+00", formatv("{0:E}", 1.1).str());
  447   EXPECT_EQ("-1.100000E+00", formatv("{0:E}", -1.1).str());
  448   EXPECT_EQ("1.234568E+03", formatv("{0:E}", 1234.5678).str());
  449   EXPECT_EQ("-1.234568E+03", formatv("{0:E}", -1234.5678).str());
  450   EXPECT_EQ("1.234568E-03", formatv("{0:E}", .0012345678).str());
  451   EXPECT_EQ("-1.234568E-03", formatv("{0:E}", -.0012345678).str());
  454   EXPECT_EQ("  0.000E+00", formatv("{0,11:E3}", 0.0).str());
  455   EXPECT_EQ(" -1.100E+00", formatv("{0,11:E3}", -1.1).str());
  456   EXPECT_EQ("  1.235E+03", formatv("{0,11:E3}", 1234.5678).str());
  457   EXPECT_EQ(" -1.235E-03", formatv("{0,11:E3}", -.0012345678).str());
  460   EXPECT_EQ("0.00", formatv("{0:F}", 0.0).str());
  461   EXPECT_EQ("-0.00", formatv("{0:F}", -0.0).str());
  462   EXPECT_EQ("1.10", formatv("{0:F}", 1.1).str());
  463   EXPECT_EQ("-1.10", formatv("{0:F}", -1.1).str());
  464   EXPECT_EQ("1234.57", formatv("{0:F}", 1234.5678).str());
  465   EXPECT_EQ("-1234.57", formatv("{0:F}", -1234.5678).str());
  466   EXPECT_EQ("0.00", formatv("{0:F}", .0012345678).str());
  467   EXPECT_EQ("-0.00", formatv("{0:F}", -.0012345678).str());
  470   EXPECT_EQ("   0.000", formatv("{0,8:F3}", 0.0).str());
  471   EXPECT_EQ("  -1.100", formatv("{0,8:F3}", -1.1).str());
  472   EXPECT_EQ("1234.568", formatv("{0,8:F3}", 1234.5678).str());
  473   EXPECT_EQ("  -0.001", formatv("{0,8:F3}", -.0012345678).str());
  478   EXPECT_EQ("==123", formatv("{0,=+5}", 123).str());
  479   EXPECT_EQ("=123=", formatv("{0,==5}", 123).str());
  480   EXPECT_EQ("123==", formatv("{0,=-5}", 123).str());
  483   EXPECT_EQ("=00123=", formatv("{0,==7:5}", 123).str());
  492       -> decltype(formatv(Fmt, std::forward<Ts>(Values)...)) {
  493     return formatv(Fmt, std::forward<Ts>(Values)...);
  521   Stream << formatv(Intro, std::tuple_size<Tuple>::value,
  524   Stream << formatv(Header, "Char", "HexInt", "Str", "Ref", "std::str",
  547             formatv("{0}", make_range(IntRange.begin(), IntRange.end())).str());
  549             formatv("{0}", make_range(IntRange.begin() + 1, IntRange.end() - 1))
  555       formatv("{0:$[/]}", make_range(IntRange.begin(), IntRange.end())).str());
  560       formatv("{0:@[x]}", make_range(IntRange.begin(), IntRange.end())).str());
  565       formatv("{0:$[ + ]@[x]}", make_range(IntRange.begin(), IntRange.end()))
  572       formatv("<{0:$[><]@(x)}>", make_range(IntRange.begin(), IntRange.end()))
  576       formatv("[{0:$(][)@[x]}]", make_range(IntRange.begin(), IntRange.end()))
  580       formatv("({0:$<)(>@<x>})", make_range(IntRange.begin(), IntRange.end()))
  584   EXPECT_EQ("", formatv("{0:$[+]@[x]}",
  590             formatv("{0:$[]@<>}", make_range(IntRange.begin(), IntRange.end()))
  601   EXPECT_EQ("-7", formatv("{0}", Negative(7)).str());
  606             formatv("{0}", fmt_align(N, AlignStyle::Center, 7)).str());
  608             formatv("{0}", fmt_align(N, AlignStyle::Center, 7, '-')).str());
  609   EXPECT_EQ(" 171   ", formatv("{0}", fmt_pad(N, 1, 3)).str());
  610   EXPECT_EQ("171171171171171", formatv("{0}", fmt_repeat(N, 5)).str());
  613             formatv("{0:X-}", fmt_pad(fmt_repeat(N, 5), 1, 3)).str());
  615             formatv("{0,=34:X-}", fmt_repeat(fmt_pad(N, 1, 3), 5)).str());
  619   auto fmt = formatv("{0} {1}", 1, 2);
  625   std::string S = formatv("{0} {1}", 1, 2);
  628   SmallString<4> S2 = formatv("{0} {1}", 1, 2);
  633   EXPECT_EQ("Format", formatv("{0}", Format(1)).str());
  636   EXPECT_EQ("Format", formatv("{0}", var).str());
  637   EXPECT_EQ("Format", formatv("{0}", std::move(var)).str());
  645   EXPECT_EQ("Format", formatv("F{0}t", formatv("o{0}a", "rm")).str());
  645   EXPECT_EQ("Format", formatv("F{0}t", formatv("o{0}a", "rm")).str());
  646   EXPECT_EQ("[   ! ]", formatv("[{0,+5}]", formatv("{0,-2}", "!")).str());
  646   EXPECT_EQ("[   ! ]", formatv("[{0,+5}]", formatv("{0,-2}", "!")).str());
  668   EXPECT_EQ("0C 0M", formatv("{0}", R).str());
  669   EXPECT_EQ("0C 3M", formatv("{0}", std::move(R)).str());
  670   EXPECT_EQ("0C 3M", formatv("{0}", Recorder()).str());
  681   EXPECT_EQ("X", formatv("{0}", X).str());
  686   EXPECT_EQ("X", formatv("{0}", E1).str());
  688   EXPECT_EQ("X", formatv("{0}", fmt_consume(std::move(E1))).str());
unittests/Support/JSONTest.cpp
   20 std::string s(const Value &E) { return llvm::formatv("{0}", E).str(); }
   21 std::string sp(const Value &E) { return llvm::formatv("{0:2}", E).str(); }