[PATCH] D80950: [clang-format] [PR44542,38872] String << String always get a forced newline.

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 4 02:40:29 PDT 2020


sammccall added a comment.

I couldn't quite parse the last comment about \n, but yes the endl handling (didn't realize it also covered \n!) is implemented separately but falls under the same "heuristic formatting" umbrella I think.

>   LOG_IF(DFATAL, a < b) << "Equality condition can never be satisfied:"
>                        << " foo=" << a << " and "
>                        << "\n"
>                        << " is less than "
>                        << " bar=" << b;

This formatting seems fine to me: I'm not sure why you'd write `" and " << "\n"` separately if you didn't want a break there.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D80950





More information about the cfe-commits mailing list