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

Fix include order and grouping in folly - 2/13

Summary: All changes were automated

Reviewed By: Orvid

Differential Revision: D25507505

fbshipit-source-id: 4a1ae7578876975e20fd8eba194b9f8ed43d3530
parent 483f9bc6
......@@ -14,9 +14,10 @@
* limitations under the License.
*/
#include <folly/container/EvictingCacheMap.h>
#include <set>
#include <folly/container/EvictingCacheMap.h>
#include <folly/portability/GTest.h>
using namespace folly;
......
......@@ -15,12 +15,15 @@
*/
#include <folly/Portability.h>
// Allow tests for keys that throw in copy/move constructors. This
// warning has to be disabled before the templates are defined in the
// header to have any effect.
FOLLY_GNU_DISABLE_WARNING("-Wdeprecated-declarations")
// clang-format off:
#include <folly/container/F14Set.h>
// clang-format on
#include <chrono>
#include <random>
......
......@@ -14,6 +14,8 @@
* limitations under the License.
*/
#include <folly/container/Iterator.h>
#include <algorithm>
#include <cassert>
#include <cstddef>
......@@ -26,7 +28,6 @@
#include <utility>
#include <vector>
#include <folly/container/Iterator.h>
#include <folly/portability/GTest.h>
namespace {
......
......@@ -18,14 +18,16 @@
* A benchmark comparing SparseByteSet to bitset<256> and bool[256].
*/
#include <folly/Benchmark.h>
#include <folly/Format.h>
#include <folly/container/SparseByteSet.h>
#include <folly/portability/GFlags.h>
#include <bitset>
#include <random>
#include <vector>
#include <folly/Benchmark.h>
#include <folly/Format.h>
#include <folly/portability/GFlags.h>
using namespace std;
using namespace folly;
......
......@@ -15,6 +15,7 @@
*/
#include <folly/detail/AsyncTrace.h>
#include <folly/Portability.h>
namespace folly {
......
......@@ -17,6 +17,7 @@
#pragma once
#include <stddef.h>
#include <cstdint>
namespace folly {
......
......@@ -15,14 +15,15 @@
*/
#include <folly/detail/Futex.h>
#include <folly/ScopeGuard.h>
#include <folly/hash/Hash.h>
#include <folly/portability/SysSyscall.h>
#include <array>
#include <cerrno>
#include <cstdint>
#include <cstring>
#include <folly/ScopeGuard.h>
#include <folly/hash/Hash.h>
#include <folly/portability/SysSyscall.h>
#include <folly/synchronization/ParkingLot.h>
#ifdef __linux__
......
......@@ -16,14 +16,16 @@
#pragma once
#include <glog/logging.h>
#include <sys/types.h>
#include <algorithm>
#include <array>
#include <cstring>
#include <string>
#include <type_traits>
#include <glog/logging.h>
#include <folly/Format.h>
#include <folly/detail/IPAddress.h>
......
......@@ -16,6 +16,11 @@
#include <folly/detail/MemoryIdler.h>
#include <climits>
#include <cstdio>
#include <cstring>
#include <utility>
#include <folly/GLog.h>
#include <folly/Portability.h>
#include <folly/ScopeGuard.h>
......@@ -27,11 +32,6 @@
#include <folly/portability/Unistd.h>
#include <folly/synchronization/CallOnce.h>
#include <climits>
#include <cstdio>
#include <cstring>
#include <utility>
namespace folly {
namespace detail {
......
......@@ -23,6 +23,7 @@
#include <typeinfo>
#include <utility>
#include <folly/PolyException.h>
#include <folly/Portability.h>
#include <folly/Traits.h>
#include <folly/Utility.h>
......@@ -31,8 +32,6 @@
#include <folly/lang/Exception.h>
#include <folly/lang/StaticConst.h>
#include <folly/PolyException.h>
#if defined(__cpp_template_auto) || \
defined(__cpp_nontype_template_parameter_auto)
#define FOLLY_POLY_NTTP_AUTO 1
......
......@@ -36,14 +36,14 @@ size_t qfind_first_byte_of_sse42(
} // namespace detail
} // namespace folly
#else
#include <cstdint>
#include <limits>
#include <string>
#include <emmintrin.h>
#include <nmmintrin.h>
#include <smmintrin.h>
#include <cstdint>
#include <limits>
#include <string>
#include <folly/Likely.h>
#include <folly/detail/Sse.h>
......
......@@ -16,11 +16,11 @@
#include <folly/detail/SocketFastOpen.h>
#include <folly/portability/Sockets.h>
#include <cerrno>
#include <cstdio>
#include <folly/portability/Sockets.h>
namespace folly {
namespace detail {
......
......@@ -15,11 +15,12 @@
*/
#include <folly/detail/ThreadLocalDetail.h>
#include <folly/synchronization/CallOnce.h>
#include <list>
#include <mutex>
#include <folly/synchronization/CallOnce.h>
constexpr auto kSmallGrowthFactor = 1.1;
constexpr auto kBigGrowthFactor = 1.7;
......
......@@ -34,14 +34,13 @@
#include <folly/SharedMutex.h>
#include <folly/container/Foreach.h>
#include <folly/detail/AtFork.h>
#include <folly/detail/StaticSingletonManager.h>
#include <folly/lang/Exception.h>
#include <folly/memory/Malloc.h>
#include <folly/portability/PThread.h>
#include <folly/synchronization/MicroSpinLock.h>
#include <folly/system/ThreadId.h>
#include <folly/detail/StaticSingletonManager.h>
// In general, emutls cleanup is not guaranteed to play nice with the way
// StaticMeta mixes direct pthread calls and the use of __thread. This has
// caused problems on multiple platforms so don't use __thread there.
......
......@@ -19,14 +19,14 @@
#include <algorithm>
#include <limits>
#include <glog/logging.h>
#include <folly/Portability.h>
#include <folly/chrono/Hardware.h>
#include <folly/detail/Futex.h>
#include <folly/portability/Asm.h>
#include <folly/portability/Unistd.h>
#include <glog/logging.h>
namespace folly {
namespace detail {
......
......@@ -15,6 +15,7 @@
*/
#include <folly/detail/AsyncTrace.h>
#include <folly/portability/GTest.h>
TEST(FollyCountersTest, Trivial) {
......
......@@ -17,6 +17,7 @@
#pragma once
#include <limits.h>
#include <array>
#include <folly/concurrency/QueueObserver.h>
......
......@@ -16,10 +16,11 @@
#include <folly/executors/Codel.h>
#include <folly/portability/GFlags.h>
#include <algorithm>
#include <stdexcept>
#include <folly/portability/GFlags.h>
DEFINE_int32(codel_interval, 100, "Codel default interval time in ms");
DEFINE_int32(codel_target_delay, 5, "Target codel queueing delay in ms");
......
......@@ -14,6 +14,8 @@
* limitations under the License.
*/
#include <folly/executors/EDFThreadPoolExecutor.h>
#include <algorithm>
#include <array>
#include <atomic>
......@@ -27,7 +29,6 @@
#include <vector>
#include <folly/ScopeGuard.h>
#include <folly/executors/EDFThreadPoolExecutor.h>
namespace folly {
namespace {
......
......@@ -16,9 +16,10 @@
#pragma once
#include <folly/Executor.h>
#include <atomic>
#include <folly/Executor.h>
namespace folly {
class ExecutorWithPriority {
public:
......
......@@ -14,6 +14,8 @@
* limitations under the License.
*/
#include <folly/executors/GlobalExecutor.h>
#include <memory>
#include <thread>
......@@ -22,7 +24,6 @@
#include <folly/Singleton.h>
#include <folly/detail/AsyncTrace.h>
#include <folly/executors/CPUThreadPoolExecutor.h>
#include <folly/executors/GlobalExecutor.h>
#include <folly/executors/IOExecutor.h>
#include <folly/executors/IOThreadPoolExecutor.h>
#include <folly/system/HardwareConcurrency.h>
......
......@@ -16,11 +16,11 @@
#include <folly/executors/StrandExecutor.h>
#include <glog/logging.h>
#include <folly/ExceptionString.h>
#include <folly/executors/GlobalExecutor.h>
#include <glog/logging.h>
namespace folly {
// Callable that will process a batch of tasks scheduled
......
......@@ -16,13 +16,13 @@
#pragma once
#include <atomic>
#include <memory>
#include <folly/Optional.h>
#include <folly/concurrency/UnboundedQueue.h>
#include <folly/executors/SequencedExecutor.h>
#include <atomic>
#include <memory>
namespace folly {
class StrandExecutor;
......
......@@ -20,6 +20,8 @@
#include <mutex>
#include <queue>
#include <glog/logging.h>
#include <folly/DefaultKeepAliveExecutor.h>
#include <folly/Memory.h>
#include <folly/SharedMutex.h>
......@@ -31,8 +33,6 @@
#include <folly/synchronization/AtomicStruct.h>
#include <folly/synchronization/Baton.h>
#include <glog/logging.h>
namespace folly {
/* Base class for implementing threadpool based executors.
......
......@@ -15,6 +15,7 @@
*/
#include <folly/executors/TimekeeperScheduledExecutor.h>
#include <folly/futures/Future.h>
namespace folly {
......
......@@ -16,9 +16,10 @@
#pragma once
#include <glog/logging.h>
#include <atomic>
#include <glog/logging.h>
#include <folly/executors/ScheduledExecutor.h>
#include <folly/futures/Future.h>
......
......@@ -16,12 +16,13 @@
#pragma once
#include <glog/logging.h>
#include <folly/Executor.h>
#include <folly/MPMCQueue.h>
#include <folly/Range.h>
#include <folly/executors/task_queue/BlockingQueue.h>
#include <folly/synchronization/LifoSem.h>
#include <glog/logging.h>
namespace folly {
......
......@@ -14,11 +14,12 @@
* limitations under the License.
*/
#include <folly/executors/task_queue/PriorityLifoSemMPMCQueue.h>
#include <vector>
#include <folly/Range.h>
#include <folly/container/Enumerate.h>
#include <folly/executors/task_queue/PriorityLifoSemMPMCQueue.h>
#include <folly/portability/GTest.h>
using namespace folly;
......
......@@ -14,10 +14,11 @@
* limitations under the License.
*/
#include <folly/executors/task_queue/PriorityUnboundedBlockingQueue.h>
#include <vector>
#include <folly/container/Enumerate.h>
#include <folly/executors/task_queue/PriorityUnboundedBlockingQueue.h>
#include <folly/portability/GTest.h>
#include <folly/synchronization/Baton.h>
......
......@@ -15,9 +15,11 @@
*/
#include <folly/executors/task_queue/UnboundedBlockingQueue.h>
#include <thread>
#include <folly/portability/GTest.h>
#include <folly/synchronization/Baton.h>
#include <thread>
using namespace folly;
......
......@@ -15,11 +15,12 @@
*/
#include <folly/executors/Async.h>
#include <folly/executors/ManualExecutor.h>
#include <folly/portability/GTest.h>
#include <memory>
#include <folly/executors/ManualExecutor.h>
#include <folly/portability/GTest.h>
using namespace folly;
TEST(AsyncFunc, manual_executor) {
......
......@@ -15,10 +15,12 @@
*/
#include <folly/executors/Codel.h>
#include <folly/portability/GTest.h>
#include <chrono>
#include <thread>
#include <folly/portability/GTest.h>
using std::chrono::milliseconds;
using std::this_thread::sleep_for;
......
......@@ -15,6 +15,7 @@
*/
#include <folly/executors/ExecutorWithPriority.h>
#include <folly/executors/CPUThreadPoolExecutor.h>
#include <folly/futures/Future.h>
#include <folly/portability/GTest.h>
......
......@@ -14,11 +14,11 @@
* limitations under the License.
*/
#include <folly/executors/FiberIOExecutor.h>
#include <memory>
#include <folly/executors/FiberIOExecutor.h>
#include <folly/executors/IOThreadPoolExecutor.h>
#include <folly/portability/GTest.h>
namespace {
......
......@@ -15,6 +15,7 @@
*/
#include <folly/executors/GlobalExecutor.h>
#include <folly/executors/CPUThreadPoolExecutor.h>
#include <folly/executors/IOExecutor.h>
#include <folly/portability/GTest.h>
......
......@@ -19,7 +19,6 @@
#include <folly/executors/CPUThreadPoolExecutor.h>
#include <folly/executors/SerialExecutor.h>
#include <folly/io/async/ScopedEventBaseThread.h>
#include <folly/portability/GTest.h>
namespace folly {
......
......@@ -14,12 +14,13 @@
* limitations under the License.
*/
#include <folly/executors/SerialExecutor.h>
#include <chrono>
#include <folly/ScopeGuard.h>
#include <folly/executors/CPUThreadPoolExecutor.h>
#include <folly/executors/InlineExecutor.h>
#include <folly/executors/SerialExecutor.h>
#include <folly/io/async/Request.h>
#include <folly/portability/GTest.h>
#include <folly/synchronization/Baton.h>
......
......@@ -16,18 +16,17 @@
#include <folly/executors/StrandExecutor.h>
#include <folly/CancellationToken.h>
#include <folly/executors/GlobalExecutor.h>
#include <folly/executors/ManualExecutor.h>
#include <folly/synchronization/Baton.h>
#include <atomic>
#include <chrono>
#include <stdexcept>
#include <thread>
#include <vector>
#include <folly/CancellationToken.h>
#include <folly/executors/GlobalExecutor.h>
#include <folly/executors/ManualExecutor.h>
#include <folly/portability/GTest.h>
#include <folly/synchronization/Baton.h>
using namespace folly;
using namespace std::chrono_literals;
......
......@@ -14,6 +14,8 @@
* limitations under the License.
*/
#include <folly/executors/ThreadPoolExecutor.h>
#include <atomic>
#include <memory>
#include <thread>
......@@ -26,7 +28,6 @@
#include <folly/executors/EDFThreadPoolExecutor.h>
#include <folly/executors/FutureExecutor.h>
#include <folly/executors/IOThreadPoolExecutor.h>
#include <folly/executors/ThreadPoolExecutor.h>
#include <folly/executors/task_queue/LifoSemMPMCQueue.h>
#include <folly/executors/task_queue/UnboundedBlockingQueue.h>
#include <folly/executors/thread_factory/InitThreadFactory.h>
......
......@@ -14,13 +14,14 @@
* limitations under the License.
*/
#include <folly/executors/TimekeeperScheduledExecutor.h>
#include <atomic>
#include <chrono>
#include <folly/executors/InlineExecutor.h>
#include <folly/executors/SerialExecutor.h>
#include <folly/executors/ThreadedExecutor.h>
#include <folly/executors/TimekeeperScheduledExecutor.h>
#include <folly/futures/ManualTimekeeper.h>
#include <folly/portability/GTest.h>
#include <folly/synchronization/Baton.h>
......
......@@ -16,11 +16,10 @@
#pragma once
#include <folly/executors/thread_factory/ThreadFactory.h>
#include <glog/logging.h>
#include <folly/String.h>
#include <folly/executors/thread_factory/ThreadFactory.h>
#include <folly/portability/SysResource.h>
#include <folly/portability/SysTime.h>
......
......@@ -15,10 +15,10 @@
*/
#pragma once
#include <folly/Executor.h>
#include <thread>
#include <folly/Executor.h>
namespace folly {
class ThreadFactory {
......
......@@ -20,11 +20,12 @@
#include <string>
#include <type_traits>
#include <glog/logging.h>
#include <folly/Conv.h>
#include <folly/Format.h>
#include <folly/Optional.h>
#include <folly/String.h>
#include <glog/logging.h>
namespace folly {
......
......@@ -20,6 +20,8 @@
#include <limits>
#include <type_traits>
#include <glog/logging.h>
#include <folly/Likely.h>
#include <folly/Portability.h>
#include <folly/Range.h>
......@@ -28,7 +30,6 @@
#include <folly/experimental/Instructions.h>
#include <folly/experimental/Select64.h>
#include <folly/lang/Bits.h>
#include <glog/logging.h>
#if !FOLLY_X64
#error BitVectorCoding.h requires x86_64
......
......@@ -19,10 +19,10 @@
#include <memory>
#include <mutex>
#include <folly/futures/Future.h>
#include <glog/logging.h>
#include <folly/futures/Future.h>
namespace folly {
// Structured Async Cleanup
......
......@@ -28,6 +28,8 @@
#include <limits>
#include <type_traits>
#include <glog/logging.h>
#include <folly/Likely.h>
#include <folly/Portability.h>
#include <folly/Range.h>
......@@ -36,7 +38,6 @@
#include <folly/experimental/Select64.h>
#include <folly/lang/Assume.h>
#include <folly/lang/Bits.h>
#include <glog/logging.h>
#if !FOLLY_X64
#error EliasFanoCoding.h requires x86_64
......
......@@ -22,10 +22,11 @@
#include <mutex>
#include <queue>
#include <glog/logging.h>
#include <folly/Optional.h>
#include <folly/detail/Futex.h>
#include <folly/experimental/flat_combining/FlatCombining.h>
#include <glog/logging.h>
namespace folly {
......
......@@ -16,9 +16,6 @@
#pragma once
#include <folly/Function.h>
#include <folly/Range.h>
#include <folly/hash/Hash.h>
#include <chrono>
#include <condition_variable>
#include <mutex>
......@@ -26,6 +23,10 @@
#include <unordered_map>
#include <vector>
#include <folly/Function.h>
#include <folly/Range.h>
#include <folly/hash/Hash.h>
namespace folly {
/**
......
......@@ -14,12 +14,13 @@
* limitations under the License.
*/
#include <folly/experimental/JSONSchema.h>
#include <folly/json.h>
#include <fstream>
#include <sstream>
#include <string>
#include <folly/experimental/JSONSchema.h>
#include <folly/json.h>
/**
* A binary that supports testing against the official tests from:
* https://github.com/json-schema/JSON-Schema-Test-Suite
......
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