Sort the remaining #include lines in include/... and lib/....
authorChandler Carruth <chandlerc@gmail.com>
Tue, 6 Jun 2017 11:49:48 +0000 (11:49 +0000)
committerMaria Guseva <m.guseva@samsung.com>
Tue, 11 Jul 2017 02:46:03 +0000 (11:46 +0900)
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

67 files changed:
lib/Fuzzer/FuzzerDriver.cpp
lib/Fuzzer/FuzzerExtFunctionsDlsymWin.cpp
lib/Fuzzer/FuzzerLoop.cpp
lib/Fuzzer/FuzzerMerge.cpp
lib/Fuzzer/FuzzerMutate.cpp
lib/Fuzzer/FuzzerShmemPosix.cpp
lib/Fuzzer/FuzzerShmemWindows.cpp
lib/Fuzzer/FuzzerTracePC.cpp
lib/Fuzzer/FuzzerTraceState.cpp
lib/Fuzzer/FuzzerUtilWindows.cpp
lib/Fuzzer/afl/afl_driver.cpp
lib/Fuzzer/test/AFLDriverTest.cpp
lib/Fuzzer/test/AbsNegAndConstant64Test.cpp
lib/Fuzzer/test/AbsNegAndConstantTest.cpp
lib/Fuzzer/test/AccumulateAllocationsTest.cpp
lib/Fuzzer/test/BadStrcmpTest.cpp
lib/Fuzzer/test/BufferOverflowOnInput.cpp
lib/Fuzzer/test/CallerCalleeTest.cpp
lib/Fuzzer/test/CleanseTest.cpp
lib/Fuzzer/test/CustomMutatorTest.cpp
lib/Fuzzer/test/CxxStringEqTest.cpp
lib/Fuzzer/test/DSOTestMain.cpp
lib/Fuzzer/test/DivTest.cpp
lib/Fuzzer/test/FourIndependentBranchesTest.cpp
lib/Fuzzer/test/FullCoverageSetTest.cpp
lib/Fuzzer/test/FuzzerUnittest.cpp
lib/Fuzzer/test/LeakTest.cpp
lib/Fuzzer/test/LeakTimeoutTest.cpp
lib/Fuzzer/test/LoadTest.cpp
lib/Fuzzer/test/Memcmp64BytesTest.cpp
lib/Fuzzer/test/MemcmpTest.cpp
lib/Fuzzer/test/NotinstrumentedTest.cpp
lib/Fuzzer/test/NthRunCrashTest.cpp
lib/Fuzzer/test/NullDerefOnEmptyTest.cpp
lib/Fuzzer/test/NullDerefTest.cpp
lib/Fuzzer/test/OneHugeAllocTest.cpp
lib/Fuzzer/test/OutOfMemorySingleLargeMallocTest.cpp
lib/Fuzzer/test/OutOfMemoryTest.cpp
lib/Fuzzer/test/RepeatedBytesTest.cpp
lib/Fuzzer/test/RepeatedMemcmp.cpp
lib/Fuzzer/test/ShrinkControlFlowTest.cpp
lib/Fuzzer/test/ShrinkValueProfileTest.cpp
lib/Fuzzer/test/SignedIntOverflowTest.cpp
lib/Fuzzer/test/SimpleCmpTest.cpp
lib/Fuzzer/test/SimpleDictionaryTest.cpp
lib/Fuzzer/test/SimpleHashTest.cpp
lib/Fuzzer/test/SimpleTest.cpp
lib/Fuzzer/test/SimpleThreadedTest.cpp
lib/Fuzzer/test/SingleByteInputTest.cpp
lib/Fuzzer/test/SingleMemcmpTest.cpp
lib/Fuzzer/test/SingleStrcmpTest.cpp
lib/Fuzzer/test/SingleStrncmpTest.cpp
lib/Fuzzer/test/SpamyTest.cpp
lib/Fuzzer/test/StrcmpTest.cpp
lib/Fuzzer/test/StrncmpOOBTest.cpp
lib/Fuzzer/test/StrncmpTest.cpp
lib/Fuzzer/test/StrstrTest.cpp
lib/Fuzzer/test/SwapCmpTest.cpp
lib/Fuzzer/test/Switch2Test.cpp
lib/Fuzzer/test/SwitchTest.cpp
lib/Fuzzer/test/TableLookupTest.cpp
lib/Fuzzer/test/ThreadedLeakTest.cpp
lib/Fuzzer/test/ThreadedTest.cpp
lib/Fuzzer/test/TimeoutEmptyTest.cpp
lib/Fuzzer/test/TimeoutTest.cpp
lib/Fuzzer/test/TraceMallocTest.cpp
lib/Fuzzer/test/TwoDifferentBugsTest.cpp

