From 3e871fbc6c6432130a4196f2ca1b76376fcec1cb Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Tue, 6 Jun 2017 11:49:48 +0000 Subject: [PATCH] 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 --- lib/Fuzzer/FuzzerDriver.cpp | 2 +- lib/Fuzzer/FuzzerExtFunctionsDlsymWin.cpp | 2 +- lib/Fuzzer/FuzzerLoop.cpp | 2 +- lib/Fuzzer/FuzzerMerge.cpp | 4 ++-- lib/Fuzzer/FuzzerMutate.cpp | 2 +- lib/Fuzzer/FuzzerShmemPosix.cpp | 6 +++--- lib/Fuzzer/FuzzerShmemWindows.cpp | 4 ++-- lib/Fuzzer/FuzzerTracePC.cpp | 2 +- lib/Fuzzer/FuzzerTraceState.cpp | 2 +- lib/Fuzzer/FuzzerUtilWindows.cpp | 2 +- lib/Fuzzer/afl/afl_driver.cpp | 12 ++++++------ lib/Fuzzer/test/AFLDriverTest.cpp | 2 +- lib/Fuzzer/test/AbsNegAndConstant64Test.cpp | 6 +++--- lib/Fuzzer/test/AbsNegAndConstantTest.cpp | 6 +++--- lib/Fuzzer/test/AccumulateAllocationsTest.cpp | 2 +- lib/Fuzzer/test/BadStrcmpTest.cpp | 2 +- lib/Fuzzer/test/BufferOverflowOnInput.cpp | 2 +- lib/Fuzzer/test/CallerCalleeTest.cpp | 2 +- lib/Fuzzer/test/CleanseTest.cpp | 2 +- lib/Fuzzer/test/CustomMutatorTest.cpp | 2 +- lib/Fuzzer/test/CxxStringEqTest.cpp | 4 ++-- lib/Fuzzer/test/DSOTestMain.cpp | 2 +- lib/Fuzzer/test/DivTest.cpp | 2 +- lib/Fuzzer/test/FourIndependentBranchesTest.cpp | 2 +- lib/Fuzzer/test/FullCoverageSetTest.cpp | 2 +- lib/Fuzzer/test/FuzzerUnittest.cpp | 4 ++-- lib/Fuzzer/test/LeakTest.cpp | 2 +- lib/Fuzzer/test/LeakTimeoutTest.cpp | 2 +- lib/Fuzzer/test/LoadTest.cpp | 2 +- lib/Fuzzer/test/Memcmp64BytesTest.cpp | 2 +- lib/Fuzzer/test/MemcmpTest.cpp | 2 +- lib/Fuzzer/test/NotinstrumentedTest.cpp | 2 +- lib/Fuzzer/test/NthRunCrashTest.cpp | 2 +- lib/Fuzzer/test/NullDerefOnEmptyTest.cpp | 2 +- lib/Fuzzer/test/NullDerefTest.cpp | 2 +- lib/Fuzzer/test/OneHugeAllocTest.cpp | 2 +- lib/Fuzzer/test/OutOfMemorySingleLargeMallocTest.cpp | 2 +- lib/Fuzzer/test/OutOfMemoryTest.cpp | 2 +- lib/Fuzzer/test/RepeatedBytesTest.cpp | 2 +- lib/Fuzzer/test/RepeatedMemcmp.cpp | 3 +-- lib/Fuzzer/test/ShrinkControlFlowTest.cpp | 4 ++-- lib/Fuzzer/test/ShrinkValueProfileTest.cpp | 4 ++-- lib/Fuzzer/test/SignedIntOverflowTest.cpp | 4 ++-- lib/Fuzzer/test/SimpleCmpTest.cpp | 2 +- lib/Fuzzer/test/SimpleDictionaryTest.cpp | 2 +- lib/Fuzzer/test/SimpleHashTest.cpp | 2 +- lib/Fuzzer/test/SimpleTest.cpp | 2 +- lib/Fuzzer/test/SimpleThreadedTest.cpp | 2 +- lib/Fuzzer/test/SingleByteInputTest.cpp | 4 ++-- lib/Fuzzer/test/SingleMemcmpTest.cpp | 2 +- lib/Fuzzer/test/SingleStrcmpTest.cpp | 2 +- lib/Fuzzer/test/SingleStrncmpTest.cpp | 2 +- lib/Fuzzer/test/SpamyTest.cpp | 2 +- lib/Fuzzer/test/StrcmpTest.cpp | 4 ++-- lib/Fuzzer/test/StrncmpOOBTest.cpp | 4 ++-- lib/Fuzzer/test/StrncmpTest.cpp | 2 +- lib/Fuzzer/test/StrstrTest.cpp | 4 ++-- lib/Fuzzer/test/SwapCmpTest.cpp | 2 +- lib/Fuzzer/test/Switch2Test.cpp | 4 ++-- lib/Fuzzer/test/SwitchTest.cpp | 4 ++-- lib/Fuzzer/test/TableLookupTest.cpp | 4 ++-- lib/Fuzzer/test/ThreadedLeakTest.cpp | 2 +- lib/Fuzzer/test/ThreadedTest.cpp | 2 +- lib/Fuzzer/test/TimeoutEmptyTest.cpp | 2 +- lib/Fuzzer/test/TimeoutTest.cpp | 2 +- lib/Fuzzer/test/TraceMallocTest.cpp | 2 +- lib/Fuzzer/test/TwoDifferentBugsTest.cpp | 2 +- 67 files changed, 92 insertions(+), 93 deletions(-) diff --git a/lib/Fuzzer/FuzzerDriver.cpp b/lib/Fuzzer/FuzzerDriver.cpp index f9f8a80..9aad377 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 7752169..f6c7e07 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 14caa20..f608328 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 e66460c..612f4bb 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 e60d413..53cb902 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 2723bdd..50cdcfb 100644 --- a/lib/Fuzzer/FuzzerShmemPosix.cpp +++ b/lib/Fuzzer/FuzzerShmemPosix.cpp @@ -14,14 +14,14 @@ #include "FuzzerIO.h" #include "FuzzerShmem.h" -#include -#include #include #include -#include #include #include #include +#include +#include +#include #include namespace fuzzer { diff --git a/lib/Fuzzer/FuzzerShmemWindows.cpp b/lib/Fuzzer/FuzzerShmemWindows.cpp index 6325b4b..d330ebf 100644 --- a/lib/Fuzzer/FuzzerShmemWindows.cpp +++ b/lib/Fuzzer/FuzzerShmemWindows.cpp @@ -14,10 +14,10 @@ #include "FuzzerIO.h" #include "FuzzerShmem.h" -#include -#include #include #include +#include +#include namespace fuzzer { diff --git a/lib/Fuzzer/FuzzerTracePC.cpp b/lib/Fuzzer/FuzzerTracePC.cpp index ce0f7a4..ea93468 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 diff --git a/lib/Fuzzer/FuzzerTraceState.cpp b/lib/Fuzzer/FuzzerTraceState.cpp index a486223..8670e2a 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 diff --git a/lib/Fuzzer/FuzzerUtilWindows.cpp b/lib/Fuzzer/FuzzerUtilWindows.cpp index 08bb3cf..8d0678d 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 #include #include #include @@ -22,7 +23,6 @@ #include #include #include -#include namespace fuzzer { diff --git a/lib/Fuzzer/afl/afl_driver.cpp b/lib/Fuzzer/afl/afl_driver.cpp index 3815ed1..d0521bd 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 #include +#include 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 -#include +#include +#include #include +#include #include #include -#include -#include -#include #include #include +#include -#include #include +#include #include // Platform detection. Copied from FuzzerInternal.h diff --git a/lib/Fuzzer/test/AFLDriverTest.cpp b/lib/Fuzzer/test/AFLDriverTest.cpp index e3f5f71..b949adc 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 -#include #include +#include extern "C" void __afl_manual_init() {} diff --git a/lib/Fuzzer/test/AbsNegAndConstant64Test.cpp b/lib/Fuzzer/test/AbsNegAndConstant64Test.cpp index 69b0d59..dfb6007 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 -#include -#include #include +#include #include +#include +#include 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 69075a4..e9d983f 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 -#include -#include #include +#include #include +#include +#include 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 604d8fa..e9acd7c 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 #include +#include const int kAllocatedPointersSize = 10000; int NumAllocatedPointers = 0; diff --git a/lib/Fuzzer/test/BadStrcmpTest.cpp b/lib/Fuzzer/test/BadStrcmpTest.cpp index 159cd7e..ba2b068 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 #include #include -#include static volatile int Sink; diff --git a/lib/Fuzzer/test/BufferOverflowOnInput.cpp b/lib/Fuzzer/test/BufferOverflowOnInput.cpp index b9d1405..75e1fb9 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 +#include #include #include -#include #include static volatile bool SeedLargeBuffer; diff --git a/lib/Fuzzer/test/CallerCalleeTest.cpp b/lib/Fuzzer/test/CallerCalleeTest.cpp index 3ec025d..ed9f37c 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 #include #include -#include #include #include diff --git a/lib/Fuzzer/test/CleanseTest.cpp b/lib/Fuzzer/test/CleanseTest.cpp index faea8dc..ee18457 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 #include #include -#include 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 4f84519..521d7f5 100644 --- a/lib/Fuzzer/test/CustomMutatorTest.cpp +++ b/lib/Fuzzer/test/CustomMutatorTest.cpp @@ -3,9 +3,9 @@ // Simple test for a cutom mutator. #include +#include #include #include -#include #include #include "FuzzerInterface.h" diff --git a/lib/Fuzzer/test/CxxStringEqTest.cpp b/lib/Fuzzer/test/CxxStringEqTest.cpp index e0e23c9..924851c 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 #include #include -#include -#include #include +#include static volatile int Sink; diff --git a/lib/Fuzzer/test/DSOTestMain.cpp b/lib/Fuzzer/test/DSOTestMain.cpp index 3e225d8..e0c857d 100644 --- a/lib/Fuzzer/test/DSOTestMain.cpp +++ b/lib/Fuzzer/test/DSOTestMain.cpp @@ -4,9 +4,9 @@ // Source code for a simple DSO. #include +#include #include #include -#include 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 63f6960..bce13fe 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 +#include #include #include -#include #include static volatile int Sink; diff --git a/lib/Fuzzer/test/FourIndependentBranchesTest.cpp b/lib/Fuzzer/test/FourIndependentBranchesTest.cpp index 62b3be7..bbf5ea2 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 #include #include -#include #include 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 415e0b4..6d7e48f 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 #include #include -#include #include 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 78ea874..c8beb43 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 #include diff --git a/lib/Fuzzer/test/LeakTest.cpp b/lib/Fuzzer/test/LeakTest.cpp index 22e5164..ea89e39 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 #include +#include static volatile void *Sink; diff --git a/lib/Fuzzer/test/LeakTimeoutTest.cpp b/lib/Fuzzer/test/LeakTimeoutTest.cpp index 4f31b3e..9252619 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 #include +#include static volatile int *Sink; diff --git a/lib/Fuzzer/test/LoadTest.cpp b/lib/Fuzzer/test/LoadTest.cpp index eef16c7..67a28c7 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 +#include #include #include -#include #include static volatile int Sink; diff --git a/lib/Fuzzer/test/Memcmp64BytesTest.cpp b/lib/Fuzzer/test/Memcmp64BytesTest.cpp index e81526b..5b6cb70 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 -#include #include #include #include +#include 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 fdbf946..8dbb7d8 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 #include #include #include +#include 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 ffe952c..9141899 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 #include +#include 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 b43e69e..da5fbd3 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 #include +#include #include static int Counter; diff --git a/lib/Fuzzer/test/NullDerefOnEmptyTest.cpp b/lib/Fuzzer/test/NullDerefOnEmptyTest.cpp index 1537109..459db51 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 #include #include -#include #include static volatile int *Null = 0; diff --git a/lib/Fuzzer/test/NullDerefTest.cpp b/lib/Fuzzer/test/NullDerefTest.cpp index 3f03d24..1b44b68 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 #include #include -#include #include static volatile int Sink; diff --git a/lib/Fuzzer/test/OneHugeAllocTest.cpp b/lib/Fuzzer/test/OneHugeAllocTest.cpp index 8d3d1d6..32a5578 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 +#include #include #include -#include #include #include diff --git a/lib/Fuzzer/test/OutOfMemorySingleLargeMallocTest.cpp b/lib/Fuzzer/test/OutOfMemorySingleLargeMallocTest.cpp index 316b768..a07795a 100644 --- a/lib/Fuzzer/test/OutOfMemorySingleLargeMallocTest.cpp +++ b/lib/Fuzzer/test/OutOfMemorySingleLargeMallocTest.cpp @@ -3,9 +3,9 @@ // Tests OOM handling. #include +#include #include #include -#include #include #include diff --git a/lib/Fuzzer/test/OutOfMemoryTest.cpp b/lib/Fuzzer/test/OutOfMemoryTest.cpp index 078a39e..5e59bde 100644 --- a/lib/Fuzzer/test/OutOfMemoryTest.cpp +++ b/lib/Fuzzer/test/OutOfMemoryTest.cpp @@ -3,9 +3,9 @@ // Tests OOM handling. #include +#include #include #include -#include #include #include #include diff --git a/lib/Fuzzer/test/RepeatedBytesTest.cpp b/lib/Fuzzer/test/RepeatedBytesTest.cpp index 2fa6c78..14222f2 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 +#include #include #include -#include #include 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 7377f65..18369de 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 #include #include #include +#include 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 0fd7c5e..d095429 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 #include +#include #include -#include #include -#include static volatile int Sink; diff --git a/lib/Fuzzer/test/ShrinkValueProfileTest.cpp b/lib/Fuzzer/test/ShrinkValueProfileTest.cpp index 026b8ce..86e4e3c 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 #include +#include #include -#include #include -#include static volatile uint32_t Sink; diff --git a/lib/Fuzzer/test/SignedIntOverflowTest.cpp b/lib/Fuzzer/test/SignedIntOverflowTest.cpp index 7df32ad..d800602 100644 --- a/lib/Fuzzer/test/SignedIntOverflowTest.cpp +++ b/lib/Fuzzer/test/SignedIntOverflowTest.cpp @@ -3,11 +3,11 @@ // Test for signed-integer-overflow. #include +#include +#include #include #include -#include #include -#include static volatile int Sink; static int Large = INT_MAX; diff --git a/lib/Fuzzer/test/SimpleCmpTest.cpp b/lib/Fuzzer/test/SimpleCmpTest.cpp index 12b5cdd..8acad4a 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 +#include #include #include -#include extern int AllLines[]; diff --git a/lib/Fuzzer/test/SimpleDictionaryTest.cpp b/lib/Fuzzer/test/SimpleDictionaryTest.cpp index cd7292b..a1cd200 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 #include #include -#include #include #include diff --git a/lib/Fuzzer/test/SimpleHashTest.cpp b/lib/Fuzzer/test/SimpleHashTest.cpp index 00599de..99e96cb 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 +#include #include #include -#include // 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 e53ea16..a8b4988 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 +#include #include #include -#include #include static volatile int Sink; diff --git a/lib/Fuzzer/test/SimpleThreadedTest.cpp b/lib/Fuzzer/test/SimpleThreadedTest.cpp index 5f02d3f..1abdc3f 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 -#include #include +#include #include #include #include diff --git a/lib/Fuzzer/test/SingleByteInputTest.cpp b/lib/Fuzzer/test/SingleByteInputTest.cpp index 4ce819d..72b58ba 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 -#include #include +#include #include +#include 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 c73f68a..83c09e0 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 #include #include #include +#include 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 48f481d..1490734 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 #include #include #include +#include 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 e5601da..b302670 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 #include #include #include +#include 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 d294d4d..721134e 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 +#include #include #include -#include #include 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 cd91dda..e7636e8 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 +#include #include #include #include -#include +#include 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 f70b003..4ed71d9 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 +#include #include -#include #include -#include +#include #include static volatile int Sink; diff --git a/lib/Fuzzer/test/StrncmpTest.cpp b/lib/Fuzzer/test/StrncmpTest.cpp index 5ffd011..f71f01e 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 #include #include #include +#include static volatile int sink; diff --git a/lib/Fuzzer/test/StrstrTest.cpp b/lib/Fuzzer/test/StrstrTest.cpp index f021e75..a3ea4e0 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 -#include #include #include #include +#include +#include // 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 b90ac72..bbfbefe 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 +#include #include #include -#include 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 3c6a300..5f66ac8 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 #include -#include #include +#include #include -#include int Switch(int a) { switch(a) { diff --git a/lib/Fuzzer/test/SwitchTest.cpp b/lib/Fuzzer/test/SwitchTest.cpp index 3dc051f..86944ca 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 #include -#include #include +#include #include -#include static volatile int Sink; diff --git a/lib/Fuzzer/test/TableLookupTest.cpp b/lib/Fuzzer/test/TableLookupTest.cpp index f9d5610..8126eea 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 +#include #include #include #include -#include +#include #include const size_t N = 1 << 12; diff --git a/lib/Fuzzer/test/ThreadedLeakTest.cpp b/lib/Fuzzer/test/ThreadedLeakTest.cpp index 7511071..538d3b4 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 #include +#include #include static volatile int *Sink; diff --git a/lib/Fuzzer/test/ThreadedTest.cpp b/lib/Fuzzer/test/ThreadedTest.cpp index 09137a9..bb51ba7 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 -#include #include +#include #include #include diff --git a/lib/Fuzzer/test/TimeoutEmptyTest.cpp b/lib/Fuzzer/test/TimeoutEmptyTest.cpp index 8066f48..1ddf1fa 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 #include +#include 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 f810701..e3cdba3 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 #include #include -#include #include static volatile int Sink; diff --git a/lib/Fuzzer/test/TraceMallocTest.cpp b/lib/Fuzzer/test/TraceMallocTest.cpp index 43e6950..af99756 100644 --- a/lib/Fuzzer/test/TraceMallocTest.cpp +++ b/lib/Fuzzer/test/TraceMallocTest.cpp @@ -3,9 +3,9 @@ // Tests -trace_malloc #include +#include #include #include -#include #include int *Ptr; diff --git a/lib/Fuzzer/test/TwoDifferentBugsTest.cpp b/lib/Fuzzer/test/TwoDifferentBugsTest.cpp index 42c0d19..77d2cb1 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 #include #include -#include #include static volatile int *Null = 0; -- 2.34.1