MCPcopy Create free account
hub / github.com/Samsung/UTopia / reformat

Method reformat

lib/generation/SrcGenerator.cpp:76–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74}
75
76std::string SrcGenerator::reformat(const std::string &Code) {
77 auto Replaces =
78 clang::format::reformat(clang::format::getLLVMStyle(), Code,
79 clang::tooling::Range(0, Code.length()));
80 return clang::tooling::applyAllReplacements(Code, Replaces).get();
81}
82
83std::string SrcGenerator::genStrToCStr(const std::string &StrVar) {
84 return "const_cast<char *>(" + StrVar + ".c_str())";

Callers

nothing calls this directly

Calls 2

lengthMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected