[PATCH] D44673: Make positionToOffset return llvm::Expected<size_t>

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 21 07:35:44 PDT 2018


ilya-biryukov added inline comments.


================
Comment at: clangd/ClangdServer.cpp:199
+    return End.takeError();
+
+  return formatCode(Code, File, {tooling::Range(*Begin, *End - *Begin)});
----------------
simark wrote:
> ilya-biryukov wrote:
> > NIT: unnecessary empty line
> In general I like spacing out the different logical blocks of code a little bit, especially after a "return", but I don't mind removing them.
We don't really have a style rule for that, but most of clangd code does not have that many empty lines.
I personally think it's fine to have reasonable style differences in new functions, but I prefer to stick to the original author's style when refactoring code. Hence my suggestions to remove the empty lines here.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D44673





More information about the cfe-commits mailing list