Apply new Chromium style for #include sorting

Add "cef/" prefix for CEF #includes in libcef/ directory.

Sort #includes by following
https://google.github.io/styleguide/cppguide.html#Names_and_Order_of_Includes
This commit is contained in:
Marshall Greenblatt
2024-04-30 11:45:07 -04:00
parent b5d84c254d
commit 49a34d9160
877 changed files with 1921 additions and 1955 deletions

View File

@@ -44,12 +44,6 @@ patches = [
# https://bugs.chromium.org/p/chromium/issues/detail?id=623342
'name': 'runhooks',
},
{
# Don't sort CEF and Chromium header includes into the same block.
# Partially reverts:
# https://chromium-review.googlesource.com/c/chromium/src/+/5197064
'name': 'clang_format_includes',
},
{
# Support component builds (GN is_component_build=true).
# https://github.com/chromiumembedded/cef/issues/1617

View File

@@ -1,48 +0,0 @@
diff --git .clang-format .clang-format
index 87ff0884ee821..5a40766bbe63e 100644
--- .clang-format
+++ .clang-format
@@ -12,43 +12,6 @@ Standard: Cpp11
InsertBraces: true
InsertNewlineAtEOF: true
-# Sort #includes by following
-# https://google.github.io/styleguide/cppguide.html#Names_and_Order_of_Includes
-#
-# ref: https://clang.llvm.org/docs/ClangFormatStyleOptions.html#includeblocks
-IncludeBlocks: Regroup
-# ref: https://clang.llvm.org/docs/ClangFormatStyleOptions.html#includecategories
-IncludeCategories:
- # The win32 api has all sorts of implicit include order dependencies :-/
- # Give a few headers special priorities that make sure they appear before
- # all other headers.
- # Sync this with SerializeIncludes in tools/add_header.py.
- # TODO(crbug.com/329138753): remove include sorting from tools/add_header.py
- # after confirming clang-format sort works well.
- # LINT.IfChange(winheader)
- - Regex: '^<objbase\.h>' # This has to be before initguid.h.
- Priority: 1
- - Regex: '^<(initguid|mmdeviceapi|windows|winsock2|ws2tcpip|shobjidl|atlbase|ole2|unknwn|tchar)\.h>'
- Priority: 2
- # LINT.ThenChange(/tools/add_header.py:winheader)
- # UIAutomation*.h need to be after base/win/atl.h.
- # Note the low priority number.
- - Regex: '^<UIAutomation.*\.h>'
- Priority: 6
- # Other C system headers.
- - Regex: '^<.*\.h>'
- Priority: 3
- # C++ standard library headers.
- - Regex: '^<.*'
- Priority: 4
- # Other libraries.
- - Regex: '.*'
- Priority: 5
-# ref: https://clang.llvm.org/docs/ClangFormatStyleOptions.html#includeismainregex
-IncludeIsMainRegex: "\
-(_(32|64|android|apple|chromeos|freebsd|fuchsia|fuzzer|ios|linux|mac|nacl|openbsd|posix|stubs?|win))?\
-(_(unit|browser|perf)?tests?)?$"
-
# Make sure code like:
# IPC_BEGIN_MESSAGE_MAP()
# IPC_MESSAGE_HANDLER(WidgetHostViewHost_Update, OnUpdate)