krasimir added a comment. A sample of snippets that this misformats:
- inside other macro: EXPECT_EQ(Calc()* bar, baz); - in member function call: BENCHMARK(BM_Foo)->ThreadRange(1, NumCPUs()* 2); - this causes javascript diffs: - const foo = (bar == 'rtl' ? -1 : 1) * (blah || blah || 0); + const foo =(bar == 'rtl' ? -1 : 1) * (blah || blah || 0); - binary operators with casts: a = (int)(b()* c); rectaaaaaaaaaaaaaa->SetSize((int)(GetWidth(foo)* bar), (int)(GetHeight(foo)* bar)); int f() { ... - return static_cast<int>(param) * (a * b + c); + return static_cast<int>(param)*(a * b + c); } - some arithmetic expressions: float aaaa = 43 * log(sin(a/4) *b); Test: % cat test.cc EXPECT_EQ(Calc() * bar, baz); BENCHMARK(BM_Foo)->ThreadRange(1, NumCPUs() * 2); a = (int)(b() * c); rectaaaaaaaaaaaaaa->SetSize((int)(GetWidth(foo) * bar), (int)(GetHeight(foo) * bar)); int f() { return static_cast<int>(param) * (a * b + c); } float aaaa = 43 * log(sin(a / 4) * b); % bin/clang-format -style=google test.cc EXPECT_EQ(Calc()* bar, baz); BENCHMARK(BM_Foo)->ThreadRange(1, NumCPUs()* 2); a = (int)(b()* c); rectaaaaaaaaaaaaaa->SetSize((int)(GetWidth(foo)* bar), (int)(GetHeight(foo)* bar)); int f() { return static_cast<int>(param)*(a * b + c); } float aaaa = 43 * log(sin(a / 4)* b); % cat test.js const foo = (bar == 'rtl' ? -1 : 1) * (blah || blah || 0); % bin/clang-format -style=google test.js const foo =(bar == 'rtl' ? -1 : 1) * (blah || blah || 0); CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75364/new/ https://reviews.llvm.org/D75364 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits