Index: tools/CMakeLists.txt =================================================================== --- tools/CMakeLists.txt +++ tools/CMakeLists.txt @@ -5,6 +5,8 @@ add_clang_subdirectory(clang-format) add_clang_subdirectory(clang-format-vs) add_clang_subdirectory(clang-fuzzer) +add_clang_subdirectory(scan-build) +add_clang_subdirectory(scan-view) add_clang_subdirectory(c-index-test) add_clang_subdirectory(libclang) Index: tools/Makefile =================================================================== --- tools/Makefile +++ tools/Makefile @@ -15,7 +15,7 @@ PARALLEL_DIRS := clang-format driver diagtool ifeq ($(ENABLE_CLANG_STATIC_ANALYZER), 1) - PARALLEL_DIRS += clang-check + PARALLEL_DIRS += clang-check scan-build scan-view endif ifeq ($(ENABLE_CLANG_ARCMT), 1) Index: tools/scan-build/scan-build =================================================================== --- tools/scan-build/scan-build +++ tools/scan-build/scan-build @@ -1737,8 +1737,8 @@ # Determine the location of ccc-analyzer. my $AbsRealBin = Cwd::realpath($RealBin); -my $Cmd = "$AbsRealBin/libexec/ccc-analyzer"; -my $CmdCXX = "$AbsRealBin/libexec/c++-analyzer"; +my $Cmd = "$AbsRealBin/../libexec/ccc-analyzer"; +my $CmdCXX = "$AbsRealBin/../libexec/c++-analyzer"; # Portability: use less strict but portable check -e (file exists) instead of # non-portable -x (file is executable). On some windows ports -x just checks Index: tools/scan-view/Reporter.py =================================================================== --- tools/scan-view/Reporter.py +++ tools/scan-view/Reporter.py @@ -175,7 +175,7 @@ @staticmethod def isAvailable(): # FIXME: Find this .scpt better - path = os.path.join(os.path.dirname(__file__),'Resources/GetRadarVersion.scpt') + path = os.path.join(os.path.dirname(__file__),'../share/scan-view/GetRadarVersion.scpt') try: p = subprocess.Popen(['osascript',path], stdout=subprocess.PIPE, stderr=subprocess.PIPE) @@ -206,7 +206,7 @@ if not componentVersion.strip(): componentVersion = 'X' - script = os.path.join(os.path.dirname(__file__),'Resources/FileRadar.scpt') + script = os.path.join(os.path.dirname(__file__),'../share/scan-view/FileRadar.scpt') args = ['osascript', script, component, componentVersion, classification, personID, report.title, report.description, diagnosis, config] + map(os.path.abspath, report.files) # print >>sys.stderr, args Index: tools/scan-view/ScanView.py =================================================================== --- tools/scan-view/ScanView.py +++ tools/scan-view/ScanView.py @@ -73,7 +73,7 @@ ### # Other simple parameters -kResources = posixpath.join(posixpath.dirname(__file__), 'Resources') +kResources = posixpath.join(posixpath.dirname(__file__), '../share/scan-view') kConfigPath = os.path.expanduser('~/.scanview.cfg') ###