Page MenuHomePhabricator

adzenith (Nikolaus Wittenstein)
User

Projects

User does not belong to any projects.

User Details

User Since
May 31 2019, 8:47 AM (33 w, 1 d)

Recent Activity

May 31 2019

adzenith added a comment to D33932: [clang-format] Add support for case-insensitive header matching and use it to improve support for LLVM-style include sorting..

It appears I was mistaken - the (?-i) caused the regex match to fail entirely, which made the system header move all the way to the end. It didn't actually solve my problem.

May 31 2019, 9:14 AM · Restricted Project
Herald added a project to D33932: [clang-format] Add support for case-insensitive header matching and use it to improve support for LLVM-style include sorting.: Restricted Project.

I just came across this case-insensitive behavior when trying to regroup include blocks and it was surprising. I'm trying to put system headers after other angle-bracket includes (like for Qt), and I was trying:

- Regex:           '^<[a-z_]*>'
  Priority:        5
- Regex:           '^<[A-Za-z_]*>'
  Priority:        4

Unfortunately, #include <QWidget> matches the first regex and so Qt headers get sorted in with system headers. Would it be possible to add the option to do case-sensitive matching after all? Should I open a new issue?

May 31 2019, 8:59 AM · Restricted Project