[PATCH] D45719: [clang-Format] Fix indentation of member call after block

Anders Karlsson via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 29 07:08:42 PDT 2018


ank added inline comments.


================
Comment at: unittests/Format/FormatTest.cpp:4359
+               "    return 3;\n"
+               "  }).as("");\n"
+               "}");
----------------
klimek wrote:
> What would be interesting is tests that:
> a) have another value after the closing }; doesn't really make sense in this test, but usually these are in calls
> f([]() { ... }, foo, bar).call(...)
> 
> b) make .as("") have paramters that go beyond the limit
> 
> c) add another chained call behind .as(""). 
Hello, sorry for the late follow up on this! 

Indeed an interesting thing to test, and so I did, the patterns you describe seems to give strange indentation as far back as release_36 and probably has always done so. The case I'm testing here worked in release_40 but stopped working somewhere before release_50

maybe fixing those other cases can be done in another patch

cheers,
Anders


Repository:
  rC Clang

https://reviews.llvm.org/D45719





More information about the cfe-commits mailing list