diff --git a/clang-tools-extra/clangd/Function.h b/clang-tools-extra/clangd/Function.h --- a/clang-tools-extra/clangd/Function.h +++ b/clang-tools-extra/clangd/Function.h @@ -10,8 +10,8 @@ // //===----------------------------------------------------------------------===// -#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_FUNCTION_H -#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_FUNCTION_H +#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_FUN +#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_FUN #include "llvm/ADT/FunctionExtras.h" #include "llvm/Support/Error.h" @@ -103,6 +103,6 @@ }; } // namespace clangd -} // namespace clang +} // namespace clangg #endif diff --git a/clang/include/clang/Analysis/AnalysisDeclContext.h b/clang/include/clang/Analysis/AnalysisDeclContext.h --- a/clang/include/clang/Analysis/AnalysisDeclContext.h +++ b/clang/include/clang/Analysis/AnalysisDeclContext.h @@ -11,9 +11,6 @@ // //===----------------------------------------------------------------------===// -#ifndef LLVM_CLANG_ANALYSIS_ANALYSISDECLCONTEXT_H -#define LLVM_CLANG_ANALYSIS_ANALYSISDECLCONTEXT_H - #include "clang/AST/DeclBase.h" #include "clang/Analysis/BodyFarm.h" #include "clang/Analysis/CFG.h" @@ -522,6 +519,4 @@ } }; -} // namespace clang - -#endif // LLVM_CLANG_ANALYSIS_ANALYSISDECLCONTEXT_H +} diff --git a/clang/tools/clang-check/ClangCheck.cpp b/clang/tools/clang-check/ClangCheck.cpp --- a/clang/tools/clang-check/ClangCheck.cpp +++ b/clang/tools/clang-check/ClangCheck.cpp @@ -17,10 +17,10 @@ #include "clang/AST/ASTConsumer.h" #include "clang/CodeGen/ObjectFilePCHContainerOperations.h" -#include "clang/Driver/Options.h" #include "clang/Frontend/ASTConsumers.h" #include "clang/Frontend/CompilerInstance.h" #include "clang/Rewrite/Frontend/FixItRewriter.h" +#include "clang/Driver/Options.h" #include "clang/Rewrite/Frontend/FrontendActions.h" #include "clang/StaticAnalyzer/Frontend/FrontendActions.h" #include "clang/Tooling/CommonOptionsParser.h" @@ -28,8 +28,8 @@ #include "llvm/ADT/STLExtras.h" #include "llvm/Option/OptTable.h" #include "llvm/Support/Path.h" -#include "llvm/Support/Signals.h" #include "llvm/Support/TargetSelect.h" +#include "llvm/Support/Signals.h" using namespace clang::driver; using namespace clang::tooling; @@ -52,7 +52,7 @@ ); static cl::OptionCategory ClangCheckCategory("clang-check options"); -static const opt::OptTable &Options = getDriverOptTable(); +static const opt::OptTable &Options = getDriverOptTable(); static cl::opt ASTDump("ast-dump", cl::desc(Options.getOptionHelpText(options::OPT_ast_dump)), @@ -148,7 +148,7 @@ } }; -} // namespace +} int main(int argc, const char **argv) { llvm::sys::PrintStackTraceOnErrorSignal(argv[0]); diff --git a/clang/tools/clang-diff/ClangDiff.cpp b/clang/tools/clang-diff/ClangDiff.cpp --- a/clang/tools/clang-diff/ClangDiff.cpp +++ b/clang/tools/clang-diff/ClangDiff.cpp @@ -32,12 +32,10 @@ cl::desc("Print the internal representation of the AST as JSON."), cl::init(false), cl::cat(ClangDiffCategory)); -static cl::opt PrintMatches("dump-matches", - cl::desc("Print the matched nodes."), - cl::init(false), cl::cat(ClangDiffCategory)); +static cl::opt PrintMatches("dump-matches", cl::desc("Print the matched nodes."), cl::init(false), cl::cat(ClangDiffCategory)); static cl::opt HtmlDiff("html", - cl::desc("Output a side-by-side diff in HTML."), + cl::desc("Output a side-by-side diff in HTML."), cl::init(false), cl::cat(ClangDiffCategory)); static cl::opt SourcePath(cl::Positional, cl::desc(""), @@ -77,7 +75,10 @@ std::make_unique( std::move(Compilations)); AdjustingCompilations->appendArgumentsAdjuster( - getInsertArgumentAdjuster(ArgsBefore, ArgumentInsertPosition::BEGIN)); + + getInsertArgumentAdjuster(ArgsBefore , + + ArgumentInsertPosition::BEGIN)); AdjustingCompilations->appendArgumentsAdjuster( getInsertArgumentAdjuster(ArgsAfter, ArgumentInsertPosition::END)); Compilations = std::move(AdjustingCompilations); diff --git a/clang/tools/clang-fuzzer/ClangFuzzer.cpp b/clang/tools/clang-fuzzer/ClangFuzzer.cpp --- a/clang/tools/clang-fuzzer/ClangFuzzer.cpp +++ b/clang/tools/clang-fuzzer/ClangFuzzer.cpp @@ -15,11 +15,11 @@ #include "handle-cxx/handle_cxx.h" using namespace clang_fuzzer; - -extern "C" int LLVMFuzzerInitialize(int *argc, char ***argv) { return 0; } - extern "C" int LLVMFuzzerTestOneInput(uint8_t *data, size_t size) { std::string s((const char *)data, size); HandleCXX(s, "./test.cc", {"-O2"}); return 0; } + +extern "C" int LLVMFuzzerInitialize( int *argc, + char ***argv) { return 0 ; } diff --git a/clang/tools/clang-refactor/ClangRefactor.cpp b/clang/tools/clang-refactor/ClangRefactor.cpp --- a/clang/tools/clang-refactor/ClangRefactor.cpp +++ b/clang/tools/clang-refactor/ClangRefactor.cpp @@ -90,7 +90,6 @@ TestSourceSelectionArgument(TestSelectionRangesInFile TestSelections) : TestSelections(std::move(TestSelections)) {} - void print(raw_ostream &OS) override { TestSelections.dump(OS); } std::unique_ptr createCustomConsumer() override { @@ -104,6 +103,9 @@ return TestSelections.foreachRange(SM, Callback); } + void print(raw_ostream &OS) override { + TestSelections.dump(OS); + } private: TestSelectionRangesInFile TestSelections; };