E.g. we now turn while(<#cond#>){ into while (<#cond#>) {
This slightly improves the final output. Should not affect clients that
format the result on their own.
Paths
| Differential D62616
[CodeComplete] Add a bit more whitespace to completed patterns ClosedPublic Authored by ilya-biryukov on May 29 2019, 11:47 AM.
Details
Summary E.g. we now turn while(<#cond#>){ into while (<#cond#>) { This slightly improves the final output. Should not affect clients that
Diff Detail
Event TimelineComment Actions I totally agree about the space before the opening curly, but the space before the opening paren is a matter of style. Certainly it does match LLVM style better, but it does not match some other styles. I guess there's no way to satisfy everyone without an automatic reformatter, and if we were to pick a "default" style it might as well be LLVM, so I approve. This revision is now accepted and ready to land.May 29 2019, 5:16 PM Comment Actions
Totally agree. I was also torn on this, but since there's no reasonable way to get the formatting options on code completion now, matching the LLVM style looks like the best trade-off. Closed by commit rL362363: [CodeComplete] Add a bit more whitespace to completed patterns (authored by ibiryukov). · Explain WhyJun 3 2019, 1:32 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 202662 cfe/trunk/lib/Sema/SemaCodeComplete.cpp
cfe/trunk/test/CodeCompletion/ordinary-name-cxx11.cpp
cfe/trunk/test/CodeCompletion/ordinary-name.cpp
clang-tools-extra/trunk/clangd/unittests/CodeCompleteTests.cpp
|