From bbcf77159e7d93268878ea1fae901d8b7b6dd905 Mon Sep 17 00:00:00 2001
From: Leif Hedstrom
Date: Wed, 1 Feb 2023 12:34:27 -0700
Subject: [PATCH] Upgrades master branch to use clang-format v15.0.7
---
.clang-format | 170 ++++--
example/plugins/c-api/basic_auth/basic_auth.c | 6 +-
.../c-api/bnull_transform/bnull_transform.c | 2 +-
.../plugins/c-api/cache_scan/cache_scan.cc | 28 +-
example/plugins/c-api/intercept/intercept.cc | 11 +-
example/plugins/c-api/passthru/passthru.cc | 4 +-
example/plugins/c-api/protocol/Protocol.h | 2 +-
example/plugins/c-api/protocol/TxnSM.c | 2 +-
example/plugins/c-api/protocol/TxnSM.h | 4 +-
.../remap_header_add/remap_header_add.cc | 2 +-
.../c-api/request_buffer/request_buffer.c | 2 +-
.../c-api/server_transform/server_transform.c | 10 +-
.../c-api/ssl_preaccept/ssl_preaccept.cc | 2 +-
example/plugins/c-api/ssl_sni/ssl_sni.cc | 2 +-
.../ssl_sni_allowlist/ssl_sni_allowlist.cc | 2 +-
example/plugins/c-api/thread_pool/psi.c | 8 +-
example/plugins/c-api/thread_pool/thread.h | 2 +-
.../plugins/c-api/verify_cert/verify_cert.cc | 2 +-
example/plugins/cpp-api/websocket/WSBuffer.cc | 10 +-
example/plugins/cpp-api/websocket/WSBuffer.h | 14 +-
include/records/I_RecProcess.h | 12 +-
include/records/P_RecDefs.h | 12 +-
include/records/P_RecUtils.h | 2 +-
include/shared/rpc/RPCRequests.h | 2 +-
include/ts/apidefs.h.in | 12 +-
include/ts/experimental.h | 40 +-
include/ts/remap.h | 4 +-
include/ts/sdt.h | 4 +-
include/ts/ts.h | 10 +-
include/tscore/AcidPtr.h | 6 +-
include/tscore/Allocator.h | 2 +-
include/tscore/Arena.h | 4 +-
include/tscore/BaseLogFile.h | 6 +-
include/tscore/BufferWriter.h | 26 +-
include/tscore/Diags.h | 54 +-
include/tscore/Errata.h | 12 +-
include/tscore/Extendible.h | 41 +-
include/tscore/HTTPVersion.h | 2 +-
include/tscore/History.h | 4 +-
include/tscore/InkErrno.h | 34 +-
include/tscore/IntrusiveHashMap.h | 11 +-
include/tscore/IpMap.h | 2 +-
include/tscore/List.h | 24 +-
include/tscore/MT_hashtable.h | 6 +-
include/tscore/MemArena.h | 6 +-
include/tscore/ParseRules.h | 62 +--
include/tscore/PluginUserArgs.h | 14 +-
include/tscore/Regression.h | 12 +-
include/tscore/Tokenizer.h | 6 +-
include/tscore/TsBuffer.h | 4 +-
include/tscore/bwf_std_format.h | 8 +-
include/tscore/ink_aiocb.h | 2 +-
include/tscore/ink_config.h.in | 2 +-
include/tscore/ink_defs.h | 4 +-
include/tscore/ink_hrtime.h | 28 +-
include/tscore/ink_inet.h | 7 +-
include/tscore/ink_lockfile.h | 4 +-
include/tscore/ink_memory.h | 6 +-
include/tscore/ink_queue.h | 8 +-
include/tscore/ink_resolver.h | 102 ++--
include/tscore/ink_resource.h | 4 +-
include/tscore/ink_string++.h | 6 +-
include/tscore/ink_string.h | 22 +-
include/tscore/ink_thread.h | 2 +-
include/tscpp/api/Continuation.h | 2 +-
include/tscpp/api/Logger.h | 4 +-
include/tscpp/api/noncopyable.h | 2 +-
include/tscpp/util/Histogram.h | 2 +-
include/tscpp/util/PostScript.h | 2 +-
include/tscpp/util/TextView.h | 9 +-
include/tscpp/util/TsSharedMutex.h | 4 +-
include/tscpp/util/ts_errata.h | 3 +-
iocore/aio/AIO.cc | 2 +-
iocore/aio/I_AIO.h | 8 +-
iocore/aio/test_AIO.cc | 18 +-
iocore/cache/Cache.cc | 68 +--
iocore/cache/CacheDir.cc | 16 +-
iocore/cache/CacheDisk.cc | 14 +-
iocore/cache/CacheHosting.cc | 18 +-
iocore/cache/CacheHttp.cc | 14 +-
iocore/cache/CachePages.cc | 18 +-
iocore/cache/CachePagesInternal.cc | 2 +-
iocore/cache/CacheRead.cc | 9 +-
iocore/cache/CacheTest.cc | 8 +-
iocore/cache/CacheVol.cc | 10 +-
iocore/cache/CacheWrite.cc | 34 +-
iocore/cache/I_Cache.h | 12 +-
iocore/cache/I_CacheDefs.h | 32 +-
iocore/cache/I_Store.h | 4 +-
iocore/cache/P_CacheDir.h | 82 +--
iocore/cache/P_CacheDisk.h | 16 +-
iocore/cache/P_CacheHosting.h | 6 +-
iocore/cache/P_CacheInternal.h | 44 +-
iocore/cache/P_CacheTest.h | 38 +-
iocore/cache/P_CacheVol.h | 66 +--
iocore/cache/RamCacheCLFUS.cc | 37 +-
iocore/cache/Store.cc | 4 +-
iocore/cache/test/CacheTestHandler.h | 4 +-
iocore/cache/test/main.cc | 8 +-
iocore/dns/DNS.cc | 52 +-
iocore/dns/DNSConnection.cc | 2 +-
iocore/dns/P_DNSProcessor.h | 32 +-
iocore/dns/SplitDNS.cc | 2 +-
iocore/eventsystem/IOBuffer.cc | 40 +-
iocore/eventsystem/I_Action.h | 2 +-
iocore/eventsystem/I_Continuation.h | 3 +-
iocore/eventsystem/I_EThread.h | 2 +-
iocore/eventsystem/I_Event.h | 94 ++--
iocore/eventsystem/I_EventProcessor.h | 2 +-
iocore/eventsystem/I_IOBuffer.h | 68 +--
iocore/eventsystem/I_Lock.h | 6 +-
iocore/eventsystem/I_MIOBufferWriter.h | 12 +-
iocore/eventsystem/I_PriorityEventQueue.h | 2 +-
iocore/eventsystem/I_Processor.h | 8 +-
iocore/eventsystem/I_ProxyAllocator.h | 6 +-
iocore/eventsystem/I_Thread.h | 2 +-
iocore/eventsystem/I_VConnection.h | 9 +-
iocore/eventsystem/MIOBufferWriter.cc | 2 +-
iocore/eventsystem/PQ-List.cc | 2 +-
iocore/eventsystem/P_IOBuffer.h | 14 +-
iocore/eventsystem/UnixEThread.cc | 12 +-
.../unit_tests/test_EventSystem.cc | 2 +-
.../unit_tests/test_MIOBufferWriter.cc | 2 +-
iocore/hostdb/HostDB.cc | 6 +-
iocore/hostdb/I_HostDBProcessor.h | 17 +-
iocore/hostdb/P_HostDBProcessor.h | 12 +-
iocore/hostdb/test_HostFile.cc | 2 +-
iocore/hostdb/test_RefCountCache.cc | 10 +-
iocore/net/BIO_fastopen.cc | 26 +-
iocore/net/Connection.cc | 2 +-
iocore/net/I_Net.h | 28 +-
iocore/net/I_NetProcessor.h | 2 +-
iocore/net/I_NetVConnection.h | 2 +-
iocore/net/I_Socks.h | 20 +-
iocore/net/Net.cc | 40 +-
iocore/net/NetEvent.h | 2 +-
iocore/net/NetVCTest.cc | 45 +-
iocore/net/P_Connection.h | 26 +-
iocore/net/P_Net.h | 8 +-
iocore/net/P_QUICNextProtocolAccept_native.h | 2 +-
iocore/net/P_QUICNextProtocolAccept_quiche.h | 2 +-
iocore/net/P_SNIActionPerformer.h | 2 +-
iocore/net/P_SSLNetProcessor.h | 2 +-
iocore/net/P_SSLNetVConnection.h | 6 +-
iocore/net/P_SSLNextProtocolAccept.h | 2 +-
iocore/net/P_SSLNextProtocolSet.h | 2 +-
iocore/net/P_TLSKeyLogger.h | 2 +-
iocore/net/P_UDPNet.h | 4 +-
iocore/net/P_UDPPacket.h | 2 +-
iocore/net/P_UnixNet.h | 32 +-
iocore/net/P_UnixNetVConnection.h | 2 +-
iocore/net/P_UnixPollDescriptor.h | 16 +-
iocore/net/QUICMultiCertConfigLoader.cc | 2 +-
iocore/net/QUICNetVConnection.cc | 8 +-
iocore/net/QUICNetVConnection_quiche.cc | 2 +-
iocore/net/QUICPacketHandler.cc | 2 +-
iocore/net/QUICPacketHandler_quiche.cc | 6 +-
iocore/net/SSLConfig.cc | 10 +-
iocore/net/SSLDiags.h | 4 +-
iocore/net/SSLNetVConnection.cc | 34 +-
iocore/net/SSLSessionCache.cc | 4 +-
iocore/net/SSLSessionCache.h | 6 +-
iocore/net/SSLStats.cc | 4 +-
iocore/net/SSLStats.h | 6 +-
iocore/net/SSLUtils.cc | 12 +-
iocore/net/Socks.cc | 2 +-
iocore/net/UnixConnection.cc | 2 +-
iocore/net/UnixNetVConnection.cc | 8 +-
iocore/net/UnixUDPNet.cc | 8 +-
iocore/net/YamlSNIConfig.cc | 16 +-
iocore/net/quic/Mock.h | 14 +-
iocore/net/quic/QUICAckFrameCreator.cc | 2 +-
iocore/net/quic/QUICCryptoStream.cc | 2 +-
iocore/net/quic/QUICFrame.cc | 58 +--
iocore/net/quic/QUICFrameDispatcher.cc | 2 +-
iocore/net/quic/QUICHKDF.cc | 4 +-
.../quic/QUICNewRenoCongestionController.cc | 6 +-
iocore/net/quic/QUICPacket.cc | 60 +--
iocore/net/quic/QUICPacket.h | 2 +-
.../QUICPacketPayloadProtector_boringssl.cc | 2 +-
.../QUICPacketPayloadProtector_openssl.cc | 2 +-
iocore/net/quic/QUICPacketReceiveQueue.cc | 2 +-
iocore/net/quic/QUICRetryIntegrityTag.h | 4 +-
iocore/net/quic/QUICStats.h | 6 +-
iocore/net/quic/QUICStreamManager_native.cc | 4 +-
iocore/net/quic/QUICStreamVCAdapter.cc | 2 +-
iocore/net/quic/QUICTransportParameters.cc | 6 +-
iocore/net/quic/QUICTypes.cc | 22 +-
iocore/net/quic/qlog/QLogEvent.h | 15 +-
iocore/utils/I_OneWayTunnel.h | 2 +-
mgmt/DerivativeMetrics.cc | 78 ++-
mgmt/DerivativeMetrics.h | 2 +-
mgmt/WebMgmtUtils.cc | 2 +-
mgmt/YamlCfg.cc | 2 +-
mgmt/YamlCfg.h | 2 +-
mgmt/api/CoreAPIShared.h | 8 +-
mgmt/api/INKMgmtAPI.cc | 6 +-
mgmt/api/include/mgmtapi.h | 12 +-
mgmt/config/FileManager.h | 4 +-
mgmt/rpc/handlers/common/ErrorUtils.h | 2 +-
mgmt/rpc/jsonrpc/JsonRPCManager.h | 8 +-
.../jsonrpc/unit_tests/test_basic_protocol.cc | 2 +-
mgmt/rpc/server/unit_tests/test_rpcserver.cc | 12 +-
mgmt/utils/ExpandingArray.cc | 2 +-
mgmt/utils/MgmtUtils.cc | 10 +-
plugins/authproxy/authproxy.cc | 67 +--
plugins/authproxy/utils.h | 4 +-
plugins/background_fetch/background_fetch.cc | 7 +-
plugins/background_fetch/configs.cc | 10 +-
plugins/cache_promote/chance_policy.h | 7 +-
plugins/cache_promote/configs.cc | 24 +-
plugins/cache_promote/lru_policy.cc | 12 +-
plugins/cache_promote/policy_manager.h | 2 +-
.../cache_range_requests.cc | 16 +-
plugins/cachekey/cachekey.h | 2 +-
plugins/cachekey/configs.cc | 46 +-
plugins/cachekey/pattern.h | 6 +-
plugins/certifier/certifier.cc | 12 +-
plugins/esi/combo_handler.cc | 8 +-
plugins/esi/esi.cc | 32 +-
plugins/esi/fetcher/HttpDataFetcherImpl.cc | 2 +-
plugins/esi/lib/DocNode.cc | 8 +-
plugins/esi/lib/EsiGzip.cc | 6 +-
plugins/esi/lib/EsiParser.cc | 4 +-
plugins/esi/lib/Expression.cc | 2 +-
plugins/esi/lib/Utils.h | 2 +-
plugins/esi/lib/Variables.h | 2 +-
plugins/esi/lib/gzip.cc | 10 +-
plugins/esi/serverIntercept.cc | 2 +-
plugins/esi/test/gzip_test.cc | 4 +-
.../access_control/access_control.cc | 2 +-
.../access_control/access_control.h | 2 +-
plugins/experimental/access_control/config.cc | 36 +-
plugins/experimental/access_control/pattern.h | 6 +-
.../unit_tests/test_access_control.cc | 4 +-
plugins/experimental/access_control/utils.cc | 4 +-
plugins/experimental/acme/acme.c | 6 +-
.../cache_fill/background_fetch.h | 4 +-
.../experimental/cookie_remap/cookie_remap.cc | 6 +-
plugins/experimental/cookie_remap/cookiejar.h | 2 +-
plugins/experimental/cookie_remap/strip.cc | 2 +-
plugins/experimental/cookie_remap/strip.h | 18 +-
.../experimental/fastcgi/src/ats_fastcgi.h | 4 +-
.../fastcgi/src/ats_fcgi_client.cc | 18 +-
.../fastcgi/src/ats_fcgi_client.h | 4 +-
.../experimental/fastcgi/src/fcgi_config.h | 4 +-
.../experimental/fastcgi/src/fcgi_protocol.h | 36 +-
plugins/experimental/fastcgi/src/server.h | 4 +-
.../fastcgi/src/server_intercept.cc | 2 +-
plugins/experimental/fq_pacing/fq_pacing.c | 5 +-
plugins/experimental/http_stats/http_stats.cc | 12 +-
plugins/experimental/icap/icap_plugin.cc | 10 +-
plugins/experimental/inliner/cache-handler.h | 16 +-
plugins/experimental/inliner/cache.h | 6 +-
plugins/experimental/inliner/chunk-decoder.cc | 4 +-
plugins/experimental/inliner/html-parser.cc | 8 +-
.../experimental/inliner/inliner-handler.h | 2 +-
plugins/experimental/inliner/ts.cc | 4 +-
plugins/experimental/inliner/ts.h | 18 +-
.../ja3_fingerprint/ja3_fingerprint.cc | 22 +-
plugins/experimental/maxmind_acl/mmdb.h | 2 +-
plugins/experimental/memcache/tsmemcache.cc | 8 +-
plugins/experimental/memcache/tsmemcache.h | 48 +-
.../experimental/money_trace/money_trace.cc | 10 +-
plugins/experimental/mp4/mp4.cc | 2 +-
plugins/experimental/mp4/mp4_meta.cc | 119 +++--
plugins/experimental/mp4/mp4_meta.h | 2 +-
.../experimental/otel_tracer/otel_tracer.cc | 6 +-
.../experimental/otel_tracer/tracer_common.h | 7 +-
plugins/experimental/parent_select/strategy.h | 4 +-
.../experimental/rate_limit/ip_reputation.cc | 4 +-
plugins/experimental/rate_limit/iprep_simu.cc | 13 +-
.../experimental/rate_limit/sni_limiter.cc | 28 +-
.../experimental/rate_limit/txn_limiter.cc | 20 +-
.../redo_cache_lookup/redo_cache_lookup.cc | 4 +-
.../experimental/remap_stats/remap_stats.cc | 6 +-
plugins/experimental/slice/Config.cc | 26 +-
plugins/experimental/slice/Data.h | 2 +-
plugins/experimental/slice/HttpHeader.cc | 2 +-
plugins/experimental/slice/HttpHeader.h | 4 +-
plugins/experimental/slice/Stage.h | 2 +-
plugins/experimental/slice/client.cc | 2 +-
plugins/experimental/slice/slice.h | 2 +-
plugins/experimental/slice/slice_test.cc | 21 +-
plugins/experimental/slice/transfer.cc | 6 +-
.../slice/unit-tests/slice_test.cc | 21 +-
.../slice/unit-tests/test_config.cc | 44 +-
.../slice/unit-tests/test_range.cc | 22 +-
.../ssl_session_reuse/src/session_process.cc | 2 +-
.../ssl_session_reuse/src/ssl_key_utils.cc | 2 +-
.../experimental/ssl_session_reuse/src/stek.h | 4 +-
plugins/experimental/sslheaders/expand.cc | 2 +-
plugins/experimental/sslheaders/sslheaders.cc | 2 +-
plugins/experimental/sslheaders/sslheaders.h | 6 +-
.../sslheaders/unit_tests/test_sslheaders.cc | 2 +-
plugins/experimental/sslheaders/util.cc | 20 +-
plugins/experimental/statichit/statichit.cc | 16 +-
plugins/experimental/stek_share/log_store.cc | 2 +-
plugins/experimental/stek_share/stek_share.cc | 8 +-
plugins/experimental/stek_share/stek_utils.h | 4 +-
.../stream_editor/stream_editor.cc | 18 +-
.../experimental/system_stats/system_stats.c | 8 +-
.../experimental/traffic_dump/session_data.cc | 38 +-
.../experimental/traffic_dump/traffic_dump.cc | 22 +-
.../traffic_dump/transaction_data.cc | 18 +-
plugins/experimental/uri_signing/common.h | 6 +-
plugins/experimental/uri_signing/config.c | 2 +-
.../unit_tests/uri_signing_test.cc | 145 ++++--
plugins/experimental/url_sig/url_sig.c | 10 +-
plugins/experimental/url_sig/url_sig.h | 20 +-
.../wasm/examples/cpp/myproject.cc | 3 +-
plugins/header_rewrite/condition.h | 2 +-
plugins/header_rewrite/conditions.h | 40 +-
plugins/header_rewrite/header_rewrite.cc | 5 +-
plugins/header_rewrite/matcher.h | 2 +-
plugins/header_rewrite/operator.h | 6 +-
plugins/header_rewrite/operators.h | 42 +-
plugins/header_rewrite/parser.h | 4 +-
plugins/header_rewrite/resources.h | 2 +-
plugins/header_rewrite/ruleset.cc | 2 +-
plugins/header_rewrite/ruleset.h | 2 +-
plugins/header_rewrite/statement.h | 2 +-
plugins/header_rewrite/value.h | 2 +-
plugins/healthchecks/healthchecks.c | 14 +-
plugins/lua/ts_lua.c | 24 +-
plugins/lua/ts_lua_common.h | 72 +--
plugins/lua/ts_lua_crypto.c | 4 +-
plugins/lua/ts_lua_fetch.c | 6 +-
plugins/lua/ts_lua_fetch.h | 2 +-
plugins/lua/ts_lua_io.c | 2 +-
plugins/lua/ts_lua_package.c | 2 +-
plugins/lua/ts_lua_transform.c | 2 +-
plugins/multiplexer/chunk-decoder.cc | 4 +-
plugins/multiplexer/dispatch.cc | 4 +-
plugins/prefetch/configs.cc | 30 +-
plugins/prefetch/fetch.h | 24 +-
plugins/regex_remap/regex_remap.cc | 10 +-
plugins/regex_revalidate/regex_revalidate.c | 20 +-
plugins/remap_purge/remap_purge.c | 9 +-
plugins/s3_auth/s3_auth.cc | 20 +-
.../s3_auth/unit_tests/test_aws_auth_v4.cc | 2 +-
.../server_push_preload.cc | 2 +-
plugins/stats_over_http/stats_over_http.cc | 18 +-
plugins/tcpinfo/tcpinfo.cc | 42 +-
plugins/xdebug/xdebug.cc | 78 +--
plugins/xdebug/xdebug_transforms.cc | 4 +-
proxy/CacheControl.h | 2 +-
proxy/ControlMatcher.h | 10 +-
proxy/HostStatus.h | 2 +-
proxy/IPAllow.h | 2 +-
proxy/ParentSelection.cc | 8 +-
proxy/ParentSelection.h | 2 +-
proxy/PluginVC.cc | 4 +-
proxy/ProtocolProbeSessionAccept.h | 2 +-
proxy/ProxySession.h | 2 +-
proxy/ReverseProxy.cc | 10 +-
proxy/Transform.cc | 4 +-
proxy/hdrs/HTTP.cc | 50 +-
proxy/hdrs/HTTP.h | 2 +-
proxy/hdrs/HdrHeap.cc | 30 +-
proxy/hdrs/HdrHeap.h | 6 +-
proxy/hdrs/HdrToken.cc | 258 ++++-----
proxy/hdrs/HdrToken.h | 172 +++---
proxy/hdrs/HuffmanCodec.cc | 305 +++++++++--
proxy/hdrs/MIME.cc | 94 ++--
proxy/hdrs/MIME.h | 36 +-
proxy/hdrs/URL.cc | 30 +-
proxy/hdrs/URL.h | 4 +-
proxy/hdrs/VersionConverter.h | 23 +-
proxy/hdrs/XPACK.cc | 4 +-
proxy/hdrs/load_http_hdr.cc | 4 +-
proxy/hdrs/test_Huffmancode.cc | 21 +-
proxy/hdrs/unit_tests/test_Hdrs.cc | 493 +++++++++---------
proxy/hdrs/unit_tests/test_URL.cc | 147 +++---
proxy/hdrs/unit_tests/test_XPACK.cc | 29 +-
proxy/hdrs/unit_tests/test_mime.cc | 24 +-
proxy/http/Http1ServerSession.h | 2 +-
proxy/http/HttpBodyFactory.h | 4 +-
proxy/http/HttpConfig.cc | 34 +-
proxy/http/HttpConfig.h | 20 +-
proxy/http/HttpConnectionCount.cc | 3 +-
proxy/http/HttpConnectionCount.h | 2 +-
proxy/http/HttpPages.cc | 8 +-
proxy/http/HttpSM.cc | 37 +-
proxy/http/HttpSM.h | 2 +-
proxy/http/HttpSessionAccept.h | 2 +-
proxy/http/HttpTransact.cc | 12 +-
proxy/http/HttpTransact.h | 10 +-
proxy/http/HttpTransactCache.cc | 16 +-
proxy/http/HttpTransactHeaders.cc | 6 +-
proxy/http/HttpTunnel.cc | 4 +-
proxy/http/HttpTunnel.h | 10 +-
proxy/http/PreWarmConfig.h | 2 +-
proxy/http/PreWarmManager.cc | 2 +-
proxy/http/RegressionHttpTransact.cc | 48 +-
proxy/http/remap/AclFiltering.h | 8 +-
proxy/http/remap/NextHopSelectionStrategy.h | 8 +-
proxy/http/remap/RemapConfig.cc | 34 +-
proxy/http/remap/RemapConfig.h | 26 +-
proxy/http/remap/RemapPlugins.cc | 5 +-
proxy/http/remap/RemapProcessor.h | 4 +-
proxy/http/remap/UrlMapping.h | 2 +-
proxy/http/remap/UrlRewrite.cc | 15 +-
proxy/http/remap/UrlRewrite.h | 4 +-
.../remap/unit-tests/nexthop_test_stubs.h | 8 +-
.../remap/unit-tests/plugin_testing_common.cc | 2 +-
.../http/remap/unit-tests/test_RemapPlugin.cc | 5 +-
proxy/http/unit_tests/test_ForwardedConfig.cc | 4 +-
.../unit_tests/test_error_page_selection.cc | 80 +--
proxy/http2/HPACK.cc | 134 ++---
proxy/http2/HPACK.h | 4 +-
proxy/http2/HTTP2.cc | 8 +-
proxy/http2/HTTP2.h | 2 +-
proxy/http2/Http2ClientSession.h | 2 +-
proxy/http2/Http2CommonSession.cc | 4 +-
proxy/http2/Http2CommonSession.h | 10 +-
proxy/http2/Http2ConnectionState.cc | 8 +-
proxy/http2/Http2ConnectionState.h | 2 +-
proxy/http2/Http2DependencyTree.h | 2 +-
proxy/http2/Http2Frame.cc | 2 +-
proxy/http2/Http2FrequencyCounter.cc | 2 +-
proxy/http2/Http2SessionAccept.h | 2 +-
proxy/http2/Http2Stream.cc | 2 +-
proxy/http2/Http2Stream.h | 7 +-
proxy/http2/test_HPACK.cc | 13 +-
.../unit_tests/test_HpackIndexingTable.cc | 177 +++----
proxy/http2/unit_tests/test_Http2Frame.cc | 182 +++----
.../unit_tests/test_Http2FrequencyCounter.cc | 14 +-
proxy/http3/Http3DataFramer.cc | 2 +-
proxy/http3/Http3Frame.cc | 4 +-
proxy/http3/Http3FrameCollector.cc | 4 +-
proxy/http3/Http3HeaderVIOAdaptor.cc | 2 +-
proxy/http3/Http3Session.cc | 2 +-
proxy/http3/Http3Transaction.cc | 4 +-
proxy/http3/QPACK.cc | 219 ++++----
proxy/logging/LogAccess.cc | 40 +-
proxy/logging/LogAccess.h | 4 +-
proxy/logging/LogAccessTest.h | 2 +-
proxy/logging/LogBuffer.cc | 14 +-
proxy/logging/LogBuffer.h | 8 +-
proxy/logging/LogConfig.cc | 9 +-
proxy/logging/LogConfig.h | 4 +-
proxy/logging/LogField.cc | 50 +-
proxy/logging/LogField.h | 2 +-
proxy/logging/LogFile.cc | 4 +-
proxy/logging/LogFilter.cc | 2 +-
proxy/logging/LogFilter.h | 8 +-
proxy/logging/LogFormat.cc | 10 +-
proxy/logging/LogFormat.h | 2 +-
proxy/logging/LogObject.h | 6 +-
proxy/logging/YamlLogConfig.cc | 13 +-
proxy/logging/YamlLogConfig.h | 2 +-
proxy/logging/unit-tests/test_LogUtils.cc | 8 +-
proxy/shared/DiagsConfig.cc | 15 +-
src/records/RecFile.cc | 4 +-
src/records/RecHttp.cc | 12 +-
src/records/RecMessage.cc | 16 +-
src/records/RecRawStats.cc | 16 +-
src/shared/overridable_txn_vars.cc | 294 +++++------
src/traffic_cache_tool/CacheDefs.cc | 20 +-
src/traffic_cache_tool/CacheDefs.h | 26 +-
src/traffic_cache_tool/CacheScan.cc | 2 +-
src/traffic_cache_tool/CacheTool.cc | 28 +-
src/traffic_crashlog/procinfo.cc | 4 +-
src/traffic_crashlog/traffic_crashlog.cc | 15 +-
src/traffic_crashlog/traffic_crashlog.h | 4 +-
src/traffic_ctl/CtrlCommands.cc | 33 +-
src/traffic_ctl/CtrlPrinters.cc | 6 +-
src/traffic_logcat/logcat.cc | 23 +-
src/traffic_logstats/logstats.cc | 73 +--
src/traffic_quic/quic_client.cc | 2 +-
src/traffic_quic/traffic_quic.cc | 20 +-
src/traffic_server/FetchSM.cc | 12 +-
src/traffic_server/HostStatus.cc | 8 +-
src/traffic_server/InkAPI.cc | 4 +-
src/traffic_server/InkAPITest.cc | 196 +++----
src/traffic_server/traffic_server.cc | 128 +++--
src/traffic_top/stats.h | 2 +-
src/traffic_top/traffic_top.cc | 2 +-
src/traffic_wccp/wccp_client.cc | 10 +-
src/tscore/ArgParser.cc | 2 +-
src/tscore/BaseLogFile.cc | 4 +-
src/tscore/BufferWriterFormat.cc | 218 +++-----
src/tscore/CryptoHash.cc | 2 +-
src/tscore/Extendible.cc | 2 +-
src/tscore/HashSip.cc | 2 +-
src/tscore/IpMap.cc | 5 +-
src/tscore/Layout.cc | 14 +-
src/tscore/MMH.cc | 68 +--
src/tscore/MatcherUtils.cc | 6 +-
src/tscore/MemArena.cc | 2 +-
src/tscore/ParseRules.cc | 4 +-
src/tscore/Regression.cc | 6 +-
src/tscore/SourceLocation.cc | 5 +-
src/tscore/TextBuffer.cc | 12 +-
src/tscore/hugepages.cc | 6 +-
src/tscore/ink_base64.cc | 10 +-
src/tscore/ink_file.cc | 2 +-
src/tscore/ink_hrtime.cc | 2 +-
src/tscore/ink_inet.cc | 4 +-
src/tscore/ink_queue.cc | 4 +-
src/tscore/ink_rand.cc | 8 +-
src/tscore/ink_res_init.cc | 5 +-
src/tscore/ink_string++.cc | 2 +-
src/tscore/ink_syslog.cc | 28 +-
src/tscore/lockfile.cc | 2 +-
src/tscore/runroot.cc | 2 +-
src/tscore/test_atomic.cc | 6 +-
src/tscore/unit_tests/freelist_benchmark.cc | 5 +-
src/tscore/unit_tests/test_AcidPtr.cc | 8 +-
src/tscore/unit_tests/test_BufferWriter.cc | 12 +-
src/tscore/unit_tests/test_History.cc | 2 +-
src/tscore/unit_tests/test_List.cc | 2 +-
src/tscore/unit_tests/test_MMH.cc | 6 +-
src/tscore/unit_tests/test_Regex.cc | 6 +-
src/tscore/unit_tests/test_Version.cc | 14 +-
src/tscore/unit_tests/test_ink_inet.cc | 22 +-
src/tscpp/api/GzipDeflateTransformation.cc | 4 +-
src/tscpp/api/Headers.cc | 8 +-
src/tscpp/api/InterceptPlugin.cc | 4 +-
src/tscpp/api/TransformationPlugin.cc | 2 +-
src/tscpp/api/utils_internal.cc | 2 +-
.../util/unit_tests/test_IntrusiveDList.cc | 4 +-
src/wccp/WccpConfig.cc | 22 +-
src/wccp/WccpEndPoint.cc | 12 +-
src/wccp/WccpLocal.h | 2 +-
src/wccp/WccpMsg.cc | 4 +-
src/wccp/wccp-test-router.cc | 5 +-
tools/clang-format.sh | 25 +-
tools/git/pre-commit | 43 +-
tools/http_load/http_load.c | 26 +-
tools/http_load/timers.c | 12 +-
tools/jtest/jtest.cc | 307 +++++------
533 files changed, 5162 insertions(+), 4640 deletions(-)
diff --git a/.clang-format b/.clang-format
index cd564fb109c..3bd0b0b3387 100644
--- a/.clang-format
+++ b/.clang-format
@@ -1,16 +1,38 @@
---
-Language: Cpp
+Language: Cpp
AccessModifierOffset: -2
AlignAfterOpenBracket: Align
-AlignConsecutiveMacros: false
-AlignConsecutiveAssignments: true
-AlignConsecutiveDeclarations: false
+AlignArrayOfStructures: Left
+AlignConsecutiveAssignments:
+ Enabled: true
+ AcrossEmptyLines: false
+ AcrossComments: false
+ AlignCompound: true
+ PadOperators: true
+AlignConsecutiveBitFields:
+ Enabled: true
+ AcrossEmptyLines: false
+ AcrossComments: false
+ AlignCompound: false
+ PadOperators: false
+AlignConsecutiveDeclarations:
+ Enabled: false
+ AcrossEmptyLines: false
+ AcrossComments: false
+ AlignCompound: false
+ PadOperators: true
+AlignConsecutiveMacros:
+ Enabled: true
+ AcrossEmptyLines: false
+ AcrossComments: false
+ AlignCompound: false
+ PadOperators: true
AlignEscapedNewlines: Left
-AlignOperands: true
+AlignOperands: Align
AlignTrailingComments: true
-AllowAllArgumentsOnNextLine: true
-AllowAllConstructorInitializersOnNextLine: true
+AllowAllArgumentsOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false
+AllowShortEnumsOnASingleLine: true
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Inline
@@ -21,26 +43,31 @@ AlwaysBreakAfterDefinitionReturnType: All
AlwaysBreakAfterReturnType: AllDefinitions
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: MultiLine
+AttributeMacros:
+ - __capability
BinPackArguments: true
BinPackParameters: true
BraceWrapping:
- AfterCaseLabel: false
- AfterClass: true
- AfterControlStatement: false
- AfterEnum: false
- AfterFunction: true
- AfterNamespace: true
+ AfterCaseLabel: false
+ AfterClass: true
+ AfterControlStatement: Never
+ AfterEnum: false
+ AfterFunction: true
+ AfterNamespace: true
AfterObjCDeclaration: false
- AfterStruct: false
- AfterUnion: false
+ AfterStruct: false
+ AfterUnion: false
AfterExternBlock: false
- BeforeCatch: false
- BeforeElse: false
- IndentBraces: false
+ BeforeCatch: false
+ BeforeElse: false
+ BeforeLambdaBody: false
+ BeforeWhile: false
+ IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakBeforeBinaryOperators: None
+BreakBeforeConceptDeclarations: Always
BreakBeforeBraces: Linux
BreakBeforeInheritanceComma: false
BreakInheritanceList: BeforeColon
@@ -49,17 +76,23 @@ BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: BeforeColon
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: true
-ColumnLimit: 132
-CommentPragmas: '^ IWYU pragma:'
+ColumnLimit: 132
+CommentPragmas: "^ IWYU pragma:"
+QualifierAlignment: Leave
CompactNamespaces: false
-ConstructorInitializerAllOnOneLineOrOnePerLine: true
ConstructorInitializerIndentWidth: 2
ContinuationIndentWidth: 2
Cpp11BracedListStyle: true
DeriveLineEnding: true
DerivePointerAlignment: false
-DisableFormat: false
+DisableFormat: false
+EmptyLineAfterAccessModifier: Never
+EmptyLineBeforeAccessModifier: LogicalBlock
ExperimentalAutoDetectBinPacking: false
+PackConstructorInitializers: NextLine
+BasedOnStyle: ""
+ConstructorInitializerAllOnOneLineOrOnePerLine: false
+AllowAllConstructorInitializersOnNextLine: true
FixNamespaceComments: true
ForEachMacros:
- forv_Vec
@@ -68,72 +101,117 @@ ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
-IncludeBlocks: Preserve
+IfMacros:
+ - KJ_IF_MAYBE
+IncludeBlocks: Preserve
IncludeCategories:
- - Regex: '^"(llvm|llvm-c|clang|clang-c)/'
- Priority: 2
- SortPriority: 0
- - Regex: '^(<|"(gtest|isl|json)/)'
- Priority: 3
- SortPriority: 0
- - Regex: '.*'
- Priority: 1
- SortPriority: 0
-IncludeIsMainRegex: '$'
-IncludeIsMainSourceRegex: ''
+ - Regex: '^"(llvm|llvm-c|clang|clang-c)/'
+ Priority: 2
+ SortPriority: 0
+ CaseSensitive: false
+ - Regex: '^(<|"(gtest|isl|json)/)'
+ Priority: 3
+ SortPriority: 0
+ CaseSensitive: false
+ - Regex: ".*"
+ Priority: 1
+ SortPriority: 0
+ CaseSensitive: false
+IncludeIsMainRegex: "$"
+IncludeIsMainSourceRegex: ""
+IndentAccessModifiers: false
IndentCaseLabels: false
+IndentCaseBlocks: false
IndentGotoLabels: true
IndentPPDirectives: None
-IndentWidth: 2
+IndentExternBlock: AfterExternBlock
+IndentRequiresClause: true
+IndentWidth: 2
IndentWrappedFunctionNames: false
+InsertBraces: false
+InsertTrailingCommas: None
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: false
-MacroBlockBegin: ''
-MacroBlockEnd: ''
+LambdaBodyIndentation: Signature
+MacroBlockBegin: ""
+MacroBlockEnd: ""
MaxEmptyLinesToKeep: 1
NamespaceIndentation: Inner
ObjCBinPackProtocolList: Auto
ObjCBlockIndentWidth: 2
+ObjCBreakBeforeNestedBlockParam: true
ObjCSpaceAfterProperty: true
ObjCSpaceBeforeProtocolList: false
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 30000
PenaltyBreakFirstLessLess: 120
+PenaltyBreakOpenParenthesis: 0
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 200
+PenaltyIndentedWhitespace: 0
PointerAlignment: Right
-ReflowComments: true
-SortIncludes: false
+PPIndentWidth: -1
+ReferenceAlignment: Pointer
+ReflowComments: true
+RemoveBracesLLVM: false
+RequiresClausePosition: OwnLine
+SeparateDefinitionBlocks: Leave
+ShortNamespaceLines: 1
+SortIncludes: Never
+SortJavaStaticImport: Before
SortUsingDeclarations: false
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
+SpaceBeforeCaseColon: false
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
+SpaceBeforeParensOptions:
+ AfterControlStatements: true
+ AfterForeachMacros: true
+ AfterFunctionDefinitionName: false
+ AfterFunctionDeclarationName: false
+ AfterIfMacros: true
+ AfterOverloadedOperator: false
+ AfterRequiresInClause: false
+ AfterRequiresInExpression: false
+ BeforeNonEmptyParentheses: false
+SpaceAroundPointerQualifiers: Default
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
-SpacesInAngles: false
+SpacesInAngles: Never
SpacesInConditionalStatement: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
+SpacesInLineCommentPrefix:
+ Minimum: 1
+ Maximum: -1
SpacesInParentheses: false
SpacesInSquareBrackets: false
SpaceBeforeSquareBrackets: false
-Standard: Latest
+BitFieldColonSpacing: Both
+Standard: Latest
+StatementAttributeLikeMacros:
+ - Q_EMIT
StatementMacros:
- Q_UNUSED
- QT_REQUIRE_VERSION
-TabWidth: 8
-UseCRLF: false
-UseTab: Never
-...
-
+TabWidth: 8
+UseCRLF: false
+UseTab: Never
+WhitespaceSensitiveMacros:
+ - STRINGIZE
+ - PP_STRINGIZE
+ - BOOST_PP_STRINGIZE
+ - NS_SWIFT_NAME
+ - CF_SWIFT_NAME
+---
diff --git a/example/plugins/c-api/basic_auth/basic_auth.c b/example/plugins/c-api/basic_auth/basic_auth.c
index 95a87edc1a4..d798ee6ab15 100644
--- a/example/plugins/c-api/basic_auth/basic_auth.c
+++ b/example/plugins/c-api/basic_auth/basic_auth.c
@@ -52,8 +52,8 @@ base64_decode(const char *input)
*output++ = decode(0) << 2 | decode(1) >> 4;
*output++ = decode(1) << 4 | decode(2) >> 2;
*output++ = decode(2) << 6 | decode(3);
- len -= 4;
- input += 4;
+ len -= 4;
+ input += 4;
}
/*
@@ -139,7 +139,7 @@ handle_dns(TSHttpTxn txnp, TSCont contp)
goto done;
}
*password = '\0';
- password += 1;
+ password += 1;
if (!authorized(user, password)) {
TSError("[%s] %s:%s not authorized", PLUGIN_NAME, user, password);
diff --git a/example/plugins/c-api/bnull_transform/bnull_transform.c b/example/plugins/c-api/bnull_transform/bnull_transform.c
index 8cb2c44dc1a..db41fdbb93b 100644
--- a/example/plugins/c-api/bnull_transform/bnull_transform.c
+++ b/example/plugins/c-api/bnull_transform/bnull_transform.c
@@ -41,7 +41,7 @@
#define PLUGIN_NAME "bnull_transform"
-#define TS_NULL_MUTEX NULL
+#define TS_NULL_MUTEX NULL
#define STATE_BUFFER_DATA 0
#define STATE_OUTPUT_DATA 1
diff --git a/example/plugins/c-api/cache_scan/cache_scan.cc b/example/plugins/c-api/cache_scan/cache_scan.cc
index 4e0d9a952e3..e0546be0be0 100644
--- a/example/plugins/c-api/cache_scan/cache_scan.cc
+++ b/example/plugins/c-api/cache_scan/cache_scan.cc
@@ -68,10 +68,10 @@ handle_scan(TSCont contp, TSEvent event, void *edata)
cache_scan_state *cstate = static_cast(TSContDataGet(contp));
if (event == TS_EVENT_CACHE_REMOVE) {
- cstate->done = 1;
- const char error[] = "Cache remove operation succeeded";
- cstate->cache_vc = static_cast(edata);
- cstate->write_vio = TSVConnWrite(cstate->net_vc, contp, cstate->resp_reader, INT64_MAX);
+ cstate->done = 1;
+ const char error[] = "Cache remove operation succeeded";
+ cstate->cache_vc = static_cast(edata);
+ cstate->write_vio = TSVConnWrite(cstate->net_vc, contp, cstate->resp_reader, INT64_MAX);
cstate->total_bytes += TSIOBufferWrite(cstate->resp_buffer, error, sizeof(error) - 1);
TSVIONBytesSet(cstate->write_vio, cstate->total_bytes);
TSVIOReenable(cstate->write_vio);
@@ -83,8 +83,8 @@ handle_scan(TSCont contp, TSEvent event, void *edata)
const char error[] = "Cache remove operation failed error=";
char rc[12];
snprintf(rc, 12, "%p", edata);
- cstate->cache_vc = static_cast(edata);
- cstate->write_vio = TSVConnWrite(cstate->net_vc, contp, cstate->resp_reader, INT64_MAX);
+ cstate->cache_vc = static_cast(edata);
+ cstate->write_vio = TSVConnWrite(cstate->net_vc, contp, cstate->resp_reader, INT64_MAX);
cstate->total_bytes += TSIOBufferWrite(cstate->resp_buffer, error, sizeof(error) - 1);
cstate->total_bytes += TSIOBufferWrite(cstate->resp_buffer, rc, strlen(rc));
@@ -104,7 +104,7 @@ handle_scan(TSCont contp, TSEvent event, void *edata)
event == TS_EVENT_CACHE_SCAN_OPERATION_FAILED) {
cstate->done = 1;
if (cstate->resp_buffer) {
- const char error[] = "Cache scan operation blocked or failed";
+ const char error[] = "Cache scan operation blocked or failed";
cstate->total_bytes += TSIOBufferWrite(cstate->resp_buffer, error, sizeof(error) - 1);
}
if (cstate->write_vio) {
@@ -159,12 +159,12 @@ handle_scan(TSCont contp, TSEvent event, void *edata)
if (event == TS_EVENT_CACHE_SCAN_DONE) {
cstate->done = 1;
char s[512];
- int s_len = snprintf(s, sizeof(s),
- "
\n