================
@@ -848,6 +848,8 @@ void ContinuationIndenter::addTokenOnCurrentLine(LineState 
&State, bool DryRun,
   const auto IsSimpleFunction = [&](const FormatToken &Tok) {
     if (!Tok.FakeLParens.empty() && Tok.FakeLParens.back() > prec::Unknown)
       return false;
+    if (Tok.is(tok::kw_new))
+      return true;
----------------
kadircet wrote:

> Should we leave a simple comment?

Added some, LMK if you want something else mentioned.

> I spent a bit of time here wondering if it should return true or skip to the 
> next argument, I'm in two minds but I think this is ok.

I am wary of this as we can have cases like `new Foo::Bar();`, added some test 
cases.

https://github.com/llvm/llvm-project/pull/105168
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to