aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp
diff options
context:
space:
mode:
authorRuoyu Zhong <zhongruoyu@outlook.com>2025-09-28 11:12:36 +0800
committerGitHub <noreply@github.com>2025-09-27 20:12:36 -0700
commit9a01561760a2785fbf6d66f86ba2361d36a648f7 (patch)
tree642b89a0b70dfda74dec4123167c784832f971ac /llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp
parent9630b321a50a3712ca092a53a4a4c7bea94b3af2 (diff)
downloadllvm-9a01561760a2785fbf6d66f86ba2361d36a648f7.zip
llvm-9a01561760a2785fbf6d66f86ba2361d36a648f7.tar.gz
llvm-9a01561760a2785fbf6d66f86ba2361d36a648f7.tar.bz2
[clang-format] Fix qualifier ordering for lines after PP directives (#160731)
Lines appearing after preprocessor conditional blocks (like `#endif`) were not having their qualifiers reordered by `QualifierOrder`, while lines inside the conditional blocks were processed correctly. The issue was that tokens on lines following preprocessor directives have `MustBreakBefore` = `true`. The qualifier alignment logic was breaking immediately upon encountering any token with `MustBreakBefore` = `true`, preventing analysis of the entire line. The fix allows processing to continue when `MustBreakBefore` = `true` on the first token of a line, since this is expected behavior (the token legitimately starts a new line). Only tokens with `MustBreakBefore` = `true` that appear mid-line will cause the analysis loop to break. Fixes https://github.com/llvm/llvm-project/issues/160487.
Diffstat (limited to 'llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp')
0 files changed, 0 insertions, 0 deletions