Commit 688c8aaa authored by Alfred Fuller's avatar Alfred Fuller Committed by Facebook GitHub Bot

Update include categories in clang-format canary

Summary:
This just fixes the include order within groups of includes, so is significantly less aggressive than the other codemod which regroups includes.

I've manually ensured that:
- groups are split when trivial.
- glog is not reordered relative to other folly headers (seems to cause down stream issues)
- portability headers are not reordered (seems to cause down stream issues)
other diffs will finish the regrouping and ordering of those groups.

Reviewed By: yfeldblum

Differential Revision: D26405757

fbshipit-source-id: 9b79a91a41a4e6ac677ed0cb7fb24dfb7c8093d2
parent dff3d40c
......@@ -15,6 +15,7 @@
*/
#include <folly/Conv.h>
#include <array>
namespace folly {
......
......@@ -16,10 +16,11 @@
#pragma once
#include <tuple>
#include <folly/Conv.h>
#include <folly/Optional.h>
#include <folly/functional/Invoke.h>
#include <tuple>
namespace folly {
......
......@@ -15,6 +15,7 @@
*/
#include <folly/MicroLock.h>
#include <thread>
#include <folly/portability/Asm.h>
......
......@@ -30,6 +30,7 @@
#include <folly/portability/Config.h>
#include <folly/portability/SysTime.h>
#include <folly/portability/Unistd.h>
#include <glog/logging.h>
#ifdef _MSC_VER
......
......@@ -34,6 +34,7 @@
#include <folly/Utility.h>
#include <folly/container/Foreach.h>
#include <folly/functional/ApplyTuple.h>
#include <glog/logging.h>
#include <array>
......
......@@ -15,6 +15,7 @@
*/
#include <folly/TimeoutQueue.h>
#include <algorithm>
#include <limits>
#include <vector>
......
......@@ -16,6 +16,11 @@
#pragma once
#include <exception>
#include <stdexcept>
#include <type_traits>
#include <utility>
#include <folly/ExceptionWrapper.h>
#include <folly/Likely.h>
#include <folly/Memory.h>
......@@ -24,10 +29,6 @@
#include <folly/Utility.h>
#include <folly/functional/Invoke.h>
#include <folly/lang/Exception.h>
#include <exception>
#include <stdexcept>
#include <type_traits>
#include <utility>
namespace folly {
......
......@@ -49,6 +49,9 @@
#include <bzlib.h>
#endif
#include <algorithm>
#include <unordered_set>
#include <folly/Conv.h>
#include <folly/Memory.h>
#include <folly/Portability.h>
......@@ -59,8 +62,6 @@
#include <folly/io/Cursor.h>
#include <folly/lang/Bits.h>
#include <folly/stop_watch.h>
#include <algorithm>
#include <unordered_set>
using folly::io::compression::detail::dataStartsWithLE;
using folly::io::compression::detail::prefixToStringLE;
......
......@@ -16,12 +16,13 @@
#pragma once
#include <atomic>
#include <thread>
#include <folly/PackedSyncPtr.h>
#include <folly/concurrency/detail/AtomicSharedPtr-detail.h>
#include <folly/synchronization/AtomicStruct.h>
#include <folly/synchronization/detail/AtomicUtils.h>
#include <atomic>
#include <thread>
/*
* This is an implementation of the std::atomic_shared_ptr TS
......
......@@ -16,11 +16,12 @@
#pragma once
#include <atomic>
#include <mutex>
#include <folly/Optional.h>
#include <folly/concurrency/detail/ConcurrentHashMap-detail.h>
#include <folly/synchronization/Hazptr.h>
#include <atomic>
#include <mutex>
namespace folly {
......
......@@ -16,14 +16,15 @@
#pragma once
#include <algorithm>
#include <atomic>
#include <mutex>
#include <folly/container/HeterogeneousAccess.h>
#include <folly/container/detail/F14Mask.h>
#include <folly/lang/Exception.h>
#include <folly/lang/Launder.h>
#include <folly/synchronization/Hazptr.h>
#include <algorithm>
#include <atomic>
#include <mutex>
#if FOLLY_SSE_PREREQ(4, 2) && !FOLLY_MOBILE
#include <nmmintrin.h>
......
......@@ -16,13 +16,14 @@
#include <folly/concurrency/CacheLocality.h>
#include <memory>
#include <thread>
#include <unordered_map>
#include <folly/portability/GTest.h>
#include <folly/portability/SysResource.h>
#include <glog/logging.h>
#include <memory>
#include <thread>
#include <unordered_map>
using namespace folly;
......
......@@ -15,9 +15,11 @@
*/
#include <folly/container/Array.h>
#include <folly/portability/GTest.h>
#include <string>
#include <folly/portability/GTest.h>
using namespace std;
using folly::make_array;
......
......@@ -16,11 +16,12 @@
#include <folly/experimental/JemallocHugePageAllocator.h>
#include <sstream>
#include <folly/portability/Malloc.h>
#include <folly/portability/String.h>
#include <glog/logging.h>
#include <sstream>
#include <glog/logging.h>
#if (defined(MADV_HUGEPAGE) || defined(MAP_ALIGNED_SUPER)) && \
defined(FOLLY_USE_JEMALLOC) && !FOLLY_SANITIZE
......
......@@ -19,6 +19,7 @@
#include <folly/Conv.h>
#include <folly/String.h>
#include <folly/memory/Malloc.h>
#include <glog/logging.h>
namespace folly {
......
......@@ -22,6 +22,7 @@
#include <folly/experimental/Select64.h>
#include <folly/lang/Bits.h>
#include <folly/lang/SafeAssert.h>
#include <glog/logging.h>
#if FOLLY_QUOTIENT_MULTI_SET_SUPPORTED
......
......@@ -16,10 +16,11 @@
#pragma once
#include <atomic>
#include <folly/lang/Bits.h>
#include <glog/logging.h>
#include <atomic>
#include <glog/logging.h>
namespace folly {
......
......@@ -16,11 +16,12 @@
#include <folly/experimental/ThreadWheelTimekeeperHighRes.h>
#include <future>
#include <folly/Chrono.h>
#include <folly/Singleton.h>
#include <folly/futures/Future.h>
#include <folly/futures/WTCallback.h>
#include <future>
namespace folly {
......
......@@ -16,11 +16,12 @@
#pragma once
#include <thread>
#include <folly/experimental/STTimerFDTimeoutManager.h>
#include <folly/futures/Future.h>
#include <folly/io/async/EventBase.h>
#include <folly/io/async/HHWheelTimer.h>
#include <thread>
namespace folly {
......
......@@ -16,9 +16,11 @@
#include <folly/experimental/ThreadedRepeatingFunctionRunner.h>
#include <iostream>
#include <folly/system/ThreadName.h>
#include <glog/logging.h>
#include <iostream>
namespace folly {
......
......@@ -16,11 +16,12 @@
#pragma once
#include <folly/Function.h>
#include <condition_variable>
#include <thread>
#include <vector>
#include <folly/Function.h>
namespace folly {
/**
......
......@@ -15,8 +15,10 @@
*/
#include <folly/experimental/TimerFD.h>
#ifdef FOLLY_HAVE_TIMERFD
#include <folly/FileUtil.h>
#ifdef FOLLY_HAVE_TIMERFD
#include <sys/timerfd.h>
#endif
......
......@@ -15,9 +15,11 @@
*/
#pragma once
#include <map>
#include <folly/experimental/TimerFD.h>
#include <folly/io/async/DelayedDestruction.h>
#include <map>
namespace folly {
// generic TimerFD based timeout manager
......
......@@ -15,12 +15,14 @@
*/
#pragma once
#include <unordered_map>
#include <folly/CPortability.h>
#include <folly/Optional.h>
#include <folly/dynamic.h>
#include <folly/io/IOBuf.h>
#include <folly/io/IOBufQueue.h>
#include <unordered_map>
/* This is an implementation of the BSER binary serialization scheme.
* BSER was created as a binary, local-system-only representation of
......
......@@ -14,6 +14,9 @@
* limitations under the License.
*/
#include <exception>
#include <memory>
#include <folly/CancellationToken.h>
#include <folly/Executor.h>
#include <folly/ScopeGuard.h>
......@@ -27,8 +30,6 @@
#include <folly/experimental/coro/detail/BarrierTask.h>
#include <folly/experimental/coro/detail/CurrentAsyncFrame.h>
#include <folly/experimental/coro/detail/Helpers.h>
#include <exception>
#include <memory>
#if FOLLY_HAS_COROUTINES
......
......@@ -16,10 +16,11 @@
#include <folly/Portability.h>
#include <algorithm>
#include <folly/ScopeGuard.h>
#include <folly/experimental/coro/Generator.h>
#include <folly/portability/GTest.h>
#include <algorithm>
#if FOLLY_HAS_COROUTINES
......
......@@ -19,6 +19,7 @@
#include <vector>
#include <folly/Portability.h>
#include <gtest/gtest-death-test.h>
#include <folly/experimental/coro/GmockHelpers.h>
......
......@@ -16,9 +16,10 @@
#include <folly/Portability.h>
#include <type_traits>
#include <folly/experimental/coro/Coroutine.h>
#include <folly/experimental/coro/Traits.h>
#include <type_traits>
#if FOLLY_HAS_COROUTINES
......
......@@ -14,12 +14,13 @@
* limitations under the License.
*/
#include <folly/lang/Bits.h>
#include <sodium.h>
#include <cstring>
#include <stdexcept>
#include <sodium.h>
#include <folly/experimental/crypto/detail/LtHashInternal.h>
#include <folly/lang/Bits.h>
namespace folly {
namespace crypto {
......
......@@ -16,15 +16,16 @@
#include <folly/experimental/crypto/Blake2xb.h>
#include <folly/String.h>
#include <folly/io/IOBuf.h>
#include <folly/portability/GTest.h>
#include <sodium.h>
#include <memory>
#include <string>
#include <vector>
#include <sodium.h>
#include <folly/String.h>
#include <folly/io/IOBuf.h>
#include <folly/portability/GTest.h>
// Note: the test vectors in this file were generated from
// https://github.com/BLAKE2/BLAKE2/blob/master/testvectors/blake2-kat.h
// using a script.
......
......@@ -14,13 +14,15 @@
* limitations under the License.
*/
#include <sodium.h>
#include <folly/Benchmark.h>
#include <folly/Random.h>
#include <folly/experimental/crypto/LtHash.h>
#include <folly/init/Init.h>
#include <folly/io/IOBuf.h>
#include <glog/logging.h>
#include <sodium.h>
using namespace ::folly::crypto;
......
......@@ -16,17 +16,19 @@
#include <folly/experimental/crypto/LtHash.h>
#include <folly/Random.h>
#include <folly/String.h>
#include <folly/io/IOBuf.h>
#include <folly/portability/GTest.h>
#include <sodium.h>
#include <algorithm>
#include <memory>
#include <random>
#include <string>
#include <vector>
#include <sodium.h>
#include <folly/Random.h>
#include <folly/String.h>
#include <folly/io/IOBuf.h>
#include <folly/portability/GTest.h>
using namespace ::testing;
using namespace folly::crypto;
......
......@@ -16,8 +16,8 @@
#include <folly/Benchmark.h>
#include <folly/experimental/flat_combining/test/FlatCombiningTestHelpers.h>
#include <folly/portability/GTest.h>
#include <glog/logging.h>
using namespace folly::test;
......
......@@ -16,10 +16,11 @@
#include <folly/experimental/flat_combining/test/FlatCombiningTestHelpers.h>
#include <mutex>
#include <folly/portability/GTest.h>
#include <glog/logging.h>
#include <mutex>
#include <glog/logging.h>
using namespace folly::test;
......
......@@ -18,13 +18,14 @@
#include <folly/experimental/flat_combining/test/FlatCombiningExamples.h>
#include <folly/Benchmark.h>
#include <glog/logging.h>
#include <atomic>
#include <chrono>
#include <thread>
#include <folly/Benchmark.h>
#include <glog/logging.h>
namespace folly {
namespace test {
......
......@@ -16,13 +16,14 @@
#pragma once
#include <queue>
#include <folly/Synchronized.h>
#include <folly/executors/GlobalExecutor.h>
#include <folly/experimental/coro/Task.h>
#include <folly/experimental/io/AsyncBase.h>
#include <folly/io/async/EventHandler.h>
#include <folly/io/async/ScopedEventBaseThread.h>
#include <queue>
namespace folly {
......
......@@ -16,9 +16,10 @@
#include <folly/experimental/io/test/IoTestTempFileUtil.h>
#include <random>
#include <folly/FileUtil.h>
#include <folly/String.h>
#include <random>
namespace folly {
namespace test {
......
......@@ -16,18 +16,18 @@
#include <folly/experimental/io/SimpleAsyncIO.h>
#include <bitset>
#include <folly/File.h>
#include <folly/Random.h>
#include <folly/experimental/coro/BlockingWait.h>
#include <folly/experimental/coro/Collect.h>
#include <folly/io/IOBuf.h>
#include <folly/portability/GTest.h>
#include <folly/synchronization/Baton.h>
#include <glog/logging.h>
#include <folly/Random.h>
#include <folly/io/IOBuf.h>
#include <folly/portability/GTest.h>
#include <bitset>
using namespace folly;
class SimpleAsyncIOTest : public ::testing::TestWithParam<SimpleAsyncIO::Mode> {
......
......@@ -16,10 +16,11 @@
#pragma once
#include <cstdint>
#include <folly/FBString.h>
#include <folly/Range.h>
#include <folly/experimental/symbolizer/SymbolizedFrame.h>
#include <cstdint>
namespace folly {
class IOBuf;
......
......@@ -16,11 +16,12 @@
#include <folly/experimental/symbolizer/Elf.h>
#include <sys/auxv.h>
#include <folly/FileUtil.h>
#include <folly/experimental/TestUtil.h>
#include <folly/experimental/symbolizer/detail/Debug.h>
#include <folly/portability/GTest.h>
#include <sys/auxv.h>
using folly::symbolizer::ElfFile;
......
......@@ -17,6 +17,7 @@
#include <folly/experimental/test/CodingTestUtils.h>
#include <folly/portability/GFlags.h>
#include <glog/logging.h>
DEFINE_string(
......
......@@ -16,7 +16,12 @@
#include <folly/experimental/EnvUtil.h>
#include <spawn.h>
#include <system_error>
#include <boost/algorithm/string.hpp>
#include <folly/Memory.h>
#include <folly/Subprocess.h>
#include <folly/container/Array.h>
......@@ -24,9 +29,8 @@
#include <folly/portability/GFlags.h>
#include <folly/portability/GTest.h>
#include <folly/portability/Stdlib.h>
#include <glog/logging.h>
#include <spawn.h>
#include <system_error>
using namespace folly;
using folly::experimental::EnvironmentState;
......
......@@ -16,14 +16,15 @@
#include <folly/experimental/FlatCombiningPriorityQueue.h>
#include <folly/Benchmark.h>
#include <folly/portability/GTest.h>
#include <glog/logging.h>
#include <condition_variable>
#include <mutex>
#include <queue>
#include <folly/Benchmark.h>
#include <folly/portability/GTest.h>
#include <glog/logging.h>
DEFINE_bool(bench, false, "run benchmark");
DEFINE_int32(reps, 10, "number of reps");
DEFINE_int32(ops, 100000, "number of operations per rep");
......
......@@ -19,6 +19,7 @@
#include <folly/Subprocess.h>
#include <folly/experimental/io/FsUtil.h>
#include <folly/portability/GTest.h>
#include <glog/logging.h>
namespace folly {
......
......@@ -20,6 +20,7 @@
#include <folly/Subprocess.h>
#include <folly/experimental/io/FsUtil.h>
#include <folly/portability/GTest.h>
#include <glog/logging.h>
namespace folly {
......
......@@ -17,6 +17,7 @@
#include <thread>
#include <boost/thread.hpp>
#include <folly/Random.h>
#include <folly/SpinLock.h>
#include <folly/experimental/FlatCombiningPriorityQueue.h>
......@@ -24,6 +25,7 @@
#include <folly/portability/GFlags.h>
#include <folly/portability/GTest.h>
#include <folly/test/DeterministicSchedule.h>
#include <glog/logging.h>
using namespace folly;
......
......@@ -16,9 +16,10 @@
#include <folly/experimental/ThreadedRepeatingFunctionRunner.h>
#include <folly/portability/GTest.h>
#include <atomic>
#include <folly/portability/GTest.h>
using namespace std;
struct Foo {
......
......@@ -16,14 +16,15 @@
#pragma once
#include <folly/Function.h>
#include <folly/futures/Future.h>
#include <folly/futures/Promise.h>
#include <exception>
#include <memory>
#include <stdexcept>
#include <vector>
#include <folly/Function.h>
#include <folly/futures/Future.h>
#include <folly/futures/Promise.h>
namespace folly {
namespace fibers {
......
......@@ -16,12 +16,13 @@
#pragma once
#include <atomic>
#include <memory>
#include <folly/CancellationToken.h>
#include <folly/fibers/ExecutorBasedLoopController.h>
#include <folly/fibers/FiberManagerInternal.h>
#include <folly/io/async/VirtualEventBase.h>
#include <atomic>
#include <memory>
namespace folly {
namespace fibers {
......
......@@ -16,11 +16,12 @@
#include <folly/fibers/Fiber.h>
#include <glog/logging.h>
#include <algorithm>
#include <cstring>
#include <stdexcept>
#include <glog/logging.h>
#include <folly/Likely.h>
#include <folly/Portability.h>
#include <folly/fibers/FiberManagerInternal.h>
......
......@@ -16,9 +16,10 @@
#include <folly/fibers/detail/AtomicBatchDispatcher.h>
#include <fmt/core.h>
#include <cassert>
#include <fmt/core.h>
namespace folly {
namespace fibers {
namespace detail {
......
......@@ -19,12 +19,12 @@
#include <limits.h>
#include <stddef.h>
#include <folly/ExceptionWrapper.h>
#include <chrono>
#include <exception>
#include <memory>
#include <vector>
#include <folly/ExceptionWrapper.h>
#include <folly/SocketAddress.h>
#include <folly/String.h>
#include <folly/experimental/observer/Observer.h>
......
......@@ -16,12 +16,13 @@
#pragma once
#include <optional>
#include <folly/ExceptionWrapper.h>
#include <folly/Expected.h>
#include <folly/SocketAddress.h>
#include <folly/io/async/AsyncServerSocket.h>
#include <folly/io/coro/Socket.h>
#include <optional>
#if FOLLY_HAS_COROUTINES
......
......@@ -16,9 +16,10 @@
#include <folly/Portability.h>
#include <functional>
#include <folly/experimental/coro/Baton.h>
#include <folly/io/coro/Socket.h>
#include <functional>
#if FOLLY_HAS_COROUTINES
......
......@@ -14,7 +14,6 @@
* limitations under the License.
*/
#include <folly/test/TestUtils.h>
#include <queue>
#include <vector>
......@@ -28,6 +27,7 @@
#include <folly/logging/StandardLogHandlerFactory.h>
#include <folly/logging/xlog.h>
#include <folly/portability/GMock.h>
#include <folly/test/TestUtils.h>
namespace folly {
......
......@@ -14,7 +14,6 @@
* limitations under the License.
*/
#include <folly/test/TestUtils.h>
#include <queue>
#include <folly/logging/Init.h>
......@@ -25,6 +24,7 @@
#include <folly/logging/StandardLogHandler.h>
#include <folly/logging/StandardLogHandlerFactory.h>
#include <folly/logging/xlog.h>
#include <folly/test/TestUtils.h>
namespace folly {
......
......@@ -16,6 +16,9 @@
#include <folly/logging/xlog.h>
#include <chrono>
#include <thread>
#include <folly/logging/LogConfigParser.h>
#include <folly/logging/LogHandler.h>
#include <folly/logging/LogMessage.h>
......@@ -27,8 +30,6 @@
#include <folly/portability/GMock.h>
#include <folly/portability/GTest.h>
#include <folly/test/TestUtils.h>
#include <chrono>
#include <thread>
using namespace folly;
using std::make_shared;
......
......@@ -14,10 +14,11 @@
* limitations under the License.
*/
#include <iostream>
#include <folly/init/Init.h>
#include <folly/logging/xlog.h>
#include <folly/portability/Stdlib.h>
#include <iostream>
DEFINE_string(
category,
......
......@@ -16,6 +16,8 @@
#pragma once
#include <cstdlib>
#include <folly/Likely.h>
#include <folly/Portability.h>
#include <folly/Range.h>
......@@ -24,7 +26,6 @@
#include <folly/logging/LoggerDB.h>
#include <folly/logging/ObjectToString.h>
#include <folly/logging/RateLimiter.h>
#include <cstdlib>
/*
* This file contains the XLOG() and XLOGF() macros.
......
......@@ -23,6 +23,7 @@
#include <folly/Memory.h>
#include <folly/Random.h>
#include <folly/portability/GTest.h>
#include <glog/logging.h>
void describePlatform() {
......
......@@ -16,9 +16,10 @@
#pragma once
#include <folly/net/NetOps.h>
#include <memory>
#include <folly/net/NetOps.h>
namespace folly {
namespace netops {
......
......@@ -18,7 +18,9 @@
#if defined(_WIN32) && !defined(__MINGW32__) && !defined(__clang__)
#include <assert.h>
#include <folly/Portability.h>
#include <intrin.h>
#include <stdint.h>
......
......@@ -16,11 +16,13 @@
#include <folly/python/error.h>
#include <stdexcept>
#include <string>
#include <Python.h>
#include <folly/Conv.h>
#include <folly/ScopeGuard.h>
#include <stdexcept>
#include <string>
namespace folly {
namespace python {
......
......@@ -16,10 +16,12 @@
#include <folly/python/error.h>
#include <string>
#include <Python.h>
#include <folly/ScopeGuard.h>
#include <folly/portability/GTest.h>
#include <string>
namespace folly {
namespace python {
......
......@@ -15,9 +15,11 @@
*/
#pragma once
#include <cstdint>
#include <folly/futures/Future.h>
#include <folly/futures/Promise.h>
#include <cstdint>
namespace folly {
namespace python {
......
......@@ -15,9 +15,11 @@
*/
#pragma once
#include <folly/experimental/coro/Task.h>
#include <cstdint>
#include <folly/experimental/coro/Task.h>
namespace folly {
namespace python {
namespace test {
......
......@@ -20,6 +20,7 @@
#include <folly/portability/OpenSSL.h>
#include <folly/ssl/detail/OpenSSLThreading.h>
#include <glog/logging.h>
namespace folly {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment