[PATCH] D34399: clang-format: introduce InlineOnly short function style
Daniel Jasper via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 21 01:23:34 PDT 2017
djasper added inline comments.
================
Comment at: include/clang/Format/Format.h:234
+ bool allowEmptyFunctionsOnASingleLine() const {
+ return AllowShortFunctionsOnASingleLine >= ShortFunctionStyle::SFS_Empty;
----------------
I'd prefer these functions not to be in the public header file. They are implementation details. Either find a header/cpp-file in the lib/ directory to place them in or just remove them for now. They are both still quite small and called only twice each.
================
Comment at: unittests/Format/FormatTest.cpp:6530
+ verifyFormat("int f() {\n"
+ "}", MergeInlineOnly);
+
----------------
Missing line break.
================
Comment at: unittests/Format/FormatTest.cpp:6548
+ "{\n"
+ "}", MergeInlineOnly);
+ verifyFormat("class C {\n"
----------------
Missing line break. Generally use clang-format on the patches :).
https://reviews.llvm.org/D34399
More information about the cfe-commits
mailing list