[PATCH] D28081: Make GetStyle return Expected<FormatStyle> instead of FormatStyle

Alexander Shaposhnikov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 9 22:06:33 PST 2017

alexshap added inline comments.

Comment at: lib/Format/Format.cpp:424
+llvm::Error make_string_error(const llvm::Twine &Message) {
+  return llvm::make_error<llvm::StringError>(Message,
amaiorano wrote:
> ioeric wrote:
> > Maybe make this `inline`?
> Yes.
regarding this function and some other helper functions in this file: 
1. why aren't they static ? 
(if this stuff is not used outside of this .cpp -  but yeah, i assume i'm missing smth)
2. http://llvm.org/docs/CodingStandards.html naming conventions are
"Function names should be verb phrases (as they represent actions), and command-like function should be imperative. The name should be camel case, and start with a lower case letter (e.g. openFile() or isFoo())"  


More information about the cfe-commits mailing list