[PATCH] D39430: [clangd] formatting: don't ignore style
Ilya Biryukov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 14 08:51:52 PST 2017
ilya-biryukov added inline comments.
================
Comment at: clangd/ClangdLSPServer.cpp:153
+ if (ReplacementsOrError) {
+ C.reply(json::ary{replacementsToEdits(Code, ReplacementsOrError.get())});
+ } else {
----------------
NIT: remove braces from single-statement branches
================
Comment at: clangd/ClangdLSPServer.cpp:165
+ if (ReplacementsOrError) {
+ C.reply(json::ary{replacementsToEdits(Code, ReplacementsOrError.get())});
+ } else {
----------------
NIT: remove braces from single-statement branches
================
Comment at: clangd/ClangdServer.h:289
+ llvm::Expected<std::vector<tooling::Replacement>>
+ formatRange(llvm::StringRef Code, PathRef File, Range Rng);
+
----------------
Why do we accept `Code` as a parameter here instead of getting it internally?
Maybe we should consider moving this method out of `ClangdServer`? Its signature looks pretty self-contained now.
https://reviews.llvm.org/D39430
More information about the cfe-commits
mailing list