poelmanc added a comment. Thanks for the speedy reply and the great tool. With appropriate Regex and Priority settings, `IncludeCategories` worked flawlessly for me aside from not identifying the main header. Treating `#include "foo/bar/baz.h"` as the main header in file `bar/random/baz.h` seems like a bug, but I certainly see the dangers of changing current `<>` behavior. I also considered treating `<>` includes as main headers only if they also contain a forward-slash, e.g.:
if (!IncludeName.startswith("\"") && !IncludeName.contains("/")) return false; That would resolve the `<string.h>` case, although `#include <sys/types.h>` in a file `anything/sys/types.h` would be identified as the main header. So making an option seems like the cleanest solution. Say, `bool IncludeIsMainAllowBraces`? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96744/new/ https://reviews.llvm.org/D96744 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits