--- /dev/null
+static_library("Checkers") {
+ output_name = "clangStaticAnalyzerCheckers"
+ configs += [ "//llvm/utils/gn/build:clang_code" ]
+ deps = [
+ "//clang/include/clang/StaticAnalyzer/Checkers",
+ "//clang/lib/AST",
+ "//clang/lib/ASTMatchers",
+ "//clang/lib/Analysis",
+ "//clang/lib/Basic",
+ "//clang/lib/Lex",
+ "//clang/lib/StaticAnalyzer/Core",
+ "//llvm/lib/Support",
+ ]
+ sources = [
+ "AnalysisOrderChecker.cpp",
+ "AnalyzerStatsChecker.cpp",
+ "ArrayBoundChecker.cpp",
+ "ArrayBoundCheckerV2.cpp",
+ "BasicObjCFoundationChecks.cpp",
+ "BlockInCriticalSectionChecker.cpp",
+ "BoolAssignmentChecker.cpp",
+ "BuiltinFunctionChecker.cpp",
+ "CStringChecker.cpp",
+ "CStringSyntaxChecker.cpp",
+ "CXXSelfAssignmentChecker.cpp",
+ "CallAndMessageChecker.cpp",
+ "CastSizeChecker.cpp",
+ "CastToStructChecker.cpp",
+ "CheckObjCDealloc.cpp",
+ "CheckObjCInstMethSignature.cpp",
+ "CheckSecuritySyntaxOnly.cpp",
+ "CheckSizeofPointer.cpp",
+ "CheckerDocumentation.cpp",
+ "ChrootChecker.cpp",
+ "CloneChecker.cpp",
+ "ConversionChecker.cpp",
+ "DeadStoresChecker.cpp",
+ "DebugCheckers.cpp",
+ "DeleteWithNonVirtualDtorChecker.cpp",
+ "DereferenceChecker.cpp",
+ "DirectIvarAssignment.cpp",
+ "DivZeroChecker.cpp",
+ "DynamicTypeChecker.cpp",
+ "DynamicTypePropagation.cpp",
+ "EnumCastOutOfRangeChecker.cpp",
+ "ExprInspectionChecker.cpp",
+ "FixedAddressChecker.cpp",
+ "GCDAntipatternChecker.cpp",
+ "GTestChecker.cpp",
+ "GenericTaintChecker.cpp",
+ "IdenticalExprChecker.cpp",
+ "InnerPointerChecker.cpp",
+ "IteratorChecker.cpp",
+ "IvarInvalidationChecker.cpp",
+ "LLVMConventionsChecker.cpp",
+ "LocalizationChecker.cpp",
+ "MPI-Checker/MPIBugReporter.cpp",
+ "MPI-Checker/MPIChecker.cpp",
+ "MPI-Checker/MPIFunctionClassifier.cpp",
+ "MacOSKeychainAPIChecker.cpp",
+ "MacOSXAPIChecker.cpp",
+ "MallocChecker.cpp",
+ "MallocOverflowSecurityChecker.cpp",
+ "MallocSizeofChecker.cpp",
+ "MmapWriteExecChecker.cpp",
+ "MoveChecker.cpp",
+ "NSAutoreleasePoolChecker.cpp",
+ "NSErrorChecker.cpp",
+ "NoReturnFunctionChecker.cpp",
+ "NonNullParamChecker.cpp",
+ "NonnullGlobalConstantsChecker.cpp",
+ "NullabilityChecker.cpp",
+ "NumberObjectConversionChecker.cpp",
+ "ObjCAtSyncChecker.cpp",
+ "ObjCAutoreleaseWriteChecker.cpp",
+ "ObjCContainersASTChecker.cpp",
+ "ObjCContainersChecker.cpp",
+ "ObjCMissingSuperCallChecker.cpp",
+ "ObjCPropertyChecker.cpp",
+ "ObjCSelfInitChecker.cpp",
+ "ObjCSuperDeallocChecker.cpp",
+ "ObjCUnusedIVarsChecker.cpp",
+ "PaddingChecker.cpp",
+ "PointerArithChecker.cpp",
+ "PointerSubChecker.cpp",
+ "PthreadLockChecker.cpp",
+ "RetainCountChecker/RetainCountChecker.cpp",
+ "RetainCountChecker/RetainCountDiagnostics.cpp",
+ "ReturnPointerRangeChecker.cpp",
+ "ReturnUndefChecker.cpp",
+ "RunLoopAutoreleaseLeakChecker.cpp",
+ "SimpleStreamChecker.cpp",
+ "StackAddrEscapeChecker.cpp",
+ "StdLibraryFunctionsChecker.cpp",
+ "StreamChecker.cpp",
+ "TaintTesterChecker.cpp",
+ "TestAfterDivZeroChecker.cpp",
+ "TraversalChecker.cpp",
+ "TrustNonnullChecker.cpp",
+ "UndefBranchChecker.cpp",
+ "UndefCapturedBlockVarChecker.cpp",
+ "UndefResultChecker.cpp",
+ "UndefinedArraySubscriptChecker.cpp",
+ "UndefinedAssignmentChecker.cpp",
+ "UninitializedObject/UninitializedObjectChecker.cpp",
+ "UninitializedObject/UninitializedPointee.cpp",
+ "UnixAPIChecker.cpp",
+ "UnreachableCodeChecker.cpp",
+ "VLASizeChecker.cpp",
+ "ValistChecker.cpp",
+ "VforkChecker.cpp",
+ "VirtualCallChecker.cpp",
+ ]
+}
--- /dev/null
+static_library("Core") {
+ output_name = "clangStaticAnalyzerCore"
+ configs += [ "//llvm/utils/gn/build:clang_code" ]
+ deps = [
+ "//clang/include/clang/Config",
+ "//clang/lib/AST",
+ "//clang/lib/ASTMatchers",
+ "//clang/lib/Analysis",
+ "//clang/lib/Basic",
+ "//clang/lib/CrossTU",
+ "//clang/lib/Lex",
+ "//clang/lib/Rewrite",
+ "//llvm/lib/Support",
+ ]
+ sources = [
+ "APSIntType.cpp",
+ "AnalysisManager.cpp",
+ "AnalyzerOptions.cpp",
+ "BasicValueFactory.cpp",
+ "BlockCounter.cpp",
+ "BugReporter.cpp",
+ "BugReporterVisitors.cpp",
+ "CallEvent.cpp",
+ "Checker.cpp",
+ "CheckerContext.cpp",
+ "CheckerHelpers.cpp",
+ "CheckerManager.cpp",
+ "CommonBugCategories.cpp",
+ "ConstraintManager.cpp",
+ "CoreEngine.cpp",
+ "DynamicTypeMap.cpp",
+ "Environment.cpp",
+ "ExplodedGraph.cpp",
+ "ExprEngine.cpp",
+ "ExprEngineC.cpp",
+ "ExprEngineCXX.cpp",
+ "ExprEngineCallAndReturn.cpp",
+ "ExprEngineObjC.cpp",
+ "FunctionSummary.cpp",
+ "HTMLDiagnostics.cpp",
+ "IssueHash.cpp",
+ "LoopUnrolling.cpp",
+ "LoopWidening.cpp",
+ "MemRegion.cpp",
+ "PathDiagnostic.cpp",
+ "PlistDiagnostics.cpp",
+ "ProgramState.cpp",
+ "RangeConstraintManager.cpp",
+ "RangedConstraintManager.cpp",
+ "RegionStore.cpp",
+ "RetainSummaryManager.cpp",
+ "SValBuilder.cpp",
+ "SVals.cpp",
+ "SarifDiagnostics.cpp",
+ "SimpleConstraintManager.cpp",
+ "SimpleSValBuilder.cpp",
+ "Store.cpp",
+ "SubEngine.cpp",
+ "SymbolManager.cpp",
+ "TaintManager.cpp",
+ "WorkList.cpp",
+ "Z3ConstraintManager.cpp",
+ ]
+
+ # FIXME: clang/Config/BUILD.gn currently always sets CLANG_ANALYZER_WITH_Z3
+ # to false. If that changes we need to link to Z3 libs here.
+}