https://bugs.llvm.org/show_bug.cgi?id=32928
Bug ID: 32928
Summary: clang-format produces ugly results after rearranging
function arguments containing raw strings.
Product: clang
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Formatter
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected]
Given the following (manually formatted) snippet:
test_app_dir.WriteManifest(
base::StringPrintf(R"({
"name": "Hosted App vs TDI Test",
"version": "1",
"manifest_version": 2,
"app": {
"launch": {
"web_url": "%s"
},
"urls": ["*://app.site.com/frame_tree"]
}
})",
url.spec().c_str()));
clang-format changes it to:
test_app_dir.WriteManifest(base::StringPrintf(R"({
"name": "Hosted App vs TDI Test",
"version": "1",
"manifest_version": 2,
"app": {
"launch": {
"web_url": "%s"
},
"urls": ["*://app.site.com/frame_tree"]
}
})",
url.spec().c_str()));
I am not sure if the original formatting conforms to Google C++ Style Guide,
but I kind of like it. I am sure that I dislike the result of clang-format -
the indent of the 2nd argument of base::StringPrintf seems wrong (even though
it is technically correct, by virtue of starting on the same column as the 1st
argument).
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs