Преглед на файлове

[analyzer] Move the files in lib/StaticAnalyzer to lib/StaticAnalyzer/Core.

Eventually there will also be a lib/StaticAnalyzer/Frontend that will handle initialization and checker registration.
Yet another library to avoid cyclic dependencies between Core and Checkers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125124 91177308-0d34-0410-b5e6-96231b3b80d8
Argyrios Kyrtzidis преди 14 години
родител
ревизия
811d75ee35
променени са 40 файла, в които са добавени 64 реда и са изтрити 48 реда
  1. 0 1
      lib/CMakeLists.txt
  2. 2 42
      lib/StaticAnalyzer/CMakeLists.txt
  3. 1 1
      lib/StaticAnalyzer/Checkers/AnalyzerStatsChecker.cpp
  4. 1 0
      lib/StaticAnalyzer/Checkers/CMakeLists.txt
  5. 0 0
      lib/StaticAnalyzer/Core/AggExprVisitor.cpp
  6. 0 0
      lib/StaticAnalyzer/Core/AnalysisManager.cpp
  7. 0 0
      lib/StaticAnalyzer/Core/BasicConstraintManager.cpp
  8. 0 0
      lib/StaticAnalyzer/Core/BasicStore.cpp
  9. 0 0
      lib/StaticAnalyzer/Core/BasicValueFactory.cpp
  10. 0 0
      lib/StaticAnalyzer/Core/BlockCounter.cpp
  11. 0 0
      lib/StaticAnalyzer/Core/BugReporter.cpp
  12. 0 0
      lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
  13. 0 0
      lib/StaticAnalyzer/Core/CFRefCount.cpp
  14. 41 0
      lib/StaticAnalyzer/Core/CMakeLists.txt
  15. 0 0
      lib/StaticAnalyzer/Core/CXXExprEngine.cpp
  16. 0 0
      lib/StaticAnalyzer/Core/Checker.cpp
  17. 0 0
      lib/StaticAnalyzer/Core/CheckerHelpers.cpp
  18. 0 0
      lib/StaticAnalyzer/Core/CoreEngine.cpp
  19. 0 0
      lib/StaticAnalyzer/Core/Environment.cpp
  20. 0 0
      lib/StaticAnalyzer/Core/ExplodedGraph.cpp
  21. 0 0
      lib/StaticAnalyzer/Core/FlatStore.cpp
  22. 0 0
      lib/StaticAnalyzer/Core/GRState.cpp
  23. 0 0
      lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp
  24. 17 0
      lib/StaticAnalyzer/Core/Makefile
  25. 0 0
      lib/StaticAnalyzer/Core/ManagerRegistry.cpp
  26. 0 0
      lib/StaticAnalyzer/Core/MemRegion.cpp
  27. 0 0
      lib/StaticAnalyzer/Core/ObjCMessage.cpp
  28. 0 0
      lib/StaticAnalyzer/Core/PathDiagnostic.cpp
  29. 0 0
      lib/StaticAnalyzer/Core/PlistDiagnostics.cpp
  30. 0 0
      lib/StaticAnalyzer/Core/RangeConstraintManager.cpp
  31. 0 0
      lib/StaticAnalyzer/Core/RegionStore.cpp
  32. 0 0
      lib/StaticAnalyzer/Core/SValBuilder.cpp
  33. 0 0
      lib/StaticAnalyzer/Core/SVals.cpp
  34. 0 0
      lib/StaticAnalyzer/Core/SimpleConstraintManager.cpp
  35. 0 0
      lib/StaticAnalyzer/Core/SimpleConstraintManager.h
  36. 0 0
      lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp
  37. 0 0
      lib/StaticAnalyzer/Core/Store.cpp
  38. 0 0
      lib/StaticAnalyzer/Core/SymbolManager.cpp
  39. 0 0
      lib/StaticAnalyzer/Core/TextPathDiagnostics.cpp
  40. 2 4
      lib/StaticAnalyzer/Makefile

+ 0 - 1
lib/CMakeLists.txt

@@ -13,4 +13,3 @@ add_subdirectory(Frontend)
 add_subdirectory(FrontendTool)
 add_subdirectory(Index)
 add_subdirectory(StaticAnalyzer)
-add_subdirectory(StaticAnalyzer/Checkers)

+ 2 - 42
lib/StaticAnalyzer/CMakeLists.txt

@@ -1,42 +1,2 @@
-set(LLVM_NO_RTTI 1)
-
-set(LLVM_USED_LIBS clangBasic clangLex clangAST clangFrontend clangRewrite)
-
-add_clang_library(clangStaticAnalyzerCore
-  AggExprVisitor.cpp
-  AnalysisManager.cpp
-  AnalyzerStatsChecker.cpp
-  BasicConstraintManager.cpp
-  BasicStore.cpp
-  BasicValueFactory.cpp
-  BugReporter.cpp
-  BugReporterVisitors.cpp
-  CFRefCount.cpp
-  Checker.cpp
-  CheckerHelpers.cpp
-  Environment.cpp
-  ExplodedGraph.cpp
-  FlatStore.cpp
-  BlockCounter.cpp
-  CXXExprEngine.cpp
-  CoreEngine.cpp
-  GRState.cpp
-  HTMLDiagnostics.cpp
-  ManagerRegistry.cpp
-  MemRegion.cpp
-  ObjCMessage.cpp
-  PathDiagnostic.cpp
-  PlistDiagnostics.cpp
-  RangeConstraintManager.cpp
-  RegionStore.cpp
-  SimpleConstraintManager.cpp
-  SimpleSValBuilder.cpp
-  Store.cpp
-  SValBuilder.cpp
-  SVals.cpp
-  SymbolManager.cpp
-  TextPathDiagnostics.cpp
-  )
-
-add_dependencies(clangStaticAnalyzerCore ClangAttrClasses ClangAttrList ClangDeclNodes
-                 ClangStmtNodes)
+add_subdirectory(Core)
+add_subdirectory(Checkers)

+ 1 - 1
lib/StaticAnalyzer/AnalyzerStatsChecker.cpp → lib/StaticAnalyzer/Checkers/AnalyzerStatsChecker.cpp

@@ -14,7 +14,7 @@
 #include "clang/StaticAnalyzer/BugReporter/BugReporter.h"
 
 // FIXME: Restructure checker registration.
-#include "Checkers/ExperimentalChecks.h"
+#include "ExperimentalChecks.h"
 
 #include "clang/Basic/SourceManager.h"
 #include "llvm/ADT/SmallPtrSet.h"

+ 1 - 0
lib/StaticAnalyzer/Checkers/CMakeLists.txt

