[cfe-dev] [clang-format] Where is the indentation level determined?

Vitali Lovich via cfe-dev cfe-dev at lists.llvm.org
Mon May 17 18:29:56 PDT 2021


I'm looking to solve bug 49352 <https://bugs.llvm.org/show_bug.cgi?id=49352>
& I'm wondering where the best spot would be to add this option (so that
the lambda body indentation is relative to the parent scope containing the
lambda declaration instead of relative to whatever indentation scope the
lambda declaration itself was given).

I was thinking perhaps in LevelIndentTracker::nextLine, but the
lambda detection there is too early & I can't adjust the line containing
the bodies or too late & I don't know if the line is part of a lambda.
Similarly, I looked at UnwrappedLineParser and tried messing with the Level
a line is assigned, but that doesn't seem to have an impact on the
indentation for some reason (even though the Level should be driving the
indentation, right?).

Any tips would be greatly appreciated.

Thanks,
Vitali
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20210517/65c974e1/attachment.html>


More information about the cfe-dev mailing list