]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Simplify header categorization rules
authorJoel Rosdahl <joel@rosdahl.net>
Tue, 29 Jun 2021 06:14:51 +0000 (08:14 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Tue, 29 Jun 2021 06:14:51 +0000 (08:14 +0200)
.clang-format
src/InodeCache.cpp
src/ZstdDecompressor.hpp

index 29f13ad43ce1ee95c82b16fd1b518c89e3938035..67f0665b28671ff28ad4abb3e95be80c1e50c9a5 100644 (file)
@@ -28,9 +28,11 @@ IncludeCategories:
     Priority: 1
   - Regex: '^["<]third_party/'
     Priority: 4
-  - Regex: '^<(sddl\.h)>$'
+  # System headers:
+  - Regex: '\.h>$'
     Priority: 5
-  - Regex: '^<(algorithm|any|array|atomic|bitset|cassert|ccomplex|cctype|cerrno|cfenv|cfloat|chrono|cinttypes|ciso646|climits|clocale|cmath|codecvt|complex|condition_variable|csetjmp|csignal|cstdalign|cstdarg|cstdbool|cstddef|cstdint|cstdio|cstdlib|cstring|ctgmath|ctime|cuchar|cwchar|cwctype|deque|exception|execution|filesystem|forward_list|fstream|functional|future|initializer_list|iomanip|ios|iosfwd|iostream|istream|iterator|limits|list|locale|map|memory|memory_resource|mutex|new|numeric|optional|ostream|queue|random|ratio|regex|scoped_allocator|set|shared_mutex|sstream|stack|stdexcept|streambuf|string|string_view|strstream|system_error|thread|tuple|type_traits|typeindex|typeinfo|unordered_map|unordered_set|utility|valarray|variant|vector)>$'
+  # C++ headers:
+  - Regex: '^<[^.]+>$'
     Priority: 6
   - Regex: '^"'
     Priority: 2
index bcb11ce648802c1268692c79b10140543d4898a5..34f5577d4bfabf1678b045cc644846f17844c3c8 100644 (file)
 #include "Util.hpp"
 #include "fmtmacros.hpp"
 
-#include <atomic>
 #include <libgen.h>
 #include <sys/mman.h>
+
+#include <atomic>
 #include <type_traits>
 
 // The inode cache resides on a file that is mapped into shared memory by
index 8f85ce68ab7eeeba02a9071ac93c4424a88598ba..80533c181520c89c577433fcbc27bea3611f35bb 100644 (file)
 
 #include "Decompressor.hpp"
 
-#include <fstream>
 #include <zstd.h>
 
+#include <fstream>
+
 // A decompressor of a Zstandard stream.
 class ZstdDecompressor : public Decompressor
 {