未验证 提交 241f97d5 编写于 作者: N Nyakku Shigure 提交者: GitHub

[clang-tidy] enable `modernize-raw-string-literal` and fix existing errors (#55675)

上级 51c3c66b
......@@ -173,7 +173,7 @@ modernize-loop-convert,
-modernize-make-shared,
modernize-make-unique,
-modernize-pass-by-value,
-modernize-raw-string-literal,
modernize-raw-string-literal,
modernize-redundant-void-arg,
-modernize-replace-auto-ptr,
-modernize-replace-random-shuffle,
......
......@@ -1666,7 +1666,7 @@ static std::pair<std::string, std::string> GenerateForwardFunctionContents(
if (!output.dispensable()) {
std::string input_name =
output_name.substr(0, output_name.size() - 3);
const char* FWD_OUTS_CONTENT_TEMPLATE = "{ \"%s\", ins[\"%s\"] },";
const char* FWD_OUTS_CONTENT_TEMPLATE = R"({ "%s", ins["%s"] },)";
outs_contents_str += paddle::string::Sprintf(
FWD_OUTS_CONTENT_TEMPLATE, output_name, input_name);
}
......@@ -1690,7 +1690,7 @@ static std::pair<std::string, std::string> GenerateForwardFunctionContents(
"Inplace op %s has no input corresponding to output %s.",
op_type,
output_name));
const char* FWD_OUTS_CONTENT_TEMPLATE = "{ \"%s\", ins[\"%s\"] },";
const char* FWD_OUTS_CONTENT_TEMPLATE = R"({ "%s", ins["%s"] },)";
auto inplace_input_name = forward_inplace_map[output_name];
outs_contents_str += paddle::string::Sprintf(
FWD_OUTS_CONTENT_TEMPLATE, output_name, inplace_input_name);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册