Issue 109931
Summary [clang-format] QualifierAlignment does not respect line range
Labels clang-format
Assignees
Reporter ChTip
    Using clang-14, I observe that if I use option QualifierAlignment to not default (such as QualifierAlignment: Right), then it applies out of selected line range, even though other formattings respect the line range.

I have first seen this working in Visual Studio Code, and I can reproduce it running clang-format in command line, like so:
clang-format -i --lines=50:60 [my_file]

I use this .clang-format file. If I remove or comment the QualifierAlignment setting, range formatting works OK: no line is modified out of the range.

---
BasedOnStyle: Microsoft

---
Language: Cpp
BinPackArguments: false
BinPackParameters: false
BreakBeforeBraces: Attach
ConstructorInitializerIndentWidth: 6
ContinuationIndentWidth: 6
KeepEmptyLinesAtTheStartOfBlocks: false
PointerAlignment: Middle
QualifierAlignment: Right

_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to