diff options
author | Daan De Meyer <daan.j.demeyer@gmail.com> | 2025-07-17 09:36:52 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-07-17 00:36:52 -0700 |
commit | 1653a093def10543d8f958fe7d4cde9ab1dd8bca (patch) | |
tree | 8d8d5a7b48603f0644c0dde5c300878e44fb917d /clang/lib/Frontend/TestModuleFileExtension.cpp | |
parent | 3cb0c7f45b97802ddc13a15560fbbca2efb75326 (diff) | |
download | llvm-1653a093def10543d8f958fe7d4cde9ab1dd8bca.zip llvm-1653a093def10543d8f958fe7d4cde9ab1dd8bca.tar.gz llvm-1653a093def10543d8f958fe7d4cde9ab1dd8bca.tar.bz2 |
[clang-format] Add IgnoreExtension to SortIncludes (#137840)
Sorting by stem gives nicer results when various header file names are
substrings of other header file names. For example, a CLI application
with a main header named analyze.h and an analyze-xxx.h header for each
subcommand currently will always put analyze.h last after all the
analyze-xxx.h headers, but putting analyze.h first instead is arguably
nicer to read.
TLDR; Instead of
```
#include "analyze-blame.h"
#include "analyze.h"
```
You'd get
```
#include "analyze.h"
#include "analyze-blame.h"
```
Let's allow sorting by stem instead of full path by adding
IgnoreExtension to SortIncludes.
Diffstat (limited to 'clang/lib/Frontend/TestModuleFileExtension.cpp')
0 files changed, 0 insertions, 0 deletions