summaryrefslogtreecommitdiffstats
path: root/lib/Fuzzer
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2017-06-06 11:49:48 +0000
committerChandler Carruth <chandlerc@gmail.com>2017-06-06 11:49:48 +0000
commite3e43d9d574cf0a829e9a58525372ba0868a3292 (patch)
treee062aee8b490867438b8a40c73f88ef461912e62 /lib/Fuzzer
parent3c0d60785cd10f45fe4ab59ab4d02ffe9ad9d33e (diff)
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: https://llvm.org/svn/llvm-project/llvm/trunk@304787 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Fuzzer')
-rw-r--r--lib/Fuzzer/FuzzerDriver.cpp2
-rw-r--r--lib/Fuzzer/FuzzerExtFunctionsDlsymWin.cpp2
-rw-r--r--lib/Fuzzer/FuzzerLoop.cpp2
-rw-r--r--lib/Fuzzer/FuzzerMerge.cpp4
-rw-r--r--lib/Fuzzer/FuzzerMutate.cpp2
-rw-r--r--lib/Fuzzer/FuzzerShmemPosix.cpp6
-rw-r--r--lib/Fuzzer/FuzzerShmemWindows.cpp4
-rw-r--r--lib/Fuzzer/FuzzerTracePC.cpp2
-rw-r--r--lib/Fuzzer/FuzzerTraceState.cpp2
-rw-r--r--lib/Fuzzer/FuzzerUtilWindows.cpp2
-rw-r--r--lib/Fuzzer/afl/afl_driver.cpp12
-rw-r--r--lib/Fuzzer/test/AFLDriverTest.cpp2
-rw-r--r--lib/Fuzzer/test/AbsNegAndConstant64Test.cpp6
-rw-r--r--lib/Fuzzer/test/AbsNegAndConstantTest.cpp6
-rw-r--r--lib/Fuzzer/test/AccumulateAllocationsTest.cpp2
-rw-r--r--lib/Fuzzer/test/BadStrcmpTest.cpp2
-rw-r--r--lib/Fuzzer/test/BufferOverflowOnInput.cpp2
-rw-r--r--lib/Fuzzer/test/CallerCalleeTest.cpp2
-rw-r--r--lib/Fuzzer/test/CleanseTest.cpp2
-rw-r--r--lib/Fuzzer/test/CustomMutatorTest.cpp2
-rw-r--r--lib/Fuzzer/test/CxxStringEqTest.cpp4
-rw-r--r--lib/Fuzzer/test/DSOTestMain.cpp2
-rw-r--r--lib/Fuzzer/test/DivTest.cpp2
-rw-r--r--lib/Fuzzer/test/FourIndependentBranchesTest.cpp2
-rw-r--r--lib/Fuzzer/test/FullCoverageSetTest.cpp2
-rw-r--r--lib/Fuzzer/test/FuzzerUnittest.cpp4
-rw-r--r--lib/Fuzzer/test/LeakTest.cpp2
-rw-r--r--lib/Fuzzer/test/LeakTimeoutTest.cpp2
-rw-r--r--lib/Fuzzer/test/LoadTest.cpp2
-rw-r--r--lib/Fuzzer/test/Memcmp64BytesTest.cpp2
-rw-r--r--lib/Fuzzer/test/MemcmpTest.cpp2
-rw-r--r--lib/Fuzzer/test/NotinstrumentedTest.cpp2
-rw-r--r--lib/Fuzzer/test/NthRunCrashTest.cpp2
-rw-r--r--lib/Fuzzer/test/NullDerefOnEmptyTest.cpp2
-rw-r--r--lib/Fuzzer/test/NullDerefTest.cpp2
-rw-r--r--lib/Fuzzer/test/OneHugeAllocTest.cpp2
-rw-r--r--lib/Fuzzer/test/OutOfMemorySingleLargeMallocTest.cpp2
-rw-r--r--lib/Fuzzer/test/OutOfMemoryTest.cpp2
-rw-r--r--lib/Fuzzer/test/RepeatedBytesTest.cpp2
-rw-r--r--lib/Fuzzer/test/RepeatedMemcmp.cpp3
-rw-r--r--lib/Fuzzer/test/ShrinkControlFlowTest.cpp4
-rw-r--r--lib/Fuzzer/test/ShrinkValueProfileTest.cpp4
-rw-r--r--lib/Fuzzer/test/SignedIntOverflowTest.cpp4
-rw-r--r--lib/Fuzzer/test/SimpleCmpTest.cpp2
-rw-r--r--lib/Fuzzer/test/SimpleDictionaryTest.cpp2
-rw-r--r--lib/Fuzzer/test/SimpleHashTest.cpp2
-rw-r--r--lib/Fuzzer/test/SimpleTest.cpp2
-rw-r--r--lib/Fuzzer/test/SimpleThreadedTest.cpp2
-rw-r--r--lib/Fuzzer/test/SingleByteInputTest.cpp4
-rw-r--r--lib/Fuzzer/test/SingleMemcmpTest.cpp2
-rw-r--r--lib/Fuzzer/test/SingleStrcmpTest.cpp2
-rw-r--r--lib/Fuzzer/test/SingleStrncmpTest.cpp2
-rw-r--r--lib/Fuzzer/test/SpamyTest.cpp2
-rw-r--r--lib/Fuzzer/test/StrcmpTest.cpp4
-rw-r--r--lib/Fuzzer/test/StrncmpOOBTest.cpp4
-rw-r--r--lib/Fuzzer/test/StrncmpTest.cpp2
-rw-r--r--lib/Fuzzer/test/StrstrTest.cpp4
-rw-r--r--lib/Fuzzer/test/SwapCmpTest.cpp2
-rw-r--r--lib/Fuzzer/test/Switch2Test.cpp4
-rw-r--r--lib/Fuzzer/test/SwitchTest.cpp4
-rw-r--r--lib/Fuzzer/test/TableLookupTest.cpp4
-rw-r--r--lib/Fuzzer/test/ThreadedLeakTest.cpp2
-rw-r--r--lib/Fuzzer/test/ThreadedTest.cpp2
-rw-r--r--lib/Fuzzer/test/TimeoutEmptyTest.cpp2
-rw-r--r--lib/Fuzzer/test/TimeoutTest.cpp2
-rw-r--r--lib/Fuzzer/test/TraceMallocTest.cpp2
-rw-r--r--lib/Fuzzer/test/TwoDifferentBugsTest.cpp2
67 files changed, 92 insertions, 93 deletions
diff --git a/lib/Fuzzer/FuzzerDriver.cpp b/lib/Fuzzer/FuzzerDriver.cpp
index f9f8a8064a7c..9aad3771784d 100644
--- a/lib/Fuzzer/FuzzerDriver.cpp
+++ b/lib/Fuzzer/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/lib/Fuzzer/FuzzerExtFunctionsDlsymWin.cpp b/lib/Fuzzer/FuzzerExtFunctionsDlsymWin.cpp
index 77521698c80a..f6c7e07cc610 100644
--- a/lib/Fuzzer/FuzzerExtFunctionsDlsymWin.cpp
+++ b/lib/Fuzzer/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/lib/Fuzzer/FuzzerLoop.cpp b/lib/Fuzzer/FuzzerLoop.cpp
index 14caa203c5ef..f6083282ab61 100644
--- a/lib/Fuzzer/FuzzerLoop.cpp
+++ b/lib/Fuzzer/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/lib/Fuzzer/FuzzerMerge.cpp b/lib/Fuzzer/FuzzerMerge.cpp
index e66460c29e2f..612f4bbb28f2 100644
--- a/lib/Fuzzer/FuzzerMerge.cpp
+++ b/lib/Fuzzer/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/lib/Fuzzer/FuzzerMutate.cpp b/lib/Fuzzer/FuzzerMutate.cpp
index e60d4130de10..53cb9027e455 100644
--- a/lib/Fuzzer/FuzzerMutate.cpp
+++ b/lib/Fuzzer/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/lib/Fuzzer/FuzzerShmemPosix.cpp b/lib/Fuzzer/FuzzerShmemPosix.cpp
index 2723bdd86f48..50cdcfb509dc 100644
--- a/lib/Fuzzer/FuzzerShmemPosix.cpp
+++ b/lib/Fuzzer/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/lib/Fuzzer/FuzzerShmemWindows.cpp b/lib/Fuzzer/FuzzerShmemWindows.cpp
index 6325b4b8e5b4..d330ebf4fd07 100644
--- a/lib/Fuzzer/FuzzerShmemWindows.cpp
+++ b/lib/Fuzzer/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/lib/Fuzzer/FuzzerTracePC.cpp b/lib/Fuzzer/FuzzerTracePC.cpp
index ce0f7a47eee6..ea93468ea0ed 100644
--- a/lib/Fuzzer/FuzzerTracePC.cpp
+++ b/lib/Fuzzer/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/lib/Fuzzer/FuzzerTraceState.cpp b/lib/Fuzzer/FuzzerTraceState.cpp
index a486223d650c..8670e2ad6727 100644
--- a/lib/Fuzzer/FuzzerTraceState.cpp
+++ b/lib/Fuzzer/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/lib/Fuzzer/FuzzerUtilWindows.cpp b/lib/Fuzzer/FuzzerUtilWindows.cpp
index 08bb3cf3be15..8d0678d7bf7d 100644
--- a/lib/Fuzzer/FuzzerUtilWindows.cpp
+++ b/lib/Fuzzer/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/lib/Fuzzer/afl/afl_driver.cpp b/lib/Fuzzer/afl/afl_driver.cpp
index 3815ed11cf60..d0521bdfdd67 100644
--- a/lib/Fuzzer/afl/afl_driver.cpp
+++ b/lib/Fuzzer/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 @@ statistics from the file. If that fails then the process will quit.
*/
#include <assert.h>
-#include <stdio.h>
+#include <errno.h>
+#include <signal.h>
#include <stdint.h>
+#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <unistd.h>
-#include <errno.h>
-#include <signal.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/lib/Fuzzer/test/AFLDriverTest.cpp b/lib/Fuzzer/test/AFLDriverTest.cpp
index e3f5f7100883..b949adc7de15 100644
--- a/lib/Fuzzer/test/AFLDriverTest.cpp
+++ b/lib/Fuzzer/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/lib/Fuzzer/test/AbsNegAndConstant64Test.cpp b/lib/Fuzzer/test/AbsNegAndConstant64Test.cpp
index 69b0d59fb8ef..dfb6007b7970 100644
--- a/lib/Fuzzer/test/AbsNegAndConstant64Test.cpp
+++ b/lib/Fuzzer/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/lib/Fuzzer/test/AbsNegAndConstantTest.cpp b/lib/Fuzzer/test/AbsNegAndConstantTest.cpp
index 69075a454c99..e9d983ff1ebf 100644
--- a/lib/Fuzzer/test/AbsNegAndConstantTest.cpp
+++ b/lib/Fuzzer/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/lib/Fuzzer/test/AccumulateAllocationsTest.cpp b/lib/Fuzzer/test/AccumulateAllocationsTest.cpp
index 604d8fa299ae..e9acd7ccbd30 100644
--- a/lib/Fuzzer/test/AccumulateAllocationsTest.cpp
+++ b/lib/Fuzzer/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/lib/Fuzzer/test/BadStrcmpTest.cpp b/lib/Fuzzer/test/BadStrcmpTest.cpp
index 159cd7ea5f70..ba2b068f741d 100644
--- a/lib/Fuzzer/test/BadStrcmpTest.cpp
+++ b/lib/Fuzzer/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/lib/Fuzzer/test/BufferOverflowOnInput.cpp b/lib/Fuzzer/test/BufferOverflowOnInput.cpp
index b9d14052aee4..75e1fb90a19a 100644
--- a/lib/Fuzzer/test/BufferOverflowOnInput.cpp
+++ b/lib/Fuzzer/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/lib/Fuzzer/test/CallerCalleeTest.cpp b/lib/Fuzzer/test/CallerCalleeTest.cpp
index 3ec025d02301..ed9f37cc1521 100644
--- a/lib/Fuzzer/test/CallerCalleeTest.cpp
+++ b/lib/Fuzzer/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/lib/Fuzzer/test/CleanseTest.cpp b/lib/Fuzzer/test/CleanseTest.cpp
index faea8dcb3c30..ee1845701269 100644
--- a/lib/Fuzzer/test/CleanseTest.cpp
+++ b/lib/Fuzzer/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/lib/Fuzzer/test/CustomMutatorTest.cpp b/lib/Fuzzer/test/CustomMutatorTest.cpp
index 4f84519a90e6..521d7f506b4d 100644
--- a/lib/Fuzzer/test/CustomMutatorTest.cpp
+++ b/lib/Fuzzer/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/lib/Fuzzer/test/CxxStringEqTest.cpp b/lib/Fuzzer/test/CxxStringEqTest.cpp
index e0e23c972ccb..924851c5ad53 100644
--- a/lib/Fuzzer/test/CxxStringEqTest.cpp
+++ b/lib/Fuzzer/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/lib/Fuzzer/test/DSOTestMain.cpp b/lib/Fuzzer/test/DSOTestMain.cpp
index 3e225d886128..e0c857d4fdec 100644
--- a/lib/Fuzzer/test/DSOTestMain.cpp
+++ b/lib/Fuzzer/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/lib/Fuzzer/test/DivTest.cpp b/lib/Fuzzer/test/DivTest.cpp
index 63f6960f4e90..bce13feb790f 100644
--- a/lib/Fuzzer/test/DivTest.cpp
+++ b/lib/Fuzzer/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/lib/Fuzzer/test/FourIndependentBranchesTest.cpp b/lib/Fuzzer/test/FourIndependentBranchesTest.cpp
index 62b3be76e3aa..bbf5ea235c7a 100644
--- a/lib/Fuzzer/test/FourIndependentBranchesTest.cpp
+++ b/lib/Fuzzer/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/lib/Fuzzer/test/FullCoverageSetTest.cpp b/lib/Fuzzer/test/FullCoverageSetTest.cpp
index 415e0b4760c5..6d7e48fe51f8 100644
--- a/lib/Fuzzer/test/FullCoverageSetTest.cpp
+++ b/lib/Fuzzer/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/lib/Fuzzer/test/FuzzerUnittest.cpp b/lib/Fuzzer/test/FuzzerUnittest.cpp
index 78ea874f2ce2..c8beb4331bfa 100644
--- a/lib/Fuzzer/test/FuzzerUnittest.cpp
+++ b/lib/Fuzzer/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/lib/Fuzzer/test/LeakTest.cpp b/lib/Fuzzer/test/LeakTest.cpp
index 22e5164050e5..ea89e3901057 100644
--- a/lib/Fuzzer/test/LeakTest.cpp
+++ b/lib/Fuzzer/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/lib/Fuzzer/test/LeakTimeoutTest.cpp b/lib/Fuzzer/test/LeakTimeoutTest.cpp
index 4f31b3e52c16..92526194a508 100644
--- a/lib/Fuzzer/test/LeakTimeoutTest.cpp
+++ b/lib/Fuzzer/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/lib/Fuzzer/test/LoadTest.cpp b/lib/Fuzzer/test/LoadTest.cpp
index eef16c7be51e..67a28c7cb22f 100644
--- a/lib/Fuzzer/test/LoadTest.cpp
+++ b/lib/Fuzzer/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/lib/Fuzzer/test/Memcmp64BytesTest.cpp b/lib/Fuzzer/test/Memcmp64BytesTest.cpp
index e81526b578a3..5b6cb707173f 100644
--- a/lib/Fuzzer/test/Memcmp64BytesTest.cpp
+++ b/lib/Fuzzer/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/lib/Fuzzer/test/MemcmpTest.cpp b/lib/Fuzzer/test/MemcmpTest.cpp
index fdbf94683f76..8dbb7d84fbba 100644
--- a/lib/Fuzzer/test/MemcmpTest.cpp
+++ b/lib/Fuzzer/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/lib/Fuzzer/test/NotinstrumentedTest.cpp b/lib/Fuzzer/test/NotinstrumentedTest.cpp
index ffe952c749d2..91418990b192 100644
--- a/lib/Fuzzer/test/NotinstrumentedTest.cpp
+++ b/lib/Fuzzer/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/lib/Fuzzer/test/NthRunCrashTest.cpp b/lib/Fuzzer/test/NthRunCrashTest.cpp
index b43e69e51b25..da5fbd33e962 100644
--- a/lib/Fuzzer/test/NthRunCrashTest.cpp
+++ b/lib/Fuzzer/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/lib/Fuzzer/test/NullDerefOnEmptyTest.cpp b/lib/Fuzzer/test/NullDerefOnEmptyTest.cpp
index 153710920a5f..459db51f8a3b 100644
--- a/lib/Fuzzer/test/NullDerefOnEmptyTest.cpp
+++ b/lib/Fuzzer/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/lib/Fuzzer/test/NullDerefTest.cpp b/lib/Fuzzer/test/NullDerefTest.cpp
index 3f03d2498197..1b44b682ace6 100644
--- a/lib/Fuzzer/test/NullDerefTest.cpp
+++ b/lib/Fuzzer/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/lib/Fuzzer/test/OneHugeAllocTest.cpp b/lib/Fuzzer/test/OneHugeAllocTest.cpp
index 8d3d1d6d302d..32a557871000 100644
--- a/lib/Fuzzer/test/OneHugeAllocTest.cpp
+++ b/lib/Fuzzer/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/lib/Fuzzer/test/OutOfMemorySingleLargeMallocTest.cpp b/lib/Fuzzer/test/OutOfMemorySingleLargeMallocTest.cpp
index 316b7682b8e6..a07795a08dff 100644
--- a/lib/Fuzzer/test/OutOfMemorySingleLargeMallocTest.cpp
+++ b/lib/Fuzzer/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/lib/Fuzzer/test/OutOfMemoryTest.cpp b/lib/Fuzzer/test/OutOfMemoryTest.cpp
index 078a39ee1fe9..5e59bde09853 100644
--- a/lib/Fuzzer/test/OutOfMemoryTest.cpp
+++ b/lib/Fuzzer/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/lib/Fuzzer/test/RepeatedBytesTest.cpp b/lib/Fuzzer/test/RepeatedBytesTest.cpp
index 2fa6c78c26d8..14222f284747 100644
--- a/lib/Fuzzer/test/RepeatedBytesTest.cpp
+++ b/lib/Fuzzer/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/lib/Fuzzer/test/RepeatedMemcmp.cpp b/lib/Fuzzer/test/RepeatedMemcmp.cpp
index 7377f65ed76d..18369deac3b0 100644
--- a/lib/Fuzzer/test/RepeatedMemcmp.cpp
+++ b/lib/Fuzzer/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/lib/Fuzzer/test/ShrinkControlFlowTest.cpp b/lib/Fuzzer/test/ShrinkControlFlowTest.cpp
index 0fd7c5e9a1fb..d09542963626 100644
--- a/lib/Fuzzer/test/ShrinkControlFlowTest.cpp
+++ b/lib/Fuzzer/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 <cstddef>
#include <cstdint>
+#include <cstdio>
#include <cstdlib>
-#include <cstddef>
#include <cstring>
-#include <cstdio>
static volatile int Sink;
diff --git a/lib/Fuzzer/test/ShrinkValueProfileTest.cpp b/lib/Fuzzer/test/ShrinkValueProfileTest.cpp
index 026b8ce26591..86e4e3cb0d9a 100644
--- a/lib/Fuzzer/test/ShrinkValueProfileTest.cpp
+++ b/lib/Fuzzer/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 <cstddef>
#include <cstdint>
+#include <cstdio>
#include <cstdlib>
-#include <cstddef>
#include <cstring>
-#include <cstdio>
static volatile uint32_t Sink;
diff --git a/lib/Fuzzer/test/SignedIntOverflowTest.cpp b/lib/Fuzzer/test/SignedIntOverflowTest.cpp
index 7df32ad57933..d80060207dee 100644
--- a/lib/Fuzzer/test/SignedIntOverflowTest.cpp
+++ b/lib/Fuzzer/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/lib/Fuzzer/test/SimpleCmpTest.cpp b/lib/Fuzzer/test/SimpleCmpTest.cpp
index 12b5cdda0660..8acad4ac77e8 100644
--- a/lib/Fuzzer/test/SimpleCmpTest.cpp
+++ b/lib/Fuzzer/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/lib/Fuzzer/test/SimpleDictionaryTest.cpp b/lib/Fuzzer/test/SimpleDictionaryTest.cpp
index cd7292bd006c..a1cd20047224 100644
--- a/lib/Fuzzer/test/SimpleDictionaryTest.cpp
+++ b/lib/Fuzzer/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/lib/Fuzzer/test/SimpleHashTest.cpp b/lib/Fuzzer/test/SimpleHashTest.cpp
index 00599de78ebe..99e96cb25dcd 100644
--- a/lib/Fuzzer/test/SimpleHashTest.cpp
+++ b/lib/Fuzzer/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/lib/Fuzzer/test/SimpleTest.cpp b/lib/Fuzzer/test/SimpleTest.cpp
index e53ea160ed8f..a8b4988dff10 100644
--- a/lib/Fuzzer/test/SimpleTest.cpp
+++ b/lib/Fuzzer/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/lib/Fuzzer/test/SimpleThreadedTest.cpp b/lib/Fuzzer/test/SimpleThreadedTest.cpp
index 5f02d3f8457c..1abdc3fc6d6b 100644
--- a/lib/Fuzzer/test/SimpleThreadedTest.cpp
+++ b/lib/Fuzzer/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/lib/Fuzzer/test/SingleByteInputTest.cpp b/lib/Fuzzer/test/SingleByteInputTest.cpp
index 4ce819d230ce..72b58ba912eb 100644
--- a/lib/Fuzzer/test/SingleByteInputTest.cpp
+++ b/lib/Fuzzer/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/lib/Fuzzer/test/SingleMemcmpTest.cpp b/lib/Fuzzer/test/SingleMemcmpTest.cpp
index c73f68a7ee6e..83c09e0428ec 100644
--- a/lib/Fuzzer/test/SingleMemcmpTest.cpp
+++ b/lib/Fuzzer/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/lib/Fuzzer/test/SingleStrcmpTest.cpp b/lib/Fuzzer/test/SingleStrcmpTest.cpp
index 48f481dfc51a..149073444c9c 100644
--- a/lib/Fuzzer/test/SingleStrcmpTest.cpp
+++ b/lib/Fuzzer/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/lib/Fuzzer/test/SingleStrncmpTest.cpp b/lib/Fuzzer/test/SingleStrncmpTest.cpp
index e5601da86329..b302670fb743 100644
--- a/lib/Fuzzer/test/SingleStrncmpTest.cpp
+++ b/lib/Fuzzer/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/lib/Fuzzer/test/SpamyTest.cpp b/lib/Fuzzer/test/SpamyTest.cpp
index d294d4dc53e0..721134e1841c 100644
--- a/lib/Fuzzer/test/SpamyTest.cpp
+++ b/lib/Fuzzer/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/lib/Fuzzer/test/StrcmpTest.cpp b/lib/Fuzzer/test/StrcmpTest.cpp
index cd91dda76f30..e7636e8812fc 100644
--- a/lib/Fuzzer/test/StrcmpTest.cpp
+++ b/lib/Fuzzer/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/lib/Fuzzer/test/StrncmpOOBTest.cpp b/lib/Fuzzer/test/StrncmpOOBTest.cpp
index f70b003afad6..4ed71d9d021d 100644
--- a/lib/Fuzzer/test/StrncmpOOBTest.cpp
+++ b/lib/Fuzzer/test/StrncmpOOBTest.cpp
@@ -3,10 +3,10 @@
// Test that libFuzzer itself does not read out of bounds.
#include <assert.h>
+#include <cstddef>
#include <cstdint>
-#include <cstring>
#include <cstdlib>
-#include <cstddef>
+#include <cstring>
#include <iostream>
static volatile int Sink;
diff --git a/lib/Fuzzer/test/StrncmpTest.cpp b/lib/Fuzzer/test/StrncmpTest.cpp
index 5ffd011dcdff..f71f01ee3098 100644
--- a/lib/Fuzzer/test/StrncmpTest.cpp
+++ b/lib/Fuzzer/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/lib/Fuzzer/test/StrstrTest.cpp b/lib/Fuzzer/test/StrstrTest.cpp
index f021e75ec0fd..a3ea4e03b3d2 100644
--- a/lib/Fuzzer/test/StrstrTest.cpp
+++ b/lib/Fuzzer/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/lib/Fuzzer/test/SwapCmpTest.cpp b/lib/Fuzzer/test/SwapCmpTest.cpp
index b90ac72c22c4..bbfbefe6ab71 100644
--- a/lib/Fuzzer/test/SwapCmpTest.cpp
+++ b/lib/Fuzzer/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/lib/Fuzzer/test/Switch2Test.cpp b/lib/Fuzzer/test/Switch2Test.cpp
index 3c6a3004907e..5f66ac8b499e 100644
--- a/lib/Fuzzer/test/Switch2Test.cpp
+++ b/lib/Fuzzer/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 <cstddef>
#include <cstdint>
-#include <cstdlib>
#include <cstdio>
+#include <cstdlib>
#include <cstring>
-#include <cstddef>
int Switch(int a) {
switch(a) {
diff --git a/lib/Fuzzer/test/SwitchTest.cpp b/lib/Fuzzer/test/SwitchTest.cpp
index 3dc051ff7b5b..86944cad21c5 100644
--- a/lib/Fuzzer/test/SwitchTest.cpp
+++ b/lib/Fuzzer/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 <cstddef>
#include <cstdint>
-#include <cstdlib>
#include <cstdio>
+#include <cstdlib>
#include <cstring>
-#include <cstddef>
static volatile int Sink;
diff --git a/lib/Fuzzer/test/TableLookupTest.cpp b/lib/Fuzzer/test/TableLookupTest.cpp
index f9d5610820ff..8126eeabaf42 100644
--- a/lib/Fuzzer/test/TableLookupTest.cpp
+++ b/lib/Fuzzer/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/lib/Fuzzer/test/ThreadedLeakTest.cpp b/lib/Fuzzer/test/ThreadedLeakTest.cpp
index 751107110871..538d3b434808 100644
--- a/lib/Fuzzer/test/ThreadedLeakTest.cpp
+++ b/lib/Fuzzer/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/lib/Fuzzer/test/ThreadedTest.cpp b/lib/Fuzzer/test/ThreadedTest.cpp
index 09137a9a70c1..bb51ba764eba 100644
--- a/lib/Fuzzer/test/ThreadedTest.cpp
+++ b/lib/Fuzzer/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/lib/Fuzzer/test/TimeoutEmptyTest.cpp b/lib/Fuzzer/test/TimeoutEmptyTest.cpp
index 8066f480b655..1ddf1fa34589 100644
--- a/lib/Fuzzer/test/TimeoutEmptyTest.cpp
+++ b/lib/Fuzzer/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/lib/Fuzzer/test/TimeoutTest.cpp b/lib/Fuzzer/test/TimeoutTest.cpp
index f8107012c841..e3cdba3eec38 100644
--- a/lib/Fuzzer/test/TimeoutTest.cpp
+++ b/lib/Fuzzer/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/lib/Fuzzer/test/TraceMallocTest.cpp b/lib/Fuzzer/test/TraceMallocTest.cpp
index 43e6950e185f..af9975603aa1 100644
--- a/lib/Fuzzer/test/TraceMallocTest.cpp
+++ b/lib/Fuzzer/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/lib/Fuzzer/test/TwoDifferentBugsTest.cpp b/lib/Fuzzer/test/TwoDifferentBugsTest.cpp
index 42c0d192ba86..77d2cb1a25f9 100644
--- a/lib/Fuzzer/test/TwoDifferentBugsTest.cpp
+++ b/lib/Fuzzer/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;