diff options
30 files changed, 36 insertions, 47 deletions
diff --git a/clang-tools-extra/clang-apply-replacements/include/clang-apply-replacements/Tooling/ApplyReplacements.h b/clang-tools-extra/clang-apply-replacements/include/clang-apply-replacements/Tooling/ApplyReplacements.h index e90b3b30b4e..8589fdb8dbc 100644 --- a/clang-tools-extra/clang-apply-replacements/include/clang-apply-replacements/Tooling/ApplyReplacements.h +++ b/clang-tools-extra/clang-apply-replacements/include/clang-apply-replacements/Tooling/ApplyReplacements.h @@ -20,8 +20,8 @@ #include "llvm/ADT/StringMap.h" #include "llvm/ADT/StringRef.h" #include "llvm/Support/system_error.h" -#include <vector> #include <string> +#include <vector> namespace clang { diff --git a/clang-tools-extra/clang-modernize/AddOverride/AddOverride.cpp b/clang-tools-extra/clang-modernize/AddOverride/AddOverride.cpp index 80165d45481..f2e9a9871df 100644 --- a/clang-tools-extra/clang-modernize/AddOverride/AddOverride.cpp +++ b/clang-tools-extra/clang-modernize/AddOverride/AddOverride.cpp @@ -16,7 +16,6 @@ #include "AddOverride.h" #include "AddOverrideActions.h" #include "AddOverrideMatchers.h" - #include "clang/Frontend/CompilerInstance.h" using clang::ast_matchers::MatchFinder; diff --git a/clang-tools-extra/clang-modernize/AddOverride/AddOverrideActions.cpp b/clang-tools-extra/clang-modernize/AddOverride/AddOverrideActions.cpp index 134318ed386..eec6cf40140 100644 --- a/clang-tools-extra/clang-modernize/AddOverride/AddOverrideActions.cpp +++ b/clang-tools-extra/clang-modernize/AddOverride/AddOverrideActions.cpp @@ -16,11 +16,10 @@ #include "AddOverrideActions.h" #include "AddOverrideMatchers.h" #include "Core/Transform.h" - -#include "clang/Basic/CharInfo.h" #include "clang/AST/ASTContext.h" #include "clang/AST/Attr.h" #include "clang/AST/RecursiveASTVisitor.h" +#include "clang/Basic/CharInfo.h" #include "clang/Lex/Lexer.h" #include "clang/Lex/Preprocessor.h" diff --git a/clang-tools-extra/clang-modernize/Core/IncludeDirectives.h b/clang-tools-extra/clang-modernize/Core/IncludeDirectives.h index d611cafc59d..b2dcbb46f79 100644 --- a/clang-tools-extra/clang-modernize/Core/IncludeDirectives.h +++ b/clang-tools-extra/clang-modernize/Core/IncludeDirectives.h @@ -19,8 +19,8 @@ #include "clang/Basic/SourceLocation.h" #include "clang/Tooling/Refactoring.h" #include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/StringRef.h" #include "llvm/ADT/SmallPtrSet.h" +#include "llvm/ADT/StringRef.h" #include <vector> namespace clang { diff --git a/clang-tools-extra/clang-modernize/Core/PerfSupport.cpp b/clang-tools-extra/clang-modernize/Core/PerfSupport.cpp index e074bd123ef..2554cfab4b7 100644 --- a/clang-tools-extra/clang-modernize/Core/PerfSupport.cpp +++ b/clang-tools-extra/clang-modernize/Core/PerfSupport.cpp @@ -15,9 +15,9 @@ #include "PerfSupport.h" #include "llvm/Support/FileSystem.h" #include "llvm/Support/Format.h" -#include "llvm/Support/raw_ostream.h" -#include "llvm/Support/Process.h" #include "llvm/Support/Path.h" +#include "llvm/Support/Process.h" +#include "llvm/Support/raw_ostream.h" void collectSourcePerfData(const Transform &T, SourcePerfData &Data) { for (Transform::TimingVec::const_iterator I = T.timing_begin(), diff --git a/clang-tools-extra/clang-modernize/Core/PerfSupport.h b/clang-tools-extra/clang-modernize/Core/PerfSupport.h index 19556e06d70..d16c0d68f44 100644 --- a/clang-tools-extra/clang-modernize/Core/PerfSupport.h +++ b/clang-tools-extra/clang-modernize/Core/PerfSupport.h @@ -18,7 +18,6 @@ #include "Transform.h" #include "llvm/ADT/StringRef.h" - #include <map> #include <vector> diff --git a/clang-tools-extra/clang-modernize/Core/ReplacementHandling.h b/clang-tools-extra/clang-modernize/Core/ReplacementHandling.h index dc718d84def..54b9655eefd 100644 --- a/clang-tools-extra/clang-modernize/Core/ReplacementHandling.h +++ b/clang-tools-extra/clang-modernize/Core/ReplacementHandling.h @@ -16,8 +16,8 @@ #ifndef CLANG_MODERNIZE_REPLACEMENTHANDLING_H #define CLANG_MODERNIZE_REPLACEMENTHANDLING_H -#include "llvm/ADT/StringRef.h" #include "Core/Transform.h" +#include "llvm/ADT/StringRef.h" class ReplacementHandling { public: diff --git a/clang-tools-extra/clang-modernize/Core/Transforms.h b/clang-tools-extra/clang-modernize/Core/Transforms.h index 5b9b98c107c..545a16d37bd 100644 --- a/clang-tools-extra/clang-modernize/Core/Transforms.h +++ b/clang-tools-extra/clang-modernize/Core/Transforms.h @@ -17,9 +17,8 @@ #ifndef CLANG_MODERNIZE_TRANSFORMS_H #define CLANG_MODERNIZE_TRANSFORMS_H -#include "llvm/Support/CommandLine.h" #include "llvm/ADT/StringRef.h" - +#include "llvm/Support/CommandLine.h" #include <vector> // Forward declarations diff --git a/clang-tools-extra/clang-modernize/LoopConvert/LoopActions.h b/clang-tools-extra/clang-modernize/LoopConvert/LoopActions.h index db37561fb9e..dfb05a7c97e 100644 --- a/clang-tools-extra/clang-modernize/LoopConvert/LoopActions.h +++ b/clang-tools-extra/clang-modernize/LoopConvert/LoopActions.h @@ -16,8 +16,8 @@ #ifndef CLANG_MODERNIZE_LOOP_ACTIONS_H #define CLANG_MODERNIZE_LOOP_ACTIONS_H -#include "StmtAncestor.h" #include "Core/Transform.h" +#include "StmtAncestor.h" #include "clang/AST/ASTContext.h" #include "clang/AST/RecursiveASTVisitor.h" #include "clang/ASTMatchers/ASTMatchFinder.h" diff --git a/clang-tools-extra/clang-modernize/PassByValue/PassByValue.h b/clang-tools-extra/clang-modernize/PassByValue/PassByValue.h index e604459f037..c47bfe12d0b 100644 --- a/clang-tools-extra/clang-modernize/PassByValue/PassByValue.h +++ b/clang-tools-extra/clang-modernize/PassByValue/PassByValue.h @@ -16,8 +16,8 @@ #ifndef CLANG_MODERNIZE_PASS_BY_VALUE_H #define CLANG_MODERNIZE_PASS_BY_VALUE_H -#include "Core/Transform.h" #include "Core/IncludeDirectives.h" +#include "Core/Transform.h" class ConstructorParamReplacer; diff --git a/clang-tools-extra/clang-modernize/PassByValue/PassByValueActions.cpp b/clang-tools-extra/clang-modernize/PassByValue/PassByValueActions.cpp index 36ddee57387..872d69fe4bb 100644 --- a/clang-tools-extra/clang-modernize/PassByValue/PassByValueActions.cpp +++ b/clang-tools-extra/clang-modernize/PassByValue/PassByValueActions.cpp @@ -14,9 +14,9 @@ //===----------------------------------------------------------------------===// #include "PassByValueActions.h" -#include "PassByValueMatchers.h" #include "Core/IncludeDirectives.h" #include "Core/Transform.h" +#include "PassByValueMatchers.h" #include "clang/AST/RecursiveASTVisitor.h" #include "clang/Basic/SourceManager.h" #include "clang/Lex/Lexer.h" diff --git a/clang-tools-extra/clang-modernize/ReplaceAutoPtr/ReplaceAutoPtrActions.cpp b/clang-tools-extra/clang-modernize/ReplaceAutoPtr/ReplaceAutoPtrActions.cpp index 2074e3764bb..08792645eb9 100644 --- a/clang-tools-extra/clang-modernize/ReplaceAutoPtr/ReplaceAutoPtrActions.cpp +++ b/clang-tools-extra/clang-modernize/ReplaceAutoPtr/ReplaceAutoPtrActions.cpp @@ -14,9 +14,8 @@ //===----------------------------------------------------------------------===// #include "ReplaceAutoPtrActions.h" -#include "ReplaceAutoPtrMatchers.h" #include "Core/Transform.h" - +#include "ReplaceAutoPtrMatchers.h" #include "clang/AST/ASTContext.h" #include "clang/Lex/Lexer.h" diff --git a/clang-tools-extra/clang-modernize/UseNullptr/NullptrActions.cpp b/clang-tools-extra/clang-modernize/UseNullptr/NullptrActions.cpp index 1aca261a7f3..c37ef455c3b 100644 --- a/clang-tools-extra/clang-modernize/UseNullptr/NullptrActions.cpp +++ b/clang-tools-extra/clang-modernize/UseNullptr/NullptrActions.cpp @@ -16,10 +16,8 @@ #include "NullptrActions.h" #include "NullptrMatchers.h" - #include "clang/AST/ASTContext.h" #include "clang/AST/RecursiveASTVisitor.h" - #include "clang/Basic/CharInfo.h" #include "clang/Lex/Lexer.h" diff --git a/clang-tools-extra/clang-query/Query.h b/clang-tools-extra/clang-query/Query.h index 4c8941723b5..eeeb1b95988 100644 --- a/clang-tools-extra/clang-query/Query.h +++ b/clang-tools-extra/clang-query/Query.h @@ -10,10 +10,10 @@ #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_QUERY_QUERY_H #define LLVM_CLANG_TOOLS_EXTRA_CLANG_QUERY_QUERY_H -#include <string> #include "clang/ASTMatchers/Dynamic/VariantValue.h" #include "llvm/ADT/IntrusiveRefCntPtr.h" #include "llvm/ADT/Optional.h" +#include <string> namespace clang { namespace query { diff --git a/clang-tools-extra/clang-query/QueryParser.cpp b/clang-tools-extra/clang-query/QueryParser.cpp index 7a93e3bfa8c..9ef6c23344c 100644 --- a/clang-tools-extra/clang-query/QueryParser.cpp +++ b/clang-tools-extra/clang-query/QueryParser.cpp @@ -10,10 +10,10 @@ #include "QueryParser.h" #include "Query.h" #include "QuerySession.h" -#include "llvm/ADT/StringRef.h" -#include "llvm/ADT/StringSwitch.h" #include "clang/ASTMatchers/Dynamic/Parser.h" #include "clang/Basic/CharInfo.h" +#include "llvm/ADT/StringRef.h" +#include "llvm/ADT/StringSwitch.h" using namespace llvm; using namespace clang::ast_matchers::dynamic; diff --git a/clang-tools-extra/clang-query/QuerySession.h b/clang-tools-extra/clang-query/QuerySession.h index 002b2b56db5..fdbd9eae018 100644 --- a/clang-tools-extra/clang-query/QuerySession.h +++ b/clang-tools-extra/clang-query/QuerySession.h @@ -10,8 +10,8 @@ #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_QUERY_QUERY_SESSION_H #define LLVM_CLANG_TOOLS_EXTRA_CLANG_QUERY_QUERY_SESSION_H -#include "llvm/ADT/ArrayRef.h" #include "Query.h" +#include "llvm/ADT/ArrayRef.h" namespace clang { diff --git a/clang-tools-extra/clang-query/tool/ClangQuery.cpp b/clang-tools-extra/clang-query/tool/ClangQuery.cpp index d8b411b43bd..bac86b0c372 100644 --- a/clang-tools-extra/clang-query/tool/ClangQuery.cpp +++ b/clang-tools-extra/clang-query/tool/ClangQuery.cpp @@ -27,9 +27,8 @@ //===----------------------------------------------------------------------===// #include "Query.h" -#include "QuerySession.h" #include "QueryParser.h" - +#include "QuerySession.h" #include "clang/Frontend/ASTUnit.h" #include "clang/Tooling/CompilationDatabase.h" #include "clang/Tooling/Tooling.h" @@ -38,9 +37,8 @@ #include "llvm/Support/MemoryBuffer.h" #include "llvm/Support/Signals.h" #include <fstream> -#include <string> - #include <histedit.h> +#include <string> using namespace clang; using namespace clang::ast_matchers; diff --git a/clang-tools-extra/clang-tidy/ClangTidy.cpp b/clang-tools-extra/clang-tidy/ClangTidy.cpp index bb7b456ef5d..e465c6cbbfd 100644 --- a/clang-tools-extra/clang-tidy/ClangTidy.cpp +++ b/clang-tools-extra/clang-tidy/ClangTidy.cpp @@ -22,18 +22,18 @@ #include "clang/AST/ASTContext.h" #include "clang/AST/Decl.h" #include "clang/ASTMatchers/ASTMatchFinder.h" -#include "clang/Lex/PPCallbacks.h" -#include "clang/Lex/Preprocessor.h" #include "clang/Frontend/ASTConsumers.h" #include "clang/Frontend/CompilerInstance.h" #include "clang/Frontend/FrontendActions.h" #include "clang/Frontend/MultiplexConsumer.h" #include "clang/Frontend/TextDiagnosticPrinter.h" +#include "clang/Lex/PPCallbacks.h" +#include "clang/Lex/Preprocessor.h" #include "clang/Rewrite/Frontend/FixItRewriter.h" #include "clang/Rewrite/Frontend/FrontendActions.h" #include "clang/StaticAnalyzer/Frontend/AnalysisConsumer.h" -#include "clang/Tooling/Tooling.h" #include "clang/Tooling/Refactoring.h" +#include "clang/Tooling/Tooling.h" #include "llvm/Support/Path.h" #include "llvm/Support/Signals.h" #include <algorithm> diff --git a/clang-tools-extra/clang-tidy/ClangTidy.h b/clang-tools-extra/clang-tidy/ClangTidy.h index 677e6e9c9f4..16889bff80a 100644 --- a/clang-tools-extra/clang-tidy/ClangTidy.h +++ b/clang-tools-extra/clang-tidy/ClangTidy.h @@ -10,11 +10,11 @@ #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CLANG_TIDY_H #define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CLANG_TIDY_H +#include "ClangTidyDiagnosticConsumer.h" #include "clang/ASTMatchers/ASTMatchFinder.h" #include "clang/Basic/Diagnostic.h" #include "clang/Basic/SourceManager.h" #include "clang/Tooling/Refactoring.h" -#include "ClangTidyDiagnosticConsumer.h" namespace clang { diff --git a/clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp b/clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp index 0839a06df55..bf1e3e38a3a 100644 --- a/clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp +++ b/clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp @@ -12,11 +12,11 @@ #include "../ClangTidyModule.h" #include "../ClangTidyModuleRegistry.h" #include "clang/AST/ASTContext.h" -#include "clang/ASTMatchers/ASTMatchers.h" #include "clang/ASTMatchers/ASTMatchFinder.h" +#include "clang/ASTMatchers/ASTMatchers.h" #include "clang/Frontend/CompilerInstance.h" -#include "clang/Lex/Preprocessor.h" #include "clang/Lex/PPCallbacks.h" +#include "clang/Lex/Preprocessor.h" #include "llvm/Support/raw_ostream.h" using namespace clang::ast_matchers; diff --git a/clang-tools-extra/clang-tidy/llvm/LLVMTidyModule.cpp b/clang-tools-extra/clang-tidy/llvm/LLVMTidyModule.cpp index cd33a51705e..ec1e779a8e8 100644 --- a/clang-tools-extra/clang-tidy/llvm/LLVMTidyModule.cpp +++ b/clang-tools-extra/clang-tidy/llvm/LLVMTidyModule.cpp @@ -12,11 +12,11 @@ #include "../ClangTidyModule.h" #include "../ClangTidyModuleRegistry.h" #include "clang/AST/ASTContext.h" -#include "clang/ASTMatchers/ASTMatchers.h" #include "clang/ASTMatchers/ASTMatchFinder.h" +#include "clang/ASTMatchers/ASTMatchers.h" #include "clang/Frontend/CompilerInstance.h" -#include "clang/Lex/Preprocessor.h" #include "clang/Lex/PPCallbacks.h" +#include "clang/Lex/Preprocessor.h" #include "llvm/Support/raw_ostream.h" using namespace clang::ast_matchers; diff --git a/clang-tools-extra/modularize/Modularize.cpp b/clang-tools-extra/modularize/Modularize.cpp index 13c036506c6..7619cb1f962 100644 --- a/clang-tools-extra/modularize/Modularize.cpp +++ b/clang-tools-extra/modularize/Modularize.cpp @@ -143,6 +143,8 @@ //===----------------------------------------------------------------------===// #include "clang/AST/ASTConsumer.h" +#include "Modularize.h" +#include "PreprocessorTracker.h" #include "clang/AST/ASTContext.h" #include "clang/AST/RecursiveASTVisitor.h" #include "clang/Basic/SourceManager.h" @@ -167,8 +169,6 @@ #include <iterator> #include <string> #include <vector> -#include "Modularize.h" -#include "PreprocessorTracker.h" using namespace clang; using namespace clang::driver; diff --git a/clang-tools-extra/modularize/PreprocessorTracker.cpp b/clang-tools-extra/modularize/PreprocessorTracker.cpp index 9562a1cac72..22989ee41d4 100644 --- a/clang-tools-extra/modularize/PreprocessorTracker.cpp +++ b/clang-tools-extra/modularize/PreprocessorTracker.cpp @@ -245,12 +245,12 @@ //===--------------------------------------------------------------------===// #include "clang/Lex/LexDiagnostic.h" +#include "PreprocessorTracker.h" #include "clang/Lex/MacroArgs.h" #include "clang/Lex/PPCallbacks.h" -#include "llvm/Support/raw_ostream.h" -#include "llvm/Support/StringPool.h" #include "llvm/ADT/SmallSet.h" -#include "PreprocessorTracker.h" +#include "llvm/Support/StringPool.h" +#include "llvm/Support/raw_ostream.h" namespace Modularize { diff --git a/clang-tools-extra/module-map-checker/ModuleMapChecker.cpp b/clang-tools-extra/module-map-checker/ModuleMapChecker.cpp index 36217d58862..2ac752562a9 100644 --- a/clang-tools-extra/module-map-checker/ModuleMapChecker.cpp +++ b/clang-tools-extra/module-map-checker/ModuleMapChecker.cpp @@ -73,6 +73,7 @@ //===----------------------------------------------------------------------===// #include "clang/AST/ASTConsumer.h" +#include "ModuleMapChecker.h" #include "clang/AST/ASTContext.h" #include "clang/AST/RecursiveASTVisitor.h" #include "clang/Basic/SourceManager.h" @@ -88,7 +89,6 @@ #include "llvm/Support/FileSystem.h" #include "llvm/Support/Path.h" #include "llvm/Support/raw_ostream.h" -#include "ModuleMapChecker.h" using namespace clang; using namespace clang::driver; diff --git a/clang-tools-extra/unittests/clang-apply-replacements/ReformattingTest.cpp b/clang-tools-extra/unittests/clang-apply-replacements/ReformattingTest.cpp index e16308223c9..6d638b523c2 100644 --- a/clang-tools-extra/unittests/clang-apply-replacements/ReformattingTest.cpp +++ b/clang-tools-extra/unittests/clang-apply-replacements/ReformattingTest.cpp @@ -8,9 +8,9 @@ //===----------------------------------------------------------------------===// #include "clang-apply-replacements/Tooling/ApplyReplacements.h" +#include "common/VirtualFileHelper.h" #include "clang/Format/Format.h" #include "clang/Tooling/Refactoring.h" -#include "common/VirtualFileHelper.h" #include "gtest/gtest.h" using namespace clang; diff --git a/clang-tools-extra/unittests/clang-modernize/IncludeDirectivesTest.cpp b/clang-tools-extra/unittests/clang-modernize/IncludeDirectivesTest.cpp index b6ad4af6876..d81ae1deecf 100644 --- a/clang-tools-extra/unittests/clang-modernize/IncludeDirectivesTest.cpp +++ b/clang-tools-extra/unittests/clang-modernize/IncludeDirectivesTest.cpp @@ -8,11 +8,11 @@ //===----------------------------------------------------------------------===// #include "Core/IncludeDirectives.h" -#include "gtest/gtest.h" #include "common/VirtualFileHelper.h" #include "clang/Frontend/CompilerInstance.h" #include "clang/Frontend/FrontendActions.h" #include "llvm/Support/Path.h" +#include "gtest/gtest.h" using namespace llvm; using namespace clang; diff --git a/clang-tools-extra/unittests/clang-modernize/IncludeExcludeTest.cpp b/clang-tools-extra/unittests/clang-modernize/IncludeExcludeTest.cpp index dd41cdfce1a..232a47aac88 100644 --- a/clang-tools-extra/unittests/clang-modernize/IncludeExcludeTest.cpp +++ b/clang-tools-extra/unittests/clang-modernize/IncludeExcludeTest.cpp @@ -9,9 +9,9 @@ #include "common/Utility.h" #include "Core/IncludeExcludeInfo.h" -#include "gtest/gtest.h" #include "llvm/Support/FileSystem.h" #include "llvm/Support/Path.h" +#include "gtest/gtest.h" #include <fstream> TEST(IncludeExcludeTest, ParseString) { diff --git a/clang-tools-extra/unittests/clang-modernize/TransformTest.cpp b/clang-tools-extra/unittests/clang-modernize/TransformTest.cpp index 5e5093a27ac..fe86f9431cd 100644 --- a/clang-tools-extra/unittests/clang-modernize/TransformTest.cpp +++ b/clang-tools-extra/unittests/clang-modernize/TransformTest.cpp @@ -11,11 +11,11 @@ #include "Core/Transform.h" #include "clang/AST/ASTConsumer.h" #include "clang/AST/DeclGroup.h" -#include "clang/ASTMatchers/ASTMatchers.h" #include "clang/ASTMatchers/ASTMatchFinder.h" +#include "clang/ASTMatchers/ASTMatchers.h" #include "llvm/Support/FileSystem.h" -#include "llvm/Support/Process.h" #include "llvm/Support/Path.h" +#include "llvm/Support/Process.h" using namespace clang; using namespace ast_matchers; diff --git a/clang-tools-extra/unittests/clang-tidy/GoogleModuleTest.cpp b/clang-tools-extra/unittests/clang-tidy/GoogleModuleTest.cpp index 26b85b929d6..4d340433316 100644 --- a/clang-tools-extra/unittests/clang-tidy/GoogleModuleTest.cpp +++ b/clang-tools-extra/unittests/clang-tidy/GoogleModuleTest.cpp @@ -1,5 +1,4 @@ #include "ClangTidyTest.h" - #include "google/GoogleTidyModule.h" namespace clang { diff --git a/clang-tools-extra/unittests/clang-tidy/LLVMModuleTest.cpp b/clang-tools-extra/unittests/clang-tidy/LLVMModuleTest.cpp index da1d9e0db91..4de31aa72de 100644 --- a/clang-tools-extra/unittests/clang-tidy/LLVMModuleTest.cpp +++ b/clang-tools-extra/unittests/clang-tidy/LLVMModuleTest.cpp @@ -1,5 +1,4 @@ #include "ClangTidyTest.h" - #include "llvm/LLVMTidyModule.h" namespace clang { |