@@ -5,6 +5,7 @@ set(LLVM_USED_LIBS clangBasic clangAST)
 add_clang_library(clangStaticAnalyzerCheckers
   AdjustedReturnValueChecker.cpp
   AnalysisConsumer.cpp
+  AnalyzerStatsChecker.cpp
   ArrayBoundChecker.cpp
   ArrayBoundCheckerV2.cpp
   AttrNonNullChecker.cpp

+ 0 - 0
lib/StaticAnalyzer/AggExprVisitor.cpp → lib/StaticAnalyzer/Core/AggExprVisitor.cpp


+ 0 - 0
lib/StaticAnalyzer/AnalysisManager.cpp → lib/StaticAnalyzer/Core/AnalysisManager.cpp


+ 0 - 0
lib/StaticAnalyzer/BasicConstraintManager.cpp → lib/StaticAnalyzer/Core/BasicConstraintManager.cpp


+ 0 - 0
lib/StaticAnalyzer/BasicStore.cpp → lib/StaticAnalyzer/Core/BasicStore.cpp


+ 0 - 0
lib/StaticAnalyzer/BasicValueFactory.cpp → lib/StaticAnalyzer/Core/BasicValueFactory.cpp


+ 0 - 0
lib/StaticAnalyzer/BlockCounter.cpp → lib/StaticAnalyzer/Core/BlockCounter.cpp


+ 0 - 0
lib/StaticAnalyzer/BugReporter.cpp → lib/StaticAnalyzer/Core/BugReporter.cpp


+ 0 - 0
lib/StaticAnalyzer/BugReporterVisitors.cpp → lib/StaticAnalyzer/Core/BugReporterVisitors.cpp


+ 0 - 0
lib/StaticAnalyzer/CFRefCount.cpp → lib/StaticAnalyzer/Core/CFRefCount.cpp


+ 41 - 0
lib/StaticAnalyzer/Core/CMakeLists.txt

@@ -0,0 +1,41 @@
+set(LLVM_NO_RTTI 1)
+
+set(LLVM_USED_LIBS clangBasic clangLex clangAST clangFrontend clangRewrite)
+
+add_clang_library(clangStaticAnalyzerCore
+  AggExprVisitor.cpp
+  AnalysisManager.cpp
+  BasicConstraintManager.cpp
+  BasicStore.cpp
+  BasicValueFactory.cpp
+  BugReporter.cpp
+  BugReporterVisitors.cpp
+  CFRefCount.cpp
+  Checker.cpp
+  CheckerHelpers.cpp
+  Environment.cpp
+  ExplodedGraph.cpp
+  FlatStore.cpp
+  BlockCounter.cpp
+  CXXExprEngine.cpp
+  CoreEngine.cpp
+  GRState.cpp
+  HTMLDiagnostics.cpp
+  ManagerRegistry.cpp
+  MemRegion.cpp
+  ObjCMessage.cpp
+  PathDiagnostic.cpp
+  PlistDiagnostics.cpp
+  RangeConstraintManager.cpp
+  RegionStore.cpp
+  SimpleConstraintManager.cpp
+  SimpleSValBuilder.cpp
+  Store.cpp
+  SValBuilder.cpp
+  SVals.cpp
+  SymbolManager.cpp
+  TextPathDiagnostics.cpp
+  )
+
+add_dependencies(clangStaticAnalyzerCore ClangAttrClasses ClangAttrList ClangDeclNodes
+                 ClangStmtNodes)

+ 0 - 0
lib/StaticAnalyzer/CXXExprEngine.cpp → lib/StaticAnalyzer/Core/CXXExprEngine.cpp


+ 0 - 0
lib/StaticAnalyzer/Checker.cpp → lib/StaticAnalyzer/Core/Checker.cpp


+ 0 - 0
lib/StaticAnalyzer/CheckerHelpers.cpp → lib/StaticAnalyzer/Core/CheckerHelpers.cpp


+ 0 - 0
lib/StaticAnalyzer/CoreEngine.cpp → lib/StaticAnalyzer/Core/CoreEngine.cpp


+ 0 - 0
lib/StaticAnalyzer/Environment.cpp → lib/StaticAnalyzer/Core/Environment.cpp


+ 0 - 0
lib/StaticAnalyzer/ExplodedGraph.cpp → lib/StaticAnalyzer/Core/ExplodedGraph.cpp


+ 0 - 0
lib/StaticAnalyzer/FlatStore.cpp → lib/StaticAnalyzer/Core/FlatStore.cpp


+ 0 - 0
lib/StaticAnalyzer/GRState.cpp → lib/StaticAnalyzer/Core/GRState.cpp


+ 0 - 0
lib/StaticAnalyzer/HTMLDiagnostics.cpp → lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp


+ 17 - 0
lib/StaticAnalyzer/Core/Makefile

@@ -0,0 +1,17 @@
+##===- clang/lib/StaticAnalyzer/Core/Makefile --------------*- Makefile -*-===##
+# 
+#                     The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+# 
+##===----------------------------------------------------------------------===##
+#
+# This implements analyses built on top of source-level CFGs. 
+#
+##===----------------------------------------------------------------------===##
+
+CLANG_LEVEL := ../../..
+LIBRARYNAME := clangStaticAnalyzerCore
+
+include $(CLANG_LEVEL)/Makefile

+ 0 - 0
lib/StaticAnalyzer/ManagerRegistry.cpp → lib/StaticAnalyzer/Core/ManagerRegistry.cpp


+ 0 - 0
lib/StaticAnalyzer/MemRegion.cpp → lib/StaticAnalyzer/Core/MemRegion.cpp


+ 0 - 0
lib/StaticAnalyzer/ObjCMessage.cpp → lib/StaticAnalyzer/Core/ObjCMessage.cpp


+ 0 - 0
lib/StaticAnalyzer/PathDiagnostic.cpp → lib/StaticAnalyzer/Core/PathDiagnostic.cpp


+ 0 - 0
lib/StaticAnalyzer/PlistDiagnostics.cpp → lib/StaticAnalyzer/Core/PlistDiagnostics.cpp


+ 0 - 0
lib/StaticAnalyzer/RangeConstraintManager.cpp → lib/StaticAnalyzer/Core/RangeConstraintManager.cpp


+ 0 - 0
lib/StaticAnalyzer/RegionStore.cpp → lib/StaticAnalyzer/Core/RegionStore.cpp


+ 0 - 0
lib/StaticAnalyzer/SValBuilder.cpp → lib/StaticAnalyzer/Core/SValBuilder.cpp


+ 0 - 0
lib/StaticAnalyzer/SVals.cpp → lib/StaticAnalyzer/Core/SVals.cpp


+ 0 - 0
lib/StaticAnalyzer/SimpleConstraintManager.cpp → lib/StaticAnalyzer/Core/SimpleConstraintManager.cpp


+ 0 - 0
lib/StaticAnalyzer/SimpleConstraintManager.h → lib/StaticAnalyzer/Core/SimpleConstraintManager.h


+ 0 - 0
lib/StaticAnalyzer/SimpleSValBuilder.cpp → lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp


+ 0 - 0
lib/StaticAnalyzer/Store.cpp → lib/StaticAnalyzer/Core/Store.cpp


+ 0 - 0
lib/StaticAnalyzer/SymbolManager.cpp → lib/StaticAnalyzer/Core/SymbolManager.cpp


+ 0 - 0
lib/StaticAnalyzer/TextPathDiagnostics.cpp → lib/StaticAnalyzer/Core/TextPathDiagnostics.cpp


+ 2 - 4
lib/StaticAnalyzer/Makefile

@@ -1,4 +1,4 @@
-##===- clang/lib/Checker/Makefile --------------------------*- Makefile -*-===##
+##===- clang/lib/StaticAnalyzer/Makefile -------------------*- Makefile -*-===##
 # 
 #                     The LLVM Compiler Infrastructure
 #
@@ -12,8 +12,6 @@
 ##===----------------------------------------------------------------------===##
 
 CLANG_LEVEL := ../..
-LIBRARYNAME := clangStaticAnalyzerCore
-PARALLEL_DIRS := Checkers
+PARALLEL_DIRS := Core Checkers
 
 include $(CLANG_LEVEL)/Makefile
-