Index: llvm/utils/gn/build/BUILD.gn =================================================================== --- llvm/utils/gn/build/BUILD.gn +++ llvm/utils/gn/build/BUILD.gn @@ -149,6 +149,14 @@ ] } +config("clang_apply_replacements_code") { + include_dirs = [ + "//clang-tools-extra/clang-apply-replacements/include", + "$root_gen_dir/clang-apply-replacements/include", + ] + configs = [ ":llvm_code" ] +} + config("clang_code") { if (host_os != "win") { cflags = [ "-fno-strict-aliasing" ] Index: llvm/utils/gn/secondary/BUILD.gn =================================================================== --- llvm/utils/gn/secondary/BUILD.gn +++ llvm/utils/gn/secondary/BUILD.gn @@ -4,6 +4,8 @@ group("default") { deps = [ + "//clang-tools-extra/clang-apply-replacements/tool:clang-apply-replacements", + "//clang-tools-extra/clang-tidy/tool:clang-tidy", "//clang/test", "//lld/test", "//llvm/test", Index: llvm/utils/gn/secondary/clang-tools-extra/clang-apply-replacements/BUILD.gn =================================================================== --- /dev/null +++ llvm/utils/gn/secondary/clang-tools-extra/clang-apply-replacements/BUILD.gn @@ -0,0 +1,14 @@ +static_library("clang-apply-replacements") { + configs += [ "//llvm/utils/gn/build:clang_apply_replacements_code" ] + deps = [ + "//clang/lib/AST", + "//clang/lib/Basic", + "//clang/lib/Rewrite", + "//clang/lib/Tooling/Core", + "//clang/lib/Tooling/Refactoring", + "//llvm/lib/Support", + ] + sources = [ + "lib/Tooling/ApplyReplacements.cpp", + ] +} Index: llvm/utils/gn/secondary/clang-tools-extra/clang-apply-replacements/tool/BUILD.gn =================================================================== --- /dev/null +++ llvm/utils/gn/secondary/clang-tools-extra/clang-apply-replacements/tool/BUILD.gn @@ -0,0 +1,15 @@ +executable("clang-apply-replacements") { + configs += [ "//llvm/utils/gn/build:clang_apply_replacements_code" ] + deps = [ + "//clang-tools-extra/clang-apply-replacements", + "//clang/lib/Basic", + "//clang/lib/Format", + "//clang/lib/Rewrite", + "//clang/lib/Tooling/Core", + "//clang/lib/Tooling/Refactoring", + "//llvm/lib/Support", + ] + sources = [ + "ClangApplyReplacementsMain.cpp", + ] +} Index: llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/BUILD.gn =================================================================== --- /dev/null +++ llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/BUILD.gn @@ -0,0 +1,37 @@ +import("//clang/lib/StaticAnalyzer/Frontend/enable.gni") + +static_library("clang-tidy") { + output_name = "clangTidy" + deps = [ + "//clang/lib/AST", + "//clang/lib/ASTMatchers", + "//clang/lib/Basic", + "//clang/lib/Format", + "//clang/lib/Frontend", + "//clang/lib/Lex", + "//clang/lib/Rewrite", + "//clang/lib/Sema", + "//clang/lib/Serialization", + "//clang/lib/Tooling", + "//clang/lib/Tooling/Core", + "//llvm/lib/Support", + + # TODO(mbonadei): FIXME. + # ClangSACheckers + ] + + if (clang_enable_static_analyzer) { + deps += [ + "//clang/lib/StaticAnalyzer/Core", + "//clang/lib/StaticAnalyzer/Frontend", + ] + } + + sources = [ + "ClangTidy.cpp", + "ClangTidyDiagnosticConsumer.cpp", + "ClangTidyModule.cpp", + "ClangTidyOptions.cpp", + "ClangTidyProfiling.cpp", + ] +} Index: llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/abseil/BUILD.gn =================================================================== --- /dev/null +++ llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/abseil/BUILD.gn @@ -0,0 +1,30 @@ +static_library("abseil") { + output_name = "clangTidyAbseilModule" + deps = [ + "//clang-tools-extra/clang-tidy", + "//clang-tools-extra/clang-tidy/utils", + "//clang/lib/AST", + "//clang/lib/ASTMatchers", + "//clang/lib/Basic", + "//clang/lib/Lex", + "//clang/lib/Tooling", + "//llvm/lib/Support", + ] + sources = [ + "AbseilTidyModule.cpp", + "DurationComparisonCheck.cpp", + "DurationConversionCastCheck.cpp", + "DurationDivisionCheck.cpp", + "DurationFactoryFloatCheck.cpp", + "DurationFactoryScaleCheck.cpp", + "DurationRewriter.cpp", + "DurationSubtractionCheck.cpp", + "FasterStrsplitDelimiterCheck.cpp", + "NoInternalDependenciesCheck.cpp", + "NoNamespaceCheck.cpp", + "RedundantStrcatCallsCheck.cpp", + "StrCatAppendCheck.cpp", + "StringFindStartswithCheck.cpp", + "UpgradeDurationConversionsCheck.cpp", + ] +} Index: llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/android/BUILD.gn =================================================================== --- /dev/null +++ llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/android/BUILD.gn @@ -0,0 +1,29 @@ +static_library("android") { + output_name = "clangTidyAndroidModule" + deps = [ + "//clang-tools-extra/clang-tidy", + "//clang-tools-extra/clang-tidy/utils", + "//clang/lib/AST", + "//clang/lib/ASTMatchers", + "//clang/lib/Basic", + "//clang/lib/Lex", + "//llvm/lib/Support", + ] + sources = [ + "AndroidTidyModule.cpp", + "CloexecAccept4Check.cpp", + "CloexecAcceptCheck.cpp", + "CloexecCheck.cpp", + "CloexecCreatCheck.cpp", + "CloexecDupCheck.cpp", + "CloexecEpollCreate1Check.cpp", + "CloexecEpollCreateCheck.cpp", + "CloexecFopenCheck.cpp", + "CloexecInotifyInit1Check.cpp", + "CloexecInotifyInitCheck.cpp", + "CloexecMemfdCreateCheck.cpp", + "CloexecOpenCheck.cpp", + "CloexecSocketCheck.cpp", + "ComparisonInTempFailureRetryCheck.cpp", + ] +} Index: llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/boost/BUILD.gn =================================================================== --- /dev/null +++ llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/boost/BUILD.gn @@ -0,0 +1,16 @@ +static_library("boost") { + output_name = "clangTidyBoostModule" + deps = [ + "//clang-tools-extra/clang-tidy", + "//clang-tools-extra/clang-tidy/utils", + "//clang/lib/AST", + "//clang/lib/ASTMatchers", + "//clang/lib/Basic", + "//clang/lib/Lex", + "//llvm/lib/Support", + ] + sources = [ + "BoostTidyModule.cpp", + "UseToStringCheck.cpp", + ] +} Index: llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/bugprone/BUILD.gn =================================================================== --- /dev/null +++ llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/bugprone/BUILD.gn @@ -0,0 +1,58 @@ +static_library("bugprone") { + output_name = "clangTidyBugproneModule" + deps = [ + "//clang-tools-extra/clang-tidy", + "//clang-tools-extra/clang-tidy/cppcoreguidelines", + "//clang-tools-extra/clang-tidy/utils", + "//clang/lib/AST", + "//clang/lib/ASTMatchers", + "//clang/lib/Analysis", + "//clang/lib/Basic", + "//clang/lib/Lex", + "//clang/lib/Tooling", + "//llvm/lib/Support", + ] + sources = [ + "ArgumentCommentCheck.cpp", + "AssertSideEffectCheck.cpp", + "BoolPointerImplicitConversionCheck.cpp", + "BugproneTidyModule.cpp", + "CopyConstructorInitCheck.cpp", + "DanglingHandleCheck.cpp", + "ExceptionEscapeCheck.cpp", + "FoldInitTypeCheck.cpp", + "ForwardDeclarationNamespaceCheck.cpp", + "ForwardingReferenceOverloadCheck.cpp", + "InaccurateEraseCheck.cpp", + "IncorrectRoundingsCheck.cpp", + "IntegerDivisionCheck.cpp", + "LambdaFunctionNameCheck.cpp", + "MacroParenthesesCheck.cpp", + "MacroRepeatedSideEffectsCheck.cpp", + "MisplacedOperatorInStrlenInAllocCheck.cpp", + "MisplacedWideningCastCheck.cpp", + "MoveForwardingReferenceCheck.cpp", + "MultipleStatementMacroCheck.cpp", + "ParentVirtualCallCheck.cpp", + "SizeofContainerCheck.cpp", + "SizeofExpressionCheck.cpp", + "StringConstructorCheck.cpp", + "StringIntegerAssignmentCheck.cpp", + "StringLiteralWithEmbeddedNulCheck.cpp", + "SuspiciousEnumUsageCheck.cpp", + "SuspiciousMemsetUsageCheck.cpp", + "SuspiciousMissingCommaCheck.cpp", + "SuspiciousSemicolonCheck.cpp", + "SuspiciousStringCompareCheck.cpp", + "SwappedArgumentsCheck.cpp", + "TerminatingContinueCheck.cpp", + "ThrowKeywordMissingCheck.cpp", + "TooSmallLoopVariableCheck.cpp", + "UndefinedMemoryManipulationCheck.cpp", + "UndelegatedConstructorCheck.cpp", + "UnusedRaiiCheck.cpp", + "UnusedReturnValueCheck.cpp", + "UseAfterMoveCheck.cpp", + "VirtualNearMissCheck.cpp", + ] +} Index: llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/cert/BUILD.gn =================================================================== --- /dev/null +++ llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/cert/BUILD.gn @@ -0,0 +1,30 @@ +static_library("cert") { + output_name = "clangTidyCERTModule" + deps = [ + "//clang-tools-extra/clang-tidy", + "//clang-tools-extra/clang-tidy/google", + "//clang-tools-extra/clang-tidy/misc", + "//clang-tools-extra/clang-tidy/performance", + "//clang-tools-extra/clang-tidy/readability", + "//clang-tools-extra/clang-tidy/utils", + "//clang/lib/AST", + "//clang/lib/ASTMatchers", + "//clang/lib/Basic", + "//clang/lib/Lex", + "//llvm/lib/Support", + ] + sources = [ + "CERTTidyModule.cpp", + "CommandProcessorCheck.cpp", + "DontModifyStdNamespaceCheck.cpp", + "FloatLoopCounter.cpp", + "LimitedRandomnessCheck.cpp", + "PostfixOperatorCheck.cpp", + "ProperlySeededRandomGeneratorCheck.cpp", + "SetLongJmpCheck.cpp", + "StaticObjectExceptionCheck.cpp", + "StrToNumCheck.cpp", + "ThrownExceptionTypeCheck.cpp", + "VariadicFunctionDefCheck.cpp", + ] +} Index: llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/cppcoreguidelines/BUILD.gn =================================================================== --- /dev/null +++ llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/cppcoreguidelines/BUILD.gn @@ -0,0 +1,38 @@ +static_library("cppcoreguidelines") { + output_name = "clangTidyCppCoreGuidelinesModule" + deps = [ + "//clang-tools-extra/clang-tidy", + "//clang-tools-extra/clang-tidy/misc", + "//clang-tools-extra/clang-tidy/modernize", + "//clang-tools-extra/clang-tidy/readability", + "//clang-tools-extra/clang-tidy/utils", + "//clang/lib/AST", + "//clang/lib/ASTMatchers", + "//clang/lib/Basic", + "//clang/lib/Lex", + "//clang/lib/Serialization", + "//clang/lib/Tooling", + "//llvm/lib/Support", + ] + sources = [ + "AvoidGotoCheck.cpp", + "CppCoreGuidelinesTidyModule.cpp", + "InterfacesGlobalInitCheck.cpp", + "MacroUsageCheck.cpp", + "NarrowingConversionsCheck.cpp", + "NoMallocCheck.cpp", + "OwningMemoryCheck.cpp", + "ProBoundsArrayToPointerDecayCheck.cpp", + "ProBoundsConstantArrayIndexCheck.cpp", + "ProBoundsPointerArithmeticCheck.cpp", + "ProTypeConstCastCheck.cpp", + "ProTypeCstyleCastCheck.cpp", + "ProTypeMemberInitCheck.cpp", + "ProTypeReinterpretCastCheck.cpp", + "ProTypeStaticCastDowncastCheck.cpp", + "ProTypeUnionAccessCheck.cpp", + "ProTypeVarargCheck.cpp", + "SlicingCheck.cpp", + "SpecialMemberFunctionsCheck.cpp", + ] +} Index: llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/fuchsia/BUILD.gn =================================================================== --- /dev/null +++ llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/fuchsia/BUILD.gn @@ -0,0 +1,23 @@ +static_library("fuchsia") { + output_name = "clangTidyFuchsiaModule" + deps = [ + "//clang-tools-extra/clang-tidy", + "//clang-tools-extra/clang-tidy/google", + "//clang-tools-extra/clang-tidy/utils", + "//clang/lib/AST", + "//clang/lib/ASTMatchers", + "//clang/lib/Basic", + "//clang/lib/Lex", + "//llvm/lib/Support", + ] + sources = [ + "DefaultArgumentsCheck.cpp", + "FuchsiaTidyModule.cpp", + "MultipleInheritanceCheck.cpp", + "OverloadedOperatorCheck.cpp", + "RestrictSystemIncludesCheck.cpp", + "StaticallyConstructedObjectsCheck.cpp", + "TrailingReturnCheck.cpp", + "VirtualInheritanceCheck.cpp", + ] +} Index: llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/google/BUILD.gn =================================================================== --- /dev/null +++ llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/google/BUILD.gn @@ -0,0 +1,31 @@ +static_library("google") { + output_name = "clangTidyGoogleModule" + deps = [ + "//clang-tools-extra/clang-tidy", + "//clang-tools-extra/clang-tidy/readability", + "//clang-tools-extra/clang-tidy/utils", + "//clang/lib/AST", + "//clang/lib/ASTMatchers", + "//clang/lib/Basic", + "//clang/lib/Lex", + "//llvm/lib/Support", + ] + sources = [ + "AvoidCStyleCastsCheck.cpp", + "AvoidThrowingObjCExceptionCheck.cpp", + "AvoidUnderscoreInGoogletestNameCheck.cpp", + "DefaultArgumentsCheck.cpp", + "ExplicitConstructorCheck.cpp", + "ExplicitMakePairCheck.cpp", + "FunctionNamingCheck.cpp", + "GlobalNamesInHeadersCheck.cpp", + "GlobalVariableDeclarationCheck.cpp", + "GoogleTidyModule.cpp", + "IntegerTypesCheck.cpp", + "NonConstReferences.cpp", + "OverloadedUnaryAndCheck.cpp", + "TodoCommentCheck.cpp", + "UnnamedNamespaceInHeaderCheck.cpp", + "UsingNamespaceDirectiveCheck.cpp", + ] +} Index: llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/hicpp/BUILD.gn =================================================================== --- /dev/null +++ llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/hicpp/BUILD.gn @@ -0,0 +1,27 @@ +static_library("hicpp") { + output_name = "clangTidyHICPPModule" + deps = [ + "//clang-tools-extra/clang-tidy", + "//clang-tools-extra/clang-tidy/bugprone", + "//clang-tools-extra/clang-tidy/cppcoreguidelines", + "//clang-tools-extra/clang-tidy/google", + "//clang-tools-extra/clang-tidy/misc", + "//clang-tools-extra/clang-tidy/modernize", + "//clang-tools-extra/clang-tidy/performance", + "//clang-tools-extra/clang-tidy/readability", + "//clang-tools-extra/clang-tidy/utils", + "//clang/lib/AST", + "//clang/lib/ASTMatchers", + "//clang/lib/Basic", + "//clang/lib/Lex", + "//clang/lib/Serialization", + "//llvm/lib/Support", + ] + sources = [ + "ExceptionBaseclassCheck.cpp", + "HICPPTidyModule.cpp", + "MultiwayPathsCoveredCheck.cpp", + "NoAssemblerCheck.cpp", + "SignedBitwiseCheck.cpp", + ] +} Index: llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/llvm/BUILD.gn =================================================================== --- /dev/null +++ llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/llvm/BUILD.gn @@ -0,0 +1,20 @@ +static_library("llvm") { + output_name = "clangTidyLLVMModule" + deps = [ + "//clang-tools-extra/clang-tidy", + "//clang-tools-extra/clang-tidy/readability", + "//clang-tools-extra/clang-tidy/utils", + "//clang/lib/AST", + "//clang/lib/ASTMatchers", + "//clang/lib/Basic", + "//clang/lib/Lex", + "//clang/lib/Tooling", + "//llvm/lib/Support", + ] + sources = [ + "HeaderGuardCheck.cpp", + "IncludeOrderCheck.cpp", + "LLVMTidyModule.cpp", + "TwineLocalCheck.cpp", + ] +} Index: llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/misc/BUILD.gn =================================================================== --- /dev/null +++ llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/misc/BUILD.gn @@ -0,0 +1,31 @@ +static_library("misc") { + output_name = "clangTidyMiscModule" + deps = [ + "//clang-tools-extra/clang-tidy", + "//clang-tools-extra/clang-tidy/utils", + "//clang/lib/AST", + "//clang/lib/ASTMatchers", + "//clang/lib/Analysis", + "//clang/lib/Basic", + "//clang/lib/Lex", + "//clang/lib/Serialization", + "//clang/lib/Tooling", + "//llvm/lib/Support", + ] + sources = [ + "DefinitionsInHeadersCheck.cpp", + "MiscTidyModule.cpp", + "MisplacedConstCheck.cpp", + "NewDeleteOverloadsCheck.cpp", + "NonCopyableObjects.cpp", + "NonPrivateMemberVariablesInClassesCheck.cpp", + "RedundantExpressionCheck.cpp", + "StaticAssertCheck.cpp", + "ThrowByValueCatchByReferenceCheck.cpp", + "UnconventionalAssignOperatorCheck.cpp", + "UniqueptrResetReleaseCheck.cpp", + "UnusedAliasDeclsCheck.cpp", + "UnusedParametersCheck.cpp", + "UnusedUsingDeclsCheck.cpp", + ] +} Index: llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/modernize/BUILD.gn =================================================================== --- /dev/null +++ llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/modernize/BUILD.gn @@ -0,0 +1,48 @@ +static_library("modernize") { + output_name = "clangTidyModernizeModule" + deps = [ + "//clang-tools-extra/clang-tidy", + "//clang-tools-extra/clang-tidy/readability", + "//clang-tools-extra/clang-tidy/utils", + "//clang/lib/AST", + "//clang/lib/ASTMatchers", + "//clang/lib/Basic", + "//clang/lib/Lex", + "//clang/lib/Tooling", + "//llvm/lib/Support", + ] + sources = [ + "AvoidBindCheck.cpp", + "AvoidCArraysCheck.cpp", + "ConcatNestedNamespacesCheck.cpp", + "DeprecatedHeadersCheck.cpp", + "DeprecatedIosBaseAliasesCheck.cpp", + "LoopConvertCheck.cpp", + "LoopConvertUtils.cpp", + "MakeSharedCheck.cpp", + "MakeSmartPtrCheck.cpp", + "MakeUniqueCheck.cpp", + "ModernizeTidyModule.cpp", + "PassByValueCheck.cpp", + "RawStringLiteralCheck.cpp", + "RedundantVoidArgCheck.cpp", + "ReplaceAutoPtrCheck.cpp", + "ReplaceRandomShuffleCheck.cpp", + "ReturnBracedInitListCheck.cpp", + "ShrinkToFitCheck.cpp", + "UnaryStaticAssertCheck.cpp", + "UseAutoCheck.cpp", + "UseBoolLiteralsCheck.cpp", + "UseDefaultMemberInitCheck.cpp", + "UseEmplaceCheck.cpp", + "UseEqualsDefaultCheck.cpp", + "UseEqualsDeleteCheck.cpp", + "UseNodiscardCheck.cpp", + "UseNoexceptCheck.cpp", + "UseNullptrCheck.cpp", + "UseOverrideCheck.cpp", + "UseTransparentFunctorsCheck.cpp", + "UseUncaughtExceptionsCheck.cpp", + "UseUsingCheck.cpp", + ] +} Index: llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/mpi/BUILD.gn =================================================================== --- /dev/null +++ llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/mpi/BUILD.gn @@ -0,0 +1,20 @@ +static_library("mpi") { + output_name = "clangTidyMPIModule" + deps = [ + "//clang-tools-extra/clang-tidy", + "//clang-tools-extra/clang-tidy/utils", + "//clang/lib/AST", + "//clang/lib/ASTMatchers", + "//clang/lib/Analysis", + "//clang/lib/Basic", + "//clang/lib/Lex", + "//clang/lib/StaticAnalyzer/Checkers", + "//clang/lib/Tooling", + "//llvm/lib/Support", + ] + sources = [ + "BufferDerefCheck.cpp", + "MPITidyModule.cpp", + "TypeMismatchCheck.cpp", + ] +} Index: llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/objc/BUILD.gn =================================================================== --- /dev/null +++ llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/objc/BUILD.gn @@ -0,0 +1,19 @@ +static_library("objc") { + output_name = "clangTidyObjCModule" + deps = [ + "//clang-tools-extra/clang-tidy", + "//clang-tools-extra/clang-tidy/utils", + "//clang/lib/AST", + "//clang/lib/ASTMatchers", + "//clang/lib/Basic", + "//clang/lib/Lex", + "//llvm/lib/Support", + ] + sources = [ + "AvoidNSErrorInitCheck.cpp", + "AvoidSpinlockCheck.cpp", + "ForbiddenSubclassingCheck.cpp", + "ObjCTidyModule.cpp", + "PropertyDeclarationCheck.cpp", + ] +} Index: llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/performance/BUILD.gn =================================================================== --- /dev/null +++ llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/performance/BUILD.gn @@ -0,0 +1,28 @@ +static_library("performance") { + output_name = "clangTidyPerformanceModule" + deps = [ + "//clang-tools-extra/clang-tidy", + "//clang-tools-extra/clang-tidy/utils", + "//clang/lib/AST", + "//clang/lib/ASTMatchers", + "//clang/lib/Analysis", + "//clang/lib/Basic", + "//clang/lib/Lex", + "//llvm/lib/Support", + ] + sources = [ + "FasterStringFindCheck.cpp", + "ForRangeCopyCheck.cpp", + "ImplicitConversionInLoopCheck.cpp", + "InefficientAlgorithmCheck.cpp", + "InefficientStringConcatenationCheck.cpp", + "InefficientVectorOperationCheck.cpp", + "MoveConstArgCheck.cpp", + "MoveConstructorInitCheck.cpp", + "NoexceptMoveConstructorCheck.cpp", + "PerformanceTidyModule.cpp", + "TypePromotionInMathFnCheck.cpp", + "UnnecessaryCopyInitialization.cpp", + "UnnecessaryValueParamCheck.cpp", + ] +} Index: llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/plugin/BUILD.gn =================================================================== --- /dev/null +++ llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/plugin/BUILD.gn @@ -0,0 +1,37 @@ +static_library("plugin") { + output_name = "clangTidyPlugin" + deps = [ + "//clang-tools-extra/clang-tidy", + "//clang-tools-extra/clang-tidy/abseil", + "//clang-tools-extra/clang-tidy/android", + "//clang-tools-extra/clang-tidy/boost", + "//clang-tools-extra/clang-tidy/bugprone", + "//clang-tools-extra/clang-tidy/cert", + "//clang-tools-extra/clang-tidy/cppcoreguidelines", + "//clang-tools-extra/clang-tidy/fuchsia", + "//clang-tools-extra/clang-tidy/google", + "//clang-tools-extra/clang-tidy/hicpp", + "//clang-tools-extra/clang-tidy/llvm", + "//clang-tools-extra/clang-tidy/misc", + "//clang-tools-extra/clang-tidy/modernize", + "//clang-tools-extra/clang-tidy/objc", + "//clang-tools-extra/clang-tidy/performance", + "//clang-tools-extra/clang-tidy/portability", + "//clang-tools-extra/clang-tidy/readability", + "//clang-tools-extra/clang-tidy/zircon", + "//clang/lib/AST", + "//clang/lib/ASTMatchers", + "//clang/lib/Basic", + "//clang/lib/Frontend", + "//clang/lib/Sema", + "//clang/lib/Tooling", + ] + + if (clang_enable_static_analyzer) { + deps += [ "//clang-tools-extra/clang-tidy/mpi" ] + } + + sources = [ + "ClangTidyPlugin.cpp", + ] +} Index: llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/portability/BUILD.gn =================================================================== --- /dev/null +++ llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/portability/BUILD.gn @@ -0,0 +1,17 @@ +static_library("portability") { + output_name = "clangTidyPortabilityModule" + deps = [ + "//clang-tools-extra/clang-tidy", + "//clang-tools-extra/clang-tidy/utils", + "//clang/lib/AST", + "//clang/lib/ASTMatchers", + "//clang/lib/Basic", + "//clang/lib/Lex", + "//clang/lib/Tooling", + "//llvm/lib/Support", + ] + sources = [ + "PortabilityTidyModule.cpp", + "SIMDIntrinsicsCheck.cpp", + ] +} Index: llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/readability/BUILD.gn =================================================================== --- /dev/null +++ llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/readability/BUILD.gn @@ -0,0 +1,49 @@ +static_library("readability") { + output_name = "clangTidyReadabilityModule" + deps = [ + "//clang-tools-extra/clang-tidy", + "//clang-tools-extra/clang-tidy/utils", + "//clang/lib/AST", + "//clang/lib/ASTMatchers", + "//clang/lib/Basic", + "//clang/lib/Lex", + "//clang/lib/Tooling", + "//llvm/lib/Support", + ] + sources = [ + "AvoidConstParamsInDecls.cpp", + "BracesAroundStatementsCheck.cpp", + "ConstReturnTypeCheck.cpp", + "ContainerSizeEmptyCheck.cpp", + "DeleteNullPointerCheck.cpp", + "DeletedDefaultCheck.cpp", + "ElseAfterReturnCheck.cpp", + "FunctionSizeCheck.cpp", + "IdentifierNamingCheck.cpp", + "ImplicitBoolConversionCheck.cpp", + "InconsistentDeclarationParameterNameCheck.cpp", + "IsolateDeclarationCheck.cpp", + "MagicNumbersCheck.cpp", + "MisleadingIndentationCheck.cpp", + "MisplacedArrayIndexCheck.cpp", + "NamedParameterCheck.cpp", + "NamespaceCommentCheck.cpp", + "NonConstParameterCheck.cpp", + "ReadabilityTidyModule.cpp", + "RedundantControlFlowCheck.cpp", + "RedundantDeclarationCheck.cpp", + "RedundantFunctionPtrDereferenceCheck.cpp", + "RedundantMemberInitCheck.cpp", + "RedundantPreprocessorCheck.cpp", + "RedundantSmartptrGetCheck.cpp", + "RedundantStringCStrCheck.cpp", + "RedundantStringInitCheck.cpp", + "SimplifyBooleanExprCheck.cpp", + "SimplifySubscriptExprCheck.cpp", + "StaticAccessedThroughInstanceCheck.cpp", + "StaticDefinitionInAnonymousNamespaceCheck.cpp", + "StringCompareCheck.cpp", + "UniqueptrDeleteReleaseCheck.cpp", + "UppercaseLiteralSuffixCheck.cpp", + ] +} Index: llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/tool/BUILD.gn =================================================================== --- /dev/null +++ llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/tool/BUILD.gn @@ -0,0 +1,39 @@ +import("//clang/lib/StaticAnalyzer/Frontend/enable.gni") + +executable("clang-tidy") { + deps = [ + "//clang-tools-extra/clang-tidy", + "//clang-tools-extra/clang-tidy/abseil", + "//clang-tools-extra/clang-tidy/android", + "//clang-tools-extra/clang-tidy/boost", + "//clang-tools-extra/clang-tidy/bugprone", + "//clang-tools-extra/clang-tidy/cert", + "//clang-tools-extra/clang-tidy/cppcoreguidelines", + "//clang-tools-extra/clang-tidy/fuchsia", + "//clang-tools-extra/clang-tidy/google", + "//clang-tools-extra/clang-tidy/hicpp", + "//clang-tools-extra/clang-tidy/llvm", + "//clang-tools-extra/clang-tidy/misc", + "//clang-tools-extra/clang-tidy/modernize", + "//clang-tools-extra/clang-tidy/objc", + "//clang-tools-extra/clang-tidy/performance", + "//clang-tools-extra/clang-tidy/portability", + "//clang-tools-extra/clang-tidy/readability", + "//clang-tools-extra/clang-tidy/zircon", + "//clang/lib/AST", + "//clang/lib/ASTMatchers", + "//clang/lib/Basic", + "//clang/lib/Tooling", + "//clang/lib/Tooling/Core", + "//llvm/lib/Support", + "//llvm/lib/Target:AllTargetsAsmParsers", + "//llvm/lib/Target:AllTargetsDescs", + "//llvm/lib/Target:AllTargetsInfos", + ] + if (clang_enable_static_analyzer) { + deps += [ "//clang-tools-extra/clang-tidy/mpi" ] + } + sources = [ + "ClangTidyMain.cpp", + ] +} Index: llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/utils/BUILD.gn =================================================================== --- /dev/null +++ llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/utils/BUILD.gn @@ -0,0 +1,26 @@ +static_library("utils") { + output_name = "clangTidyUtils" + deps = [ + "//clang-tools-extra/clang-tidy", + "//clang/lib/AST", + "//clang/lib/ASTMatchers", + "//clang/lib/Basic", + "//clang/lib/Lex", + "//llvm/lib/Support", + ] + sources = [ + "ASTUtils.cpp", + "DeclRefExprUtils.cpp", + "ExprSequence.cpp", + "FixItHintUtils.cpp", + "HeaderFileExtensionsUtils.cpp", + "HeaderGuard.cpp", + "IncludeInserter.cpp", + "IncludeSorter.cpp", + "LexerUtils.cpp", + "NamespaceAliaser.cpp", + "OptionsUtils.cpp", + "TypeTraits.cpp", + "UsingInserter.cpp", + ] +} Index: llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/zircon/BUILD.gn =================================================================== --- /dev/null +++ llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/zircon/BUILD.gn @@ -0,0 +1,16 @@ +static_library("zircon") { + output_name = "clangTidyZirconModule" + deps = [ + "//clang-tools-extra/clang-tidy", + "//clang-tools-extra/clang-tidy/utils", + "//clang/lib/AST", + "//clang/lib/ASTMatchers", + "//clang/lib/Basic", + "//clang/lib/Lex", + "//llvm/lib/Support", + ] + sources = [ + "TemporaryObjectsCheck.cpp", + "ZirconTidyModule.cpp", + ] +} Index: llvm/utils/gn/secondary/clang/lib/Basic/BUILD.gn =================================================================== --- llvm/utils/gn/secondary/clang/lib/Basic/BUILD.gn +++ llvm/utils/gn/secondary/clang/lib/Basic/BUILD.gn @@ -1,6 +1,6 @@ static_library("Basic") { output_name = "clangBasic" - configs += [ "//llvm/utils/gn/build:clang_code" ] + public_configs = [ "//llvm/utils/gn/build:clang_code" ] public_deps = [ # public_dep because public header Version.h includes generated Version.inc. "//clang/include/clang/Basic:AttrList", Index: llvm/utils/gn/secondary/llvm/utils/TableGen/tablegen.gni =================================================================== --- llvm/utils/gn/secondary/llvm/utils/TableGen/tablegen.gni +++ llvm/utils/gn/secondary/llvm/utils/TableGen/tablegen.gni @@ -9,7 +9,7 @@ # Basename of the generated output file. # Defaults to target name with ".inc" appended. # -# td_file (roptional) +# td_file (optional) # The .td file to pass to llvm-tblgen. # Defaults to target name with ".td" appended. #