Sort the remaining #include lines in include/... and lib/....

I did this a long time ago with a janky python script, but now
clang-format has built-in support for this. I fed clang-format every
line with a #include and let it re-sort things according to the precise
LLVM rules for include ordering baked into clang-format these days.

I've reverted a number of files where the results of sorting includes
isn't healthy. Either places where we have legacy code relying on
particular include ordering (where possible, I'll fix these separately)
or where we have particular formatting around #include lines that
I didn't want to disturb in this patch.

This patch is *entirely* mechanical. If you get merge conflicts or
anything, just ignore the changes in this patch and run clang-format
over your #include lines in the files.

Sorry for any noise here, but it is important to keep these things
stable. I was seeing an increasing number of patches with irrelevant
re-ordering of #include lines because clang-format was used. This patch
at least isolates that churn, makes it easy to skip when resolving
conflicts, and gets us to a clean baseline (again).

git-svn-id: svn://svn.chromium.org/llvm-project/llvm/trunk/lib/Fuzzer@304787 0b72dbe1-c17f-4bc7-b9db-2b4152be0356
diff --git a/FuzzerDriver.cpp b/FuzzerDriver.cpp
index f9f8a80..9aad377 100644
--- a/FuzzerDriver.cpp
+++ b/FuzzerDriver.cpp
@@ -10,9 +10,9 @@
 //===----------------------------------------------------------------------===//
 
 #include "FuzzerCorpus.h"
+#include "FuzzerIO.h"
 #include "FuzzerInterface.h"
 #include "FuzzerInternal.h"
-#include "FuzzerIO.h"
 #include "FuzzerMutate.h"
 #include "FuzzerRandom.h"
 #include "FuzzerShmem.h"
diff --git a/FuzzerExtFunctionsDlsymWin.cpp b/FuzzerExtFunctionsDlsymWin.cpp
index 7752169..f6c7e07 100644
--- a/FuzzerExtFunctionsDlsymWin.cpp
+++ b/FuzzerExtFunctionsDlsymWin.cpp
@@ -13,8 +13,8 @@
 
 #include "FuzzerExtFunctions.h"
 #include "FuzzerIO.h"
-#include "Windows.h"
 #include "Psapi.h"
+#include "Windows.h"
 
 namespace fuzzer {
 
diff --git a/FuzzerLoop.cpp b/FuzzerLoop.cpp
index 14caa20..f608328 100644
--- a/FuzzerLoop.cpp
+++ b/FuzzerLoop.cpp
@@ -10,8 +10,8 @@
 //===----------------------------------------------------------------------===//
 
 #include "FuzzerCorpus.h"
-#include "FuzzerInternal.h"
 #include "FuzzerIO.h"
+#include "FuzzerInternal.h"
 #include "FuzzerMutate.h"
 #include "FuzzerRandom.h"
 #include "FuzzerShmem.h"
diff --git a/FuzzerMerge.cpp b/FuzzerMerge.cpp
index e66460c..612f4bb 100644
--- a/FuzzerMerge.cpp
+++ b/FuzzerMerge.cpp
@@ -9,9 +9,9 @@
 // Merging corpora.
 //===----------------------------------------------------------------------===//
 
-#include "FuzzerInternal.h"
-#include "FuzzerIO.h"
 #include "FuzzerMerge.h"
+#include "FuzzerIO.h"
+#include "FuzzerInternal.h"
 #include "FuzzerTracePC.h"
 #include "FuzzerUtil.h"
 
diff --git a/FuzzerMutate.cpp b/FuzzerMutate.cpp
index e60d413..53cb902 100644
--- a/FuzzerMutate.cpp
+++ b/FuzzerMutate.cpp
@@ -9,11 +9,11 @@
 // Mutate a test input.
 //===----------------------------------------------------------------------===//
 
+#include "FuzzerMutate.h"
 #include "FuzzerCorpus.h"
 #include "FuzzerDefs.h"
 #include "FuzzerExtFunctions.h"
 #include "FuzzerIO.h"
-#include "FuzzerMutate.h"
 #include "FuzzerOptions.h"
 
 namespace fuzzer {
diff --git a/FuzzerShmemPosix.cpp b/FuzzerShmemPosix.cpp
index 2723bdd..50cdcfb 100644
--- a/FuzzerShmemPosix.cpp
+++ b/FuzzerShmemPosix.cpp
@@ -14,14 +14,14 @@
 #include "FuzzerIO.h"
 #include "FuzzerShmem.h"
 
-#include <sys/types.h>
-#include <sys/stat.h>
 #include <errno.h>
 #include <fcntl.h>
-#include <sys/mman.h>
 #include <semaphore.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include <sys/mman.h>
+#include <sys/stat.h>
+#include <sys/types.h>
 #include <unistd.h>
 
 namespace fuzzer {
diff --git a/FuzzerShmemWindows.cpp b/FuzzerShmemWindows.cpp
index 6325b4b..d330ebf 100644
--- a/FuzzerShmemWindows.cpp
+++ b/FuzzerShmemWindows.cpp
@@ -14,10 +14,10 @@
 #include "FuzzerIO.h"
 #include "FuzzerShmem.h"
 
-#include <sys/types.h>
-#include <sys/stat.h>
 #include <fcntl.h>
 #include <stdio.h>
+#include <sys/stat.h>
+#include <sys/types.h>
 
 namespace fuzzer {
 
diff --git a/FuzzerTracePC.cpp b/FuzzerTracePC.cpp
index ce0f7a4..ea93468 100644
--- a/FuzzerTracePC.cpp
+++ b/FuzzerTracePC.cpp
@@ -12,12 +12,12 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "FuzzerTracePC.h"
 #include "FuzzerCorpus.h"
 #include "FuzzerDefs.h"
 #include "FuzzerDictionary.h"
 #include "FuzzerExtFunctions.h"
 #include "FuzzerIO.h"
-#include "FuzzerTracePC.h"
 #include "FuzzerUtil.h"
 #include "FuzzerValueBitMap.h"
 #include <map>
diff --git a/FuzzerTraceState.cpp b/FuzzerTraceState.cpp
index a486223..8670e2a 100644
--- a/FuzzerTraceState.cpp
+++ b/FuzzerTraceState.cpp
@@ -10,8 +10,8 @@
 //===----------------------------------------------------------------------===//
 
 #include "FuzzerDictionary.h"
-#include "FuzzerInternal.h"
 #include "FuzzerIO.h"
+#include "FuzzerInternal.h"
 #include "FuzzerMutate.h"
 #include "FuzzerTracePC.h"
 #include <algorithm>
diff --git a/FuzzerUtilWindows.cpp b/FuzzerUtilWindows.cpp
index 08bb3cf..8d0678d 100644
--- a/FuzzerUtilWindows.cpp
+++ b/FuzzerUtilWindows.cpp
@@ -12,6 +12,7 @@
 #if LIBFUZZER_WINDOWS
 #include "FuzzerIO.h"
 #include "FuzzerInternal.h"
+#include <Psapi.h>
 #include <cassert>
 #include <chrono>
 #include <cstring>
@@ -22,7 +23,6 @@
 #include <stdio.h>
 #include <sys/types.h>
 #include <windows.h>
-#include <Psapi.h>
 
 namespace fuzzer {
 
diff --git a/afl/afl_driver.cpp b/afl/afl_driver.cpp
index 3815ed1..d0521bd 100644
--- a/afl/afl_driver.cpp
+++ b/afl/afl_driver.cpp
@@ -12,8 +12,8 @@
 Usage:
 ################################################################################
 cat << EOF > test_fuzzer.cc
-#include <stdint.h>
 #include <stddef.h>
+#include <stdint.h>
 extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
   if (size > 0 && data[0] == 'H')
     if (size > 1 && data[1] == 'I')
@@ -50,18 +50,18 @@
 
 */
 #include <assert.h>
-#include <stdio.h>
-#include <stdint.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
 #include <errno.h>
 #include <signal.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
 #include <sys/resource.h>
 #include <sys/time.h>
+#include <unistd.h>
 
-#include <iostream>
 #include <fstream>
+#include <iostream>
 #include <vector>
 
 // Platform detection. Copied from FuzzerInternal.h
diff --git a/test/AFLDriverTest.cpp b/test/AFLDriverTest.cpp
index e3f5f71..b949adc 100644
--- a/test/AFLDriverTest.cpp
+++ b/test/AFLDriverTest.cpp
@@ -3,8 +3,8 @@
 
 // Contains dummy functions used to avoid dependency on AFL.
 #include <stdint.h>
-#include <stdlib.h>
 #include <stdio.h>
+#include <stdlib.h>
 
 extern "C" void __afl_manual_init() {}
 
diff --git a/test/AbsNegAndConstant64Test.cpp b/test/AbsNegAndConstant64Test.cpp
index 69b0d59..dfb6007 100644
--- a/test/AbsNegAndConstant64Test.cpp
+++ b/test/AbsNegAndConstant64Test.cpp
@@ -2,11 +2,11 @@
 // License. See LICENSE.TXT for details.
 
 // abs(x) < 0 and y == Const puzzle, 64-bit variant.
-#include <cstring>
-#include <cstdint>
-#include <cstdlib>
 #include <cstddef>
+#include <cstdint>
 #include <cstdio>
+#include <cstdlib>
+#include <cstring>
 
 extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
   if (Size < 16) return 0;
diff --git a/test/AbsNegAndConstantTest.cpp b/test/AbsNegAndConstantTest.cpp
index 69075a4..e9d983f 100644
--- a/test/AbsNegAndConstantTest.cpp
+++ b/test/AbsNegAndConstantTest.cpp
@@ -2,11 +2,11 @@
 // License. See LICENSE.TXT for details.
 
 // abs(x) < 0 and y == Const puzzle.
-#include <cstring>
-#include <cstdint>
-#include <cstdlib>
 #include <cstddef>
+#include <cstdint>
 #include <cstdio>
+#include <cstdlib>
+#include <cstring>
 
 extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
   if (Size < 8) return 0;
diff --git a/test/AccumulateAllocationsTest.cpp b/test/AccumulateAllocationsTest.cpp
index 604d8fa..e9acd7c 100644
--- a/test/AccumulateAllocationsTest.cpp
+++ b/test/AccumulateAllocationsTest.cpp
@@ -2,8 +2,8 @@
 // License. See LICENSE.TXT for details.
 
 // Test with a more mallocs than frees, but no leak.
-#include <cstdint>
 #include <cstddef>
+#include <cstdint>
 
 const int kAllocatedPointersSize = 10000;
 int NumAllocatedPointers = 0;
diff --git a/test/BadStrcmpTest.cpp b/test/BadStrcmpTest.cpp
index 159cd7e..ba2b068 100644
--- a/test/BadStrcmpTest.cpp
+++ b/test/BadStrcmpTest.cpp
@@ -2,9 +2,9 @@
 // License. See LICENSE.TXT for details.
 
 // Test that we don't creash in case of bad strcmp params.
+#include <cstddef>
 #include <cstdint>
 #include <cstring>
-#include <cstddef>
 
 static volatile int Sink;
 
diff --git a/test/BufferOverflowOnInput.cpp b/test/BufferOverflowOnInput.cpp
index b9d1405..75e1fb9 100644
--- a/test/BufferOverflowOnInput.cpp
+++ b/test/BufferOverflowOnInput.cpp
@@ -3,9 +3,9 @@
 
 // Simple test for a fuzzer. The fuzzer must find the string "Hi!".
 #include <assert.h>
+#include <cstddef>
 #include <cstdint>
 #include <cstdlib>
-#include <cstddef>
 #include <iostream>
 
 static volatile bool SeedLargeBuffer;
diff --git a/test/CallerCalleeTest.cpp b/test/CallerCalleeTest.cpp
index 3ec025d..ed9f37c 100644
--- a/test/CallerCalleeTest.cpp
+++ b/test/CallerCalleeTest.cpp
@@ -3,9 +3,9 @@
 
 // Simple test for a fuzzer.
 // Try to find the target using the indirect caller-callee pairs.
+#include <cstddef>
 #include <cstdint>
 #include <cstdlib>
-#include <cstddef>
 #include <cstring>
 #include <iostream>
 
diff --git a/test/CleanseTest.cpp b/test/CleanseTest.cpp
index faea8dc..ee18457 100644
--- a/test/CleanseTest.cpp
+++ b/test/CleanseTest.cpp
@@ -3,9 +3,9 @@
 
 // Test the the fuzzer is able to 'cleanse' the reproducer
 // by replacing all irrelevant bytes with garbage.
+#include <cstddef>
 #include <cstdint>
 #include <cstdlib>
-#include <cstddef>
 
 extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
   if (Size >= 20 && Data[1] == '1' && Data[5] == '5' && Data[10] == 'A' &&
diff --git a/test/CustomMutatorTest.cpp b/test/CustomMutatorTest.cpp
index 4f84519..521d7f5 100644
--- a/test/CustomMutatorTest.cpp
+++ b/test/CustomMutatorTest.cpp
@@ -3,9 +3,9 @@
 
 // Simple test for a cutom mutator.
 #include <assert.h>
+#include <cstddef>
 #include <cstdint>
 #include <cstdlib>
-#include <cstddef>
 #include <iostream>
 
 #include "FuzzerInterface.h"
diff --git a/test/CxxStringEqTest.cpp b/test/CxxStringEqTest.cpp
index e0e23c9..924851c 100644
--- a/test/CxxStringEqTest.cpp
+++ b/test/CxxStringEqTest.cpp
@@ -3,11 +3,11 @@
 
 // Simple test for a fuzzer. Must find a specific string
 // used in std::string operator ==.
+#include <cstddef>
 #include <cstdint>
 #include <cstdlib>
-#include <cstddef>
-#include <string>
 #include <iostream>
+#include <string>
 
 static volatile int Sink;
 
diff --git a/test/DSOTestMain.cpp b/test/DSOTestMain.cpp
index 3e225d8..e0c857d 100644
--- a/test/DSOTestMain.cpp
+++ b/test/DSOTestMain.cpp
@@ -4,9 +4,9 @@
 // Source code for a simple DSO.
 
 #include <cstdint>
+#include <cstdio>
 #include <cstdlib>
 #include <cstring>
-#include <cstdio>
 extern int DSO1(int a);
 extern int DSO2(int a);
 extern int DSOTestExtra(int a);
diff --git a/test/DivTest.cpp b/test/DivTest.cpp
index 63f6960..bce13fe 100644
--- a/test/DivTest.cpp
+++ b/test/DivTest.cpp
@@ -3,9 +3,9 @@
 
 // Simple test for a fuzzer: find the interesting argument for div.
 #include <assert.h>
+#include <cstddef>
 #include <cstdint>
 #include <cstring>
-#include <cstddef>
 #include <iostream>
 
 static volatile int Sink;
diff --git a/test/FourIndependentBranchesTest.cpp b/test/FourIndependentBranchesTest.cpp
index 62b3be7..bbf5ea2 100644
--- a/test/FourIndependentBranchesTest.cpp
+++ b/test/FourIndependentBranchesTest.cpp
@@ -2,9 +2,9 @@
 // License. See LICENSE.TXT for details.
 
 // Simple test for a fuzzer. The fuzzer must find the string "FUZZ".
+#include <cstddef>
 #include <cstdint>
 #include <cstdlib>
-#include <cstddef>
 #include <iostream>
 
 extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
diff --git a/test/FullCoverageSetTest.cpp b/test/FullCoverageSetTest.cpp
index 415e0b4..6d7e48f 100644
--- a/test/FullCoverageSetTest.cpp
+++ b/test/FullCoverageSetTest.cpp
@@ -2,9 +2,9 @@
 // License. See LICENSE.TXT for details.
 
 // Simple test for a fuzzer. The fuzzer must find the string "FUZZER".
+#include <cstddef>
 #include <cstdint>
 #include <cstdlib>
-#include <cstddef>
 #include <iostream>
 
 extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
diff --git a/test/FuzzerUnittest.cpp b/test/FuzzerUnittest.cpp
index 78ea874..c8beb43 100644
--- a/test/FuzzerUnittest.cpp
+++ b/test/FuzzerUnittest.cpp
@@ -6,12 +6,12 @@
 #define _LIBCPP_HAS_NO_ASAN
 
 #include "FuzzerCorpus.h"
-#include "FuzzerInternal.h"
 #include "FuzzerDictionary.h"
+#include "FuzzerInternal.h"
 #include "FuzzerMerge.h"
 #include "FuzzerMutate.h"
-#include "FuzzerTracePC.h"
 #include "FuzzerRandom.h"
+#include "FuzzerTracePC.h"
 #include "gtest/gtest.h"
 #include <memory>
 #include <set>
diff --git a/test/LeakTest.cpp b/test/LeakTest.cpp
index 22e5164..ea89e39 100644
--- a/test/LeakTest.cpp
+++ b/test/LeakTest.cpp
@@ -2,8 +2,8 @@
 // License. See LICENSE.TXT for details.
 
 // Test with a leak.
-#include <cstdint>
 #include <cstddef>
+#include <cstdint>
 
 static volatile void *Sink;
 
diff --git a/test/LeakTimeoutTest.cpp b/test/LeakTimeoutTest.cpp
index 4f31b3e..9252619 100644
--- a/test/LeakTimeoutTest.cpp
+++ b/test/LeakTimeoutTest.cpp
@@ -2,8 +2,8 @@
 // License. See LICENSE.TXT for details.
 
 // Test with a leak.
-#include <cstdint>
 #include <cstddef>
+#include <cstdint>
 
 static volatile int *Sink;
 
diff --git a/test/LoadTest.cpp b/test/LoadTest.cpp
index eef16c7..67a28c7 100644
--- a/test/LoadTest.cpp
+++ b/test/LoadTest.cpp
@@ -3,9 +3,9 @@
 
 // Simple test for a fuzzer: find interesting value of array index.
 #include <assert.h>
+#include <cstddef>
 #include <cstdint>
 #include <cstring>
-#include <cstddef>
 #include <iostream>
 
 static volatile int Sink;
diff --git a/test/Memcmp64BytesTest.cpp b/test/Memcmp64BytesTest.cpp
index e81526b..5b6cb70 100644
--- a/test/Memcmp64BytesTest.cpp
+++ b/test/Memcmp64BytesTest.cpp
@@ -3,10 +3,10 @@
 
 // Simple test for a fuzzer. The fuzzer must find a particular string.
 #include <cassert>
-#include <cstring>
 #include <cstdint>
 #include <cstdio>
 #include <cstdlib>
+#include <cstring>
 
 extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
   const char kString64Bytes[] =
diff --git a/test/MemcmpTest.cpp b/test/MemcmpTest.cpp
index fdbf946..8dbb7d8 100644
--- a/test/MemcmpTest.cpp
+++ b/test/MemcmpTest.cpp
@@ -2,10 +2,10 @@
 // License. See LICENSE.TXT for details.
 
 // Simple test for a fuzzer. The fuzzer must find a particular string.
-#include <cstring>
 #include <cstdint>
 #include <cstdio>
 #include <cstdlib>
+#include <cstring>
 
 extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
   // TODO: check other sizes.
diff --git a/test/NotinstrumentedTest.cpp b/test/NotinstrumentedTest.cpp
index ffe952c..9141899 100644
--- a/test/NotinstrumentedTest.cpp
+++ b/test/NotinstrumentedTest.cpp
@@ -2,8 +2,8 @@
 // License. See LICENSE.TXT for details.
 
 // This test should not be instrumented.
-#include <cstdint>
 #include <cstddef>
+#include <cstdint>
 
 extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
   return 0;
diff --git a/test/NthRunCrashTest.cpp b/test/NthRunCrashTest.cpp
index b43e69e..da5fbd3 100644
--- a/test/NthRunCrashTest.cpp
+++ b/test/NthRunCrashTest.cpp
@@ -2,8 +2,8 @@
 // License. See LICENSE.TXT for details.
 
 // Crash on the N-th execution.
-#include <cstdint>
 #include <cstddef>
+#include <cstdint>
 #include <iostream>
 
 static int Counter;
diff --git a/test/NullDerefOnEmptyTest.cpp b/test/NullDerefOnEmptyTest.cpp
index 1537109..459db51 100644
--- a/test/NullDerefOnEmptyTest.cpp
+++ b/test/NullDerefOnEmptyTest.cpp
@@ -2,9 +2,9 @@
 // License. See LICENSE.TXT for details.
 
 // Simple test for a fuzzer. The fuzzer must find the empty string.
+#include <cstddef>
 #include <cstdint>
 #include <cstdlib>
-#include <cstddef>
 #include <iostream>
 
 static volatile int *Null = 0;
diff --git a/test/NullDerefTest.cpp b/test/NullDerefTest.cpp
index 3f03d24..1b44b68 100644
--- a/test/NullDerefTest.cpp
+++ b/test/NullDerefTest.cpp
@@ -2,9 +2,9 @@
 // License. See LICENSE.TXT for details.
 
 // Simple test for a fuzzer. The fuzzer must find the string "Hi!".
+#include <cstddef>
 #include <cstdint>
 #include <cstdlib>
-#include <cstddef>
 #include <iostream>
 
 static volatile int Sink;
diff --git a/test/OneHugeAllocTest.cpp b/test/OneHugeAllocTest.cpp
index 8d3d1d6..32a5578 100644
--- a/test/OneHugeAllocTest.cpp
+++ b/test/OneHugeAllocTest.cpp
@@ -3,9 +3,9 @@
 
 // Tests OOM handling when there is a single large allocation.
 #include <assert.h>
+#include <cstddef>
 #include <cstdint>
 #include <cstdlib>
-#include <cstddef>
 #include <cstring>
 #include <iostream>
 
diff --git a/test/OutOfMemorySingleLargeMallocTest.cpp b/test/OutOfMemorySingleLargeMallocTest.cpp
index 316b768..a07795a 100644
--- a/test/OutOfMemorySingleLargeMallocTest.cpp
+++ b/test/OutOfMemorySingleLargeMallocTest.cpp
@@ -3,9 +3,9 @@
 
 // Tests OOM handling.
 #include <assert.h>
+#include <cstddef>
 #include <cstdint>
 #include <cstdlib>
-#include <cstddef>
 #include <cstring>
 #include <iostream>
 
diff --git a/test/OutOfMemoryTest.cpp b/test/OutOfMemoryTest.cpp
index 078a39e..5e59bde 100644
--- a/test/OutOfMemoryTest.cpp
+++ b/test/OutOfMemoryTest.cpp
@@ -3,9 +3,9 @@
 
 // Tests OOM handling.
 #include <assert.h>
+#include <cstddef>
 #include <cstdint>
 #include <cstdlib>
-#include <cstddef>
 #include <cstring>
 #include <iostream>
 #include <thread>
diff --git a/test/RepeatedBytesTest.cpp b/test/RepeatedBytesTest.cpp
index 2fa6c78..14222f2 100644
--- a/test/RepeatedBytesTest.cpp
+++ b/test/RepeatedBytesTest.cpp
@@ -3,9 +3,9 @@
 
 // Simple test for a fuzzer. The fuzzer must find repeated bytes.
 #include <assert.h>
+#include <cstddef>
 #include <cstdint>
 #include <cstdlib>
-#include <cstddef>
 #include <iostream>
 
 extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
diff --git a/test/RepeatedMemcmp.cpp b/test/RepeatedMemcmp.cpp
index 7377f65..18369de 100644
--- a/test/RepeatedMemcmp.cpp
+++ b/test/RepeatedMemcmp.cpp
@@ -1,11 +1,10 @@
 // This file is distributed under the University of Illinois Open Source
 // License. See LICENSE.TXT for details.
 
-
-#include <cstring>
 #include <cstdint>
 #include <cstdio>
 #include <cstdlib>
+#include <cstring>
 
 extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
   int Matches1 = 0;
diff --git a/test/ShrinkControlFlowTest.cpp b/test/ShrinkControlFlowTest.cpp
index 0fd7c5e..d095429 100644
--- a/test/ShrinkControlFlowTest.cpp
+++ b/test/ShrinkControlFlowTest.cpp
@@ -2,11 +2,11 @@
 // License. See LICENSE.TXT for details.
 
 // Test that we can find the minimal item in the corpus (3 bytes: "FUZ").
-#include <cstdint>
-#include <cstdlib>
 #include <cstddef>
-#include <cstring>
+#include <cstdint>
 #include <cstdio>
+#include <cstdlib>
+#include <cstring>
 
 static volatile int Sink;
 
diff --git a/test/ShrinkValueProfileTest.cpp b/test/ShrinkValueProfileTest.cpp
index 026b8ce..86e4e3c 100644
--- a/test/ShrinkValueProfileTest.cpp
+++ b/test/ShrinkValueProfileTest.cpp
@@ -2,11 +2,11 @@
 // License. See LICENSE.TXT for details.
 
 // Test that we can find the minimal item in the corpus (3 bytes: "FUZ").
-#include <cstdint>
-#include <cstdlib>
 #include <cstddef>
-#include <cstring>
+#include <cstdint>
 #include <cstdio>
+#include <cstdlib>
+#include <cstring>
 
 static volatile uint32_t Sink;
 
diff --git a/test/SignedIntOverflowTest.cpp b/test/SignedIntOverflowTest.cpp
index 7df32ad..d800602 100644
--- a/test/SignedIntOverflowTest.cpp
+++ b/test/SignedIntOverflowTest.cpp
@@ -3,11 +3,11 @@
 
 // Test for signed-integer-overflow.
 #include <assert.h>
+#include <climits>
+#include <cstddef>
 #include <cstdint>
 #include <cstdlib>
-#include <cstddef>
 #include <iostream>
-#include <climits>
 
 static volatile int Sink;
 static int Large = INT_MAX;
diff --git a/test/SimpleCmpTest.cpp b/test/SimpleCmpTest.cpp
index 12b5cdd..8acad4a 100644
--- a/test/SimpleCmpTest.cpp
+++ b/test/SimpleCmpTest.cpp
@@ -3,9 +3,9 @@
 
 // Simple test for a fuzzer. The fuzzer must find several narrow ranges.
 #include <cstdint>
+#include <cstdio>
 #include <cstdlib>
 #include <cstring>
-#include <cstdio>
 
 extern int AllLines[];
 
diff --git a/test/SimpleDictionaryTest.cpp b/test/SimpleDictionaryTest.cpp
index cd7292b..a1cd200 100644
--- a/test/SimpleDictionaryTest.cpp
+++ b/test/SimpleDictionaryTest.cpp
@@ -5,9 +5,9 @@
 // The fuzzer must find a string based on dictionary words:
 //   "Elvis"
 //   "Presley"
+#include <cstddef>
 #include <cstdint>
 #include <cstdlib>
-#include <cstddef>
 #include <cstring>
 #include <iostream>
 
diff --git a/test/SimpleHashTest.cpp b/test/SimpleHashTest.cpp
index 00599de..99e96cb 100644
--- a/test/SimpleHashTest.cpp
+++ b/test/SimpleHashTest.cpp
@@ -5,9 +5,9 @@
 // and then compares the last 4 bytes with the computed value.
 // A fuzzer with cmp traces is expected to defeat this check.
 #include <cstdint>
+#include <cstdio>
 #include <cstdlib>
 #include <cstring>
-#include <cstdio>
 
 // A modified jenkins_one_at_a_time_hash initialized by non-zero,
 // so that simple_hash(0) != 0. See also
diff --git a/test/SimpleTest.cpp b/test/SimpleTest.cpp
index e53ea16..a8b4988 100644
--- a/test/SimpleTest.cpp
+++ b/test/SimpleTest.cpp
@@ -3,9 +3,9 @@
 
 // Simple test for a fuzzer. The fuzzer must find the string "Hi!".
 #include <assert.h>
+#include <cstddef>
 #include <cstdint>
 #include <cstdlib>
-#include <cstddef>
 #include <iostream>
 
 static volatile int Sink;
diff --git a/test/SimpleThreadedTest.cpp b/test/SimpleThreadedTest.cpp
index 5f02d3f..1abdc3f 100644
--- a/test/SimpleThreadedTest.cpp
+++ b/test/SimpleThreadedTest.cpp
@@ -3,8 +3,8 @@
 
 // Threaded test for a fuzzer. The fuzzer should find "H"
 #include <assert.h>
-#include <cstdint>
 #include <cstddef>
+#include <cstdint>
 #include <cstring>
 #include <iostream>
 #include <thread>
diff --git a/test/SingleByteInputTest.cpp b/test/SingleByteInputTest.cpp
index 4ce819d..72b58ba 100644
--- a/test/SingleByteInputTest.cpp
+++ b/test/SingleByteInputTest.cpp
@@ -2,10 +2,10 @@
 // License. See LICENSE.TXT for details.
 
 // Simple test for a fuzzer, need just one byte to crash.
-#include <cstdint>
-#include <cstdlib>
 #include <cstddef>
+#include <cstdint>
 #include <cstdio>
+#include <cstdlib>
 
 extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
   if (Size > 0 && Data[Size/2] == 42) {
diff --git a/test/SingleMemcmpTest.cpp b/test/SingleMemcmpTest.cpp
index c73f68a..83c09e0 100644
--- a/test/SingleMemcmpTest.cpp
+++ b/test/SingleMemcmpTest.cpp
@@ -2,10 +2,10 @@
 // License. See LICENSE.TXT for details.
 
 // Simple test for a fuzzer. The fuzzer must find a particular string.
-#include <cstring>
 #include <cstdint>
 #include <cstdio>
 #include <cstdlib>
+#include <cstring>
 
 extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
   char *S = (char*)Data;
diff --git a/test/SingleStrcmpTest.cpp b/test/SingleStrcmpTest.cpp
index 48f481d..1490734 100644
--- a/test/SingleStrcmpTest.cpp
+++ b/test/SingleStrcmpTest.cpp
@@ -2,10 +2,10 @@
 // License. See LICENSE.TXT for details.
 
 // Simple test for a fuzzer. The fuzzer must find a particular string.
-#include <cstring>
 #include <cstdint>
 #include <cstdio>
 #include <cstdlib>
+#include <cstring>
 
 extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
   if (Size >= 7) {
diff --git a/test/SingleStrncmpTest.cpp b/test/SingleStrncmpTest.cpp
index e5601da..b302670 100644
--- a/test/SingleStrncmpTest.cpp
+++ b/test/SingleStrncmpTest.cpp
@@ -2,10 +2,10 @@
 // License. See LICENSE.TXT for details.
 
 // Simple test for a fuzzer. The fuzzer must find a particular string.
-#include <cstring>
 #include <cstdint>
 #include <cstdio>
 #include <cstdlib>
+#include <cstring>
 
 extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
   char *S = (char*)Data;
diff --git a/test/SpamyTest.cpp b/test/SpamyTest.cpp
index d294d4d..721134e 100644
--- a/test/SpamyTest.cpp
+++ b/test/SpamyTest.cpp
@@ -3,9 +3,9 @@
 
 // The test spams to stderr and stdout.
 #include <assert.h>
+#include <cstddef>
 #include <cstdint>
 #include <cstdio>
-#include <cstddef>
 #include <iostream>
 
 extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
diff --git a/test/StrcmpTest.cpp b/test/StrcmpTest.cpp
index cd91dda..e7636e8 100644
--- a/test/StrcmpTest.cpp
+++ b/test/StrcmpTest.cpp
@@ -2,11 +2,11 @@
 // License. See LICENSE.TXT for details.
 
 // Break through a series of strcmp.
-#include <cstring>
+#include <cassert>
 #include <cstdint>
 #include <cstdio>
 #include <cstdlib>
-#include <cassert>
+#include <cstring>
 
 bool Eq(const uint8_t *Data, size_t Size, const char *Str) {
   char Buff[1024];
diff --git a/test/StrncmpOOBTest.cpp b/test/StrncmpOOBTest.cpp
index f70b003..4ed71d9 100644
--- a/test/StrncmpOOBTest.cpp
+++ b/test/StrncmpOOBTest.cpp
@@ -3,10 +3,10 @@
 
 // Test that libFuzzer itself does not read out of bounds.
 #include <assert.h>
-#include <cstdint>
-#include <cstring>
-#include <cstdlib>
 #include <cstddef>
+#include <cstdint>
+#include <cstdlib>
+#include <cstring>
 #include <iostream>
 
 static volatile int Sink;
diff --git a/test/StrncmpTest.cpp b/test/StrncmpTest.cpp
index 5ffd011..f71f01e 100644
--- a/test/StrncmpTest.cpp
+++ b/test/StrncmpTest.cpp
@@ -2,10 +2,10 @@
 // License. See LICENSE.TXT for details.
 
 // Simple test for a fuzzer. The fuzzer must find a particular string.
-#include <cstring>
 #include <cstdint>
 #include <cstdio>
 #include <cstdlib>
+#include <cstring>
 
 static volatile int sink;
 
diff --git a/test/StrstrTest.cpp b/test/StrstrTest.cpp
index f021e75..a3ea4e0 100644
--- a/test/StrstrTest.cpp
+++ b/test/StrstrTest.cpp
@@ -2,11 +2,11 @@
 // License. See LICENSE.TXT for details.
 
 // Test strstr and strcasestr hooks.
-#include <string>
-#include <string.h>
 #include <cstdint>
 #include <cstdio>
 #include <cstdlib>
+#include <string.h>
+#include <string>
 
 // Windows does not have strcasestr and memmem, so we are not testing them.
 #ifdef _WIN32
diff --git a/test/SwapCmpTest.cpp b/test/SwapCmpTest.cpp
index b90ac72..bbfbefe 100644
--- a/test/SwapCmpTest.cpp
+++ b/test/SwapCmpTest.cpp
@@ -3,9 +3,9 @@
 
 // The fuzzer must find several constants with swapped bytes.
 #include <cstdint>
+#include <cstdio>
 #include <cstdlib>
 #include <cstring>
-#include <cstdio>
 
 extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
   if (Size < 14) return 0;
diff --git a/test/Switch2Test.cpp b/test/Switch2Test.cpp
index 3c6a300..5f66ac8 100644
--- a/test/Switch2Test.cpp
+++ b/test/Switch2Test.cpp
@@ -2,11 +2,11 @@
 // License. See LICENSE.TXT for details.
 
 // Simple test for a fuzzer. The fuzzer must find the interesting switch value.
-#include <cstdint>
-#include <cstdlib>
-#include <cstdio>
-#include <cstring>
 #include <cstddef>
+#include <cstdint>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
 
 int Switch(int a) {
   switch(a) {
diff --git a/test/SwitchTest.cpp b/test/SwitchTest.cpp
index 3dc051f..86944ca 100644
--- a/test/SwitchTest.cpp
+++ b/test/SwitchTest.cpp
@@ -2,11 +2,11 @@
 // License. See LICENSE.TXT for details.
 
 // Simple test for a fuzzer. The fuzzer must find the interesting switch value.
-#include <cstdint>
-#include <cstdlib>
-#include <cstdio>
-#include <cstring>
 #include <cstddef>
+#include <cstdint>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
 
 static volatile int Sink;
 
diff --git a/test/TableLookupTest.cpp b/test/TableLookupTest.cpp
index f9d5610..8126eea 100644
--- a/test/TableLookupTest.cpp
+++ b/test/TableLookupTest.cpp
@@ -3,11 +3,11 @@
 
 // Make sure the fuzzer eventually finds all possible values of a variable
 // within a range.
-#include <cstring>
+#include <cassert>
 #include <cstdint>
 #include <cstdio>
 #include <cstdlib>
-#include <cassert>
+#include <cstring>
 #include <set>
 
 const size_t N = 1 << 12;
diff --git a/test/ThreadedLeakTest.cpp b/test/ThreadedLeakTest.cpp
index 7511071..538d3b4 100644
--- a/test/ThreadedLeakTest.cpp
+++ b/test/ThreadedLeakTest.cpp
@@ -2,8 +2,8 @@
 // License. See LICENSE.TXT for details.
 
 // The fuzzer should find a leak in a non-main thread.
-#include <cstdint>
 #include <cstddef>
+#include <cstdint>
 #include <thread>
 
 static volatile int *Sink;
diff --git a/test/ThreadedTest.cpp b/test/ThreadedTest.cpp
index 09137a9..bb51ba7 100644
--- a/test/ThreadedTest.cpp
+++ b/test/ThreadedTest.cpp
@@ -3,8 +3,8 @@
 
 // Threaded test for a fuzzer. The fuzzer should not crash.
 #include <assert.h>
-#include <cstdint>
 #include <cstddef>
+#include <cstdint>
 #include <cstring>
 #include <thread>
 
diff --git a/test/TimeoutEmptyTest.cpp b/test/TimeoutEmptyTest.cpp
index 8066f48..1ddf1fa 100644
--- a/test/TimeoutEmptyTest.cpp
+++ b/test/TimeoutEmptyTest.cpp
@@ -2,8 +2,8 @@
 // License. See LICENSE.TXT for details.
 
 // Simple test for a fuzzer. The fuzzer must find the empty string.
-#include <cstdint>
 #include <cstddef>
+#include <cstdint>
 
 extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
   static volatile int Zero = 0;
diff --git a/test/TimeoutTest.cpp b/test/TimeoutTest.cpp
index f810701..e3cdba3 100644
--- a/test/TimeoutTest.cpp
+++ b/test/TimeoutTest.cpp
@@ -2,9 +2,9 @@
 // License. See LICENSE.TXT for details.
 
 // Simple test for a fuzzer. The fuzzer must find the string "Hi!".
+#include <cstddef>
 #include <cstdint>
 #include <cstdlib>
-#include <cstddef>
 #include <iostream>
 
 static volatile int Sink;
diff --git a/test/TraceMallocTest.cpp b/test/TraceMallocTest.cpp
index 43e6950..af99756 100644
--- a/test/TraceMallocTest.cpp
+++ b/test/TraceMallocTest.cpp
@@ -3,9 +3,9 @@
 
 // Tests -trace_malloc
 #include <assert.h>
+#include <cstddef>
 #include <cstdint>
 #include <cstdlib>
-#include <cstddef>
 #include <iostream>
 
 int *Ptr;
diff --git a/test/TwoDifferentBugsTest.cpp b/test/TwoDifferentBugsTest.cpp
index 42c0d19..77d2cb1 100644
--- a/test/TwoDifferentBugsTest.cpp
+++ b/test/TwoDifferentBugsTest.cpp
@@ -2,9 +2,9 @@
 // License. See LICENSE.TXT for details.
 
 // Simple test for a fuzzer. This test may trigger two different bugs.
+#include <cstddef>
 #include <cstdint>
 #include <cstdlib>
-#include <cstddef>
 #include <iostream>
 
 static volatile int *Null = 0;