index f9f8a8064a7c62a58e813f2e7d40cd6a1dadafe3..9aad3771784deb1dd6fee8405fa01e525b78a117 100644 (file)
@@ -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"
index 77521698c80a4decfcb2dc8e5c2e841ee2a8dfbe..f6c7e07cc610b3491c7f1cf5508891a9145e4b68 100644 (file)
@@ -13,8 +13,8 @@
 
 #include "FuzzerExtFunctions.h"
 #include "FuzzerIO.h"
-#include "Windows.h"
 #include "Psapi.h"
+#include "Windows.h"
 
 namespace fuzzer {
 
index 14caa203c5ef60abcbc6287a1fc6f6d788bb92bf..f6083282ab615a5ce65b4ed35abaf1ed5a2c05b0 100644 (file)
@@ -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"
index e66460c29e2f8f69247d774d3c1e934b6a28dd44..612f4bbb28f21e6c5b76efa9945e9f02ec380924 100644 (file)
@@ -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"
 
index e60d4130de106edeaa34d1602787e3a8547440dc..53cb9027e455ffeffd26f2915fbc0fd1de1cdbf2 100644 (file)
@@ -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 {
index 2723bdd86f487518ba3fa0439f02e7911f44f477..50cdcfb509dc259281b765de558f9438d5758460 100644 (file)
 #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 {
index 6325b4b8e5b4129bd240f5a5f23ba04ab6e565d6..d330ebf4fd07a98448b94e57490824fd6072cc17 100644 (file)
 #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 {
 
index ce0f7a47eee64bfdc6a0b6dee2aa741455e16667..ea93468ea0ed2681f4a0b1177a0ac5d19d05d0d5 100644 (file)
 //
 //===----------------------------------------------------------------------===//
 
+#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>
index a486223d650c93d8605fb9df031f8dcdf9a4b45d..8670e2ad67277191d63a2b76ffd26b5ab42b53a7 100644 (file)
@@ -10,8 +10,8 @@
 //===----------------------------------------------------------------------===//
 
 #include "FuzzerDictionary.h"
-#include "FuzzerInternal.h"
 #include "FuzzerIO.h"
+#include "FuzzerInternal.h"
 #include "FuzzerMutate.h"
 #include "FuzzerTracePC.h"
 #include <algorithm>
index 08bb3cf3be157b3a98055f751d4f3ed412f0433f..8d0678d7bf7d793775614731f27076d837df7c6c 100644 (file)
@@ -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 {
 
index 3815ed11cf60b5eaf6291d3082004dfa71f6a891..d0521bdfdd67b64d7911440b3437a106c31a48ab 100644 (file)
@@ -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
index e3f5f7100883ce0eb0683c5b384f30357cf6126d..b949adc7de159a773468367eeb62af092d5f9a00 100644 (file)
@@ -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() {}
 
index 69b0d59fb8eff432ddd5e62a33c0000b8f0f90e3..dfb6007b7970d9f8adf169d7b2635c642c39000c 100644 (file)
@@ -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;
index 69075a454c99b1d7de31c4a04c6a3f453944698e..e9d983ff1ebfe16cc9c3c834e6836bbd6921bf87 100644 (file)
@@ -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;
index 604d8fa299aeb099167ead49412c74d3192ae030..e9acd7ccbd30fb05627dbd9398e78c20656238cd 100644 (file)
@@ -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;
index 159cd7ea5f7081def7d3a3401b01602fea98069b..ba2b068f741d445c228065b70c9bba76a4437b5d 100644 (file)
@@ -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;
 
index b9d14052aee4724cd5decbe24e01864f0608d443..75e1fb90a19a87bbffbc528e1664b94076406c57 100644 (file)
@@ -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;
index 3ec025d02301d800d5a23f8c4f1f6cbed564261d..ed9f37cc15218f53442ba3a464be93322fdc55e5 100644 (file)
@@ -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>
 
index faea8dcb3c30c96081c9b10fe3764b55797643dc..ee18457012693c68266d4a7a7cd7bba7a7e5496f 100644 (file)
@@ -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' &&
index 4f84519a90e64624dce98dce96487d7e4bc64398..521d7f506b4d3c53987e4470fb368462df342662 100644 (file)
@@ -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"
index e0e23c972ccbacff501387cf6726a6be37d1a9f0..924851c5ad536d8d7f8d7d43d231cf746359b9df 100644 (file)
@@ -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;
 
index 3e225d88612891c5ef735e13501671618715d863..e0c857d4fdec320d189a3f9a3c36f54dbbf06f80 100644 (file)
@@ -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);
index 63f6960f4e909858215f5c71b94cbfeebab79164..bce13feb790f09ad336ebae5a39c429bb765294d 100644 (file)
@@ -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;
index 62b3be76e3aa55d75a77e6d5c543613aa95d9ed0..bbf5ea235c7af8595a57a7401e10a9eb8b1357d3 100644 (file)
@@ -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) {
index 415e0b4760c50fc50e5550a04b62b483df3bfca0..6d7e48fe51f8ba85963af3e16bd84c4fddc9bd54 100644 (file)
@@ -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) {
index 78ea874f2ce23adb9c975ea88f3647e528c22e31..c8beb4331bfa79a5476a2a84b043b6e866bea108 100644 (file)
@@ -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>
index 22e5164050e516f28f5f3d1b677aa7cfd635ceca..ea89e39010573b58eed2a63535df2b1cdef98eec 100644 (file)
@@ -2,8 +2,8 @@
 // License. See LICENSE.TXT for details.
 
 // Test with a leak.
-#include <cstdint>
 #include <cstddef>
+#include <cstdint>
 
 static volatile void *Sink;
 
index 4f31b3e52c1656e3fb77b43e54e112ac442b299d..92526194a508aff39604af9e582e4c874dc678d9 100644 (file)
@@ -2,8 +2,8 @@
 // License. See LICENSE.TXT for details.
 
 // Test with a leak.
-#include <cstdint>
 #include <cstddef>
+#include <cstdint>
 
 static volatile int *Sink;
 
index eef16c7be51eee4572d2c5f4b0dc1d1e0d75ce62..67a28c7cb22ffa57de463afd3f649b78c6b8a0de 100644 (file)
@@ -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;
index e81526b578a36ff66c58d78bca5361b023455fbf..5b6cb707173f214b18834644e6d9bfd63bb2fac0 100644 (file)
@@ -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[] =
index fdbf94683f765834f27fb6c88557a24819b572d3..8dbb7d84fbbaf355f06d203e0a4c5d3ea7dda20a 100644 (file)
@@ -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.
index ffe952c749d223e5bb3a2c4ede7ce3a04e1db982..91418990b1922b1807f553b69a1137e1c05eb495 100644 (file)
@@ -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;
index b43e69e51b256926c6d4a7331f7b0db5ff2a33cc..da5fbd33e9626e236fa36505eb40270763e5b128 100644 (file)
@@ -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;
index 153710920a5fd75bef1f164163f2b0edf6790d12..459db51f8a3b86ff177d7ab1338f36a5ca27ecfb 100644 (file)
@@ -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;
index 3f03d24981972def7237d12354f2c40218dd116a..1b44b682ace6887eaa24e386d5c8ebd3f0cd5beb 100644 (file)
@@ -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;
index 8d3d1d6d302dc753a52ffc4af6a36d58d79822f6..32a5578710008e1d8d97dfa2df4f245bb8711091 100644 (file)
@@ -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>
 
index 316b7682b8e60ca1148f16636ee24aca0d7f377c..a07795a08dffa589a14f4a01fd54401de9f8b208 100644 (file)
@@ -3,9 +3,9 @@
 
 // Tests OOM handling.
 #include <assert.h>
+#include <cstddef>
 #include <cstdint>
 #include <cstdlib>
-#include <cstddef>
 #include <cstring>
 #include <iostream>
 
index 078a39ee1fe94dc636dc77a6f01fa08723a95b35..5e59bde09853f44a535834dae6995f27ecfc1e02 100644 (file)
@@ -3,9 +3,9 @@
 
 // Tests OOM handling.
 #include <assert.h>
+#include <cstddef>
 #include <cstdint>
 #include <cstdlib>
-#include <cstddef>
 #include <cstring>
 #include <iostream>
 #include <thread>
index 2fa6c78c26d82b2efc3321e09ee3a0e7991c951d..14222f2847472e5bd56f6ed3937d51a7409108f4 100644 (file)
@@ -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) {
index 7377f65ed76de47fc3838ade8a05fc7a0f1b1f77..18369deac3b0085d16cef7f44caea876e850ffaf 100644 (file)
@@ -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;
index 0fd7c5e9a1fbf14f92f80e6df32a9dc141ae6e88..d095429636266d7d41dd237ab1f109ab4135ca65 100644 (file)
@@ -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;
 
index 026b8ce26591f3a26693b4ab8175c4bd08350713..86e4e3cb0d9ae0a6bff8e7fb3cdf83d062902fcf 100644 (file)
@@ -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;
 
index 7df32ad57933dde6fb5e975c3ccd34999729a26a..d80060207dee1ba00647488d7423ea584f03c23e 100644 (file)
@@ -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;
index 12b5cdda066076f1ed6b66522fb36b6e0aa46069..8acad4ac77e8fa338a7c8748166cf0f325a25192 100644 (file)
@@ -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[];
 
index cd7292bd006c8388c64e0f0018356b0596b2a4a8..a1cd200472249c3a3fb7866550322bad385694a7 100644 (file)
@@ -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>
 
index 00599de78ebed9ffc23c3febc514a21fa5853d52..99e96cb25dcd55551b136c7d27834cf2eb835ec0 100644 (file)
@@ -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
index e53ea160ed8fbf6731db58dae940e6a85b5a0427..a8b4988dff10ec31353b2f89ace9222ed4a9b88d 100644 (file)
@@ -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;
index 5f02d3f8457cb039b0fec01fc0bd416c4172611e..1abdc3fc6d6be3a6d6f4d3a6ce07766acecccc7a 100644 (file)
@@ -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>
index 4ce819d230cecd604a502c07859f263d22d257e3..72b58ba912eb3264df22ed150011ea72b4ca549c 100644 (file)
@@ -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) {
index c73f68a7ee6e278312ede3a4ccc6f06190ea33e8..83c09e0428ec1eec544e379302dc6f7148c58586 100644 (file)
@@ -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;
index 48f481dfc51aede37b56d2d5c6512e40bca83328..149073444c9cb2dbf7190444aed850656bd36ecd 100644 (file)
@@ -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) {
index e5601da86329959754d5ba183a37fb77766e9ad8..b302670fb743e614b7723946bbac4bab6f7e7f64 100644 (file)
@@ -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;
index d294d4dc53e0c4e7872892d7efe42311eaafd8f1..721134e1841c377979c6a6ad160c2fbfc025f0fb 100644 (file)
@@ -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) {
index cd91dda76f30d2f6d0d69b51a37d1947633ad2db..e7636e8812fcdd6d4bb8d3922dfce05dbb012db5 100644 (file)
@@ -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];
index f70b003afad65c760a8c23b9e53390fba8c3259d..4ed71d9d021dd561a52508bf5d70619cfc45b6af 100644 (file)
@@ -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;
index 5ffd011dcdfff834203c148a192bd0514cf700cc..f71f01ee3098ce11c4e825b3fee4290e7b999f68 100644 (file)
@@ -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;
 
index f021e75ec0fde915602ed73fbdcda676151a158a..a3ea4e03b3d2745abd50151898edcd1d0306deef 100644 (file)
@@ -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
index b90ac72c22c4b4c6843130defbb1b06b3e219e8e..bbfbefe6ab710836e5e8593641f973563f253223 100644 (file)
@@ -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;
index 3c6a3004907e143b3b7c04c7762f72043066e8dd..5f66ac8b499e6cfd37042cc07649c094b5addb1a 100644 (file)
@@ -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) {
index 3dc051ff7b5b109bd0eda1138906b5ed154c15b3..86944cad21c5fdf697585c6380fd93690ae6864c 100644 (file)
@@ -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;
 
index f9d5610820ff589217f76ef396c7f631ccfa0f43..8126eeabaf42956ff4f43f656a1de82f14beddd8 100644 (file)
@@ -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;
index 7511071108712aea04abdc5d1354f3158d1df847..538d3b434808ead5017dd0b1dc9b7968c0118657 100644 (file)
@@ -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;
index 09137a9a70c177abf36222fdddafb501e2abca74..bb51ba764ebaf68008bde72ad4a9d9df9d202d02 100644 (file)
@@ -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>
 
index 8066f480b655078092ed7df2667182a937e2bd58..1ddf1fa34589a57057236f986f363b2db04275fd 100644 (file)
@@ -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;
index f8107012c841f82202ce54882b7b10b09be7b01f..e3cdba3eec382132b2d477fd64c294319e27cba4 100644 (file)
@@ -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;
index 43e6950e185f3d7c7c7239d9f3c18cab8ff5cf3b..af9975603aa183504a1c1ec328d9c6165d1951b0 100644 (file)
@@ -3,9 +3,9 @@
 
 // Tests -trace_malloc
 #include <assert.h>
+#include <cstddef>
 #include <cstdint>
 #include <cstdlib>
-#include <cstddef>
 #include <iostream>
 
 int *Ptr;
index 42c0d192ba8669b99a38b3e8c1bc165eedc2249c..77d2cb1a25f9fe6a3e70f98b991c71c9507237f8 100644 (file)
@@ -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;