[libcxx-commits] [PATCH] D116234: [libc++][NFC] Reformat <__filesystem/operations.h>

Nikolas Klauser via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Dec 23 13:20:12 PST 2021


philnik added inline comments.


================
Comment at: libcxx/include/__filesystem/operations.h:371-372
 
-inline _LIBCPP_INLINE_VISIBILITY path temp_directory_path() {
-  return __temp_directory_path();
-}
-
-inline _LIBCPP_INLINE_VISIBILITY path temp_directory_path(error_code& __ec) {
-  return __temp_directory_path(&__ec);
-}
+inline _LIBCPP_INLINE_VISIBILITY path temp_directory_path()                 { return __temp_directory_path(); }
+inline _LIBCPP_INLINE_VISIBILITY path temp_directory_path(error_code& __ec) { return __temp_directory_path(&__ec); }
 
----------------
Quuxplusone wrote:
> For all of these `inline` one-liners, I'd strongly prefer that they be formatted consistently. I don't have a strong preference for
> ```
> inline _LIBCPP_HIDE_FROM_ABI function header() { return oneliner; }
> ```
> versus
> ```
> inline _LIBCPP_HIDE_FROM_ABI
> function header() { return oneliner; }
> ```
> versus
> ```
> inline _LIBCPP_HIDE_FROM_ABI function header()
>   { return oneliner; }
> ```
> versus
> ```
> inline _LIBCPP_HIDE_FROM_ABI function header() {
>   return oneliner;
> }
> ```
> versus
> ```
> inline _LIBCPP_HIDE_FROM_ABI
> function header() {
>   return oneliner;
> }
> ```
> but let's be consistent. Also, if we choose anything other than the first option (all-on-one-source-line), then let's add one blank line after each function, so they don't all run together visually.
Do you mean by the first one "ignore any line length limitation and put them in a single line"?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D116234/new/

https://reviews.llvm.org/D116234



More information about the libcxx-commits mailing list