[clang] [clang-format] Fix a regression on BAS_AlwaysBreak (PR #107506)
kadir çetinkaya via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 6 05:25:15 PDT 2024
================
@@ -861,7 +861,7 @@ void ContinuationIndenter::addTokenOnCurrentLine(LineState &State, bool DryRun,
// or
// caaaaaaaaaaaaaaaaaaaaal(
// new SomethingElseeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee());
- !IsSimpleFunction(Current)) {
+ Current.isNot(tok::comment) && !IsSimpleFunction(Current)) {
----------------
kadircet wrote:
would it make sense to introduce this into `IsSimpleFunction` ? similar to handling of `new` keyword in there? possibly just skipping over all of the comments. because we can also have `foo(/*comments*/ new X())`, and i think we still want that inner expression to be treated simple
https://github.com/llvm/llvm-project/pull/107506
More information about the cfe-commits
mailing list