Index: llvm/trunk/utils/gn/secondary/BUILD.gn =================================================================== --- llvm/trunk/utils/gn/secondary/BUILD.gn +++ llvm/trunk/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/trunk/utils/gn/secondary/clang-tools-extra/clang-apply-replacements/BUILD.gn =================================================================== --- llvm/trunk/utils/gn/secondary/clang-tools-extra/clang-apply-replacements/BUILD.gn +++ llvm/trunk/utils/gn/secondary/clang-tools-extra/clang-apply-replacements/BUILD.gn @@ -0,0 +1,15 @@ +static_library("clang-apply-replacements") { + configs += [ "//llvm/utils/gn/build:clang_code" ] + deps = [ + "//clang/lib/AST", + "//clang/lib/Basic", + "//clang/lib/Rewrite", + "//clang/lib/Tooling/Core", + "//clang/lib/Tooling/Refactoring", + "//llvm/lib/Support", + ] + include_dirs = [ "include" ] + sources = [ + "lib/Tooling/ApplyReplacements.cpp", + ] +} Index: llvm/trunk/utils/gn/secondary/clang-tools-extra/clang-apply-replacements/tool/BUILD.gn =================================================================== --- llvm/trunk/utils/gn/secondary/clang-tools-extra/clang-apply-replacements/tool/BUILD.gn +++ llvm/trunk/utils/gn/secondary/clang-tools-extra/clang-apply-replacements/tool/BUILD.gn @@ -0,0 +1,16 @@ +executable("clang-apply-replacements") { + configs += [ "//llvm/utils/gn/build:clang_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", + ] + include_dirs = [ "../include" ] + sources = [ + "ClangApplyReplacementsMain.cpp", + ] +} Index: llvm/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/BUILD.gn =================================================================== --- llvm/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/BUILD.gn +++ llvm/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/BUILD.gn @@ -0,0 +1,41 @@ +import("//clang/lib/StaticAnalyzer/Frontend/enable.gni") + +static_library("clang-tidy") { + output_name = "clangTidy" + configs += [ "//llvm/utils/gn/build:clang_code" ] + 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): Add support for Clang Static Analyzer checkers. + # Without this, "clang-analyzer-" will not work. + # ClangSACheckers + ] + + # TODO(mbonadei): Add support for Clang Static Analyzer checkers. + # Without this, "clang-analyzer-" will not work. + # 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/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/abseil/BUILD.gn =================================================================== --- llvm/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/abseil/BUILD.gn +++ llvm/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/abseil/BUILD.gn @@ -0,0 +1,33 @@ +static_library("abseil") { + output_name = "clangTidyAbseilModule" + configs += [ "//llvm/utils/gn/build:clang_code" ] + 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", + "DurationAdditionCheck.cpp", + "DurationComparisonCheck.cpp", + "DurationConversionCastCheck.cpp", + "DurationDivisionCheck.cpp", + "DurationFactoryFloatCheck.cpp", + "DurationFactoryScaleCheck.cpp", + "DurationRewriter.cpp", + "DurationSubtractionCheck.cpp", + "DurationUnnecessaryConversionCheck.cpp", + "FasterStrsplitDelimiterCheck.cpp", + "NoInternalDependenciesCheck.cpp", + "NoNamespaceCheck.cpp", + "RedundantStrcatCallsCheck.cpp", + "StrCatAppendCheck.cpp", + "StringFindStartswithCheck.cpp", + "UpgradeDurationConversionsCheck.cpp", + ] +} Index: llvm/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/android/BUILD.gn =================================================================== --- llvm/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/android/BUILD.gn +++ llvm/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/android/BUILD.gn @@ -0,0 +1,30 @@ +static_library("android") { + output_name = "clangTidyAndroidModule" + configs += [ "//llvm/utils/gn/build:clang_code" ] + 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/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/boost/BUILD.gn =================================================================== --- llvm/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/boost/BUILD.gn +++ llvm/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/boost/BUILD.gn @@ -0,0 +1,17 @@ +static_library("boost") { + output_name = "clangTidyBoostModule" + configs += [ "//llvm/utils/gn/build:clang_code" ] + 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/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/bugprone/BUILD.gn =================================================================== --- llvm/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/bugprone/BUILD.gn +++ llvm/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/bugprone/BUILD.gn @@ -0,0 +1,59 @@ +static_library("bugprone") { + output_name = "clangTidyBugproneModule" + configs += [ "//llvm/utils/gn/build:clang_code" ] + 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/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/cert/BUILD.gn =================================================================== --- llvm/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/cert/BUILD.gn +++ llvm/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/cert/BUILD.gn @@ -0,0 +1,31 @@ +static_library("cert") { + output_name = "clangTidyCERTModule" + configs += [ "//llvm/utils/gn/build:clang_code" ] + 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/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/cppcoreguidelines/BUILD.gn =================================================================== --- llvm/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/cppcoreguidelines/BUILD.gn +++ llvm/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/cppcoreguidelines/BUILD.gn @@ -0,0 +1,39 @@ +static_library("cppcoreguidelines") { + output_name = "clangTidyCppCoreGuidelinesModule" + configs += [ "//llvm/utils/gn/build:clang_code" ] + 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/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/fuchsia/BUILD.gn =================================================================== --- llvm/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/fuchsia/BUILD.gn +++ llvm/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/fuchsia/BUILD.gn @@ -0,0 +1,24 @@ +static_library("fuchsia") { + output_name = "clangTidyFuchsiaModule" + configs += [ "//llvm/utils/gn/build:clang_code" ] + 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/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/google/BUILD.gn =================================================================== --- llvm/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/google/BUILD.gn +++ llvm/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/google/BUILD.gn @@ -0,0 +1,32 @@ +static_library("google") { + output_name = "clangTidyGoogleModule" + configs += [ "//llvm/utils/gn/build:clang_code" ] + 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/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/hicpp/BUILD.gn =================================================================== --- llvm/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/hicpp/BUILD.gn +++ llvm/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/hicpp/BUILD.gn @@ -0,0 +1,28 @@ +static_library("hicpp") { + output_name = "clangTidyHICPPModule" + configs += [ "//llvm/utils/gn/build:clang_code" ] + 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/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/llvm/BUILD.gn =================================================================== --- llvm/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/llvm/BUILD.gn +++ llvm/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/llvm/BUILD.gn @@ -0,0 +1,21 @@ +static_library("llvm") { + output_name = "clangTidyLLVMModule" + configs += [ "//llvm/utils/gn/build:clang_code" ] + 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/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/misc/BUILD.gn =================================================================== --- llvm/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/misc/BUILD.gn +++ llvm/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/misc/BUILD.gn @@ -0,0 +1,32 @@ +static_library("misc") { + output_name = "clangTidyMiscModule" + configs += [ "//llvm/utils/gn/build:clang_code" ] + 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/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/modernize/BUILD.gn =================================================================== --- llvm/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/modernize/BUILD.gn +++ llvm/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/modernize/BUILD.gn @@ -0,0 +1,49 @@ +static_library("modernize") { + output_name = "clangTidyModernizeModule" + configs += [ "//llvm/utils/gn/build:clang_code" ] + 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/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/mpi/BUILD.gn =================================================================== --- llvm/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/mpi/BUILD.gn +++ llvm/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/mpi/BUILD.gn @@ -0,0 +1,21 @@ +static_library("mpi") { + output_name = "clangTidyMPIModule" + configs += [ "//llvm/utils/gn/build:clang_code" ] + 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/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/objc/BUILD.gn =================================================================== --- llvm/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/objc/BUILD.gn +++ llvm/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/objc/BUILD.gn @@ -0,0 +1,20 @@ +static_library("objc") { + output_name = "clangTidyObjCModule" + configs += [ "//llvm/utils/gn/build:clang_code" ] + 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/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/performance/BUILD.gn =================================================================== --- llvm/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/performance/BUILD.gn +++ llvm/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/performance/BUILD.gn @@ -0,0 +1,29 @@ +static_library("performance") { + output_name = "clangTidyPerformanceModule" + configs += [ "//llvm/utils/gn/build:clang_code" ] + 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/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/plugin/BUILD.gn =================================================================== --- llvm/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/plugin/BUILD.gn +++ llvm/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/plugin/BUILD.gn @@ -0,0 +1,38 @@ +static_library("plugin") { + output_name = "clangTidyPlugin" + configs += [ "//llvm/utils/gn/build:clang_code" ] + 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/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/portability/BUILD.gn =================================================================== --- llvm/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/portability/BUILD.gn +++ llvm/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/portability/BUILD.gn @@ -0,0 +1,18 @@ +static_library("portability") { + output_name = "clangTidyPortabilityModule" + configs += [ "//llvm/utils/gn/build:clang_code" ] + 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/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/readability/BUILD.gn =================================================================== --- llvm/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/readability/BUILD.gn +++ llvm/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/readability/BUILD.gn @@ -0,0 +1,50 @@ +static_library("readability") { + output_name = "clangTidyReadabilityModule" + configs += [ "//llvm/utils/gn/build:clang_code" ] + 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/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/tool/BUILD.gn =================================================================== --- llvm/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/tool/BUILD.gn +++ llvm/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/tool/BUILD.gn @@ -0,0 +1,40 @@ +import("//clang/lib/StaticAnalyzer/Frontend/enable.gni") + +executable("clang-tidy") { + configs += [ "//llvm/utils/gn/build:clang_code" ] + 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/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/utils/BUILD.gn =================================================================== --- llvm/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/utils/BUILD.gn +++ llvm/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/utils/BUILD.gn @@ -0,0 +1,28 @@ +static_library("utils") { + output_name = "clangTidyUtils" + configs += [ "//llvm/utils/gn/build:clang_code" ] + 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", + "ExceptionAnalyzer.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/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/zircon/BUILD.gn =================================================================== --- llvm/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/zircon/BUILD.gn +++ llvm/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/zircon/BUILD.gn @@ -0,0 +1,17 @@ +static_library("zircon") { + output_name = "clangTidyZirconModule" + configs += [ "//llvm/utils/gn/build:clang_code" ] + 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/trunk/utils/gn/secondary/llvm/utils/TableGen/tablegen.gni =================================================================== --- llvm/trunk/utils/gn/secondary/llvm/utils/TableGen/tablegen.gni +++ llvm/trunk/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. #