diff options
| author | Ted Kremenek <kremenek@apple.com> | 2010-02-09 18:46:58 +0000 |
|---|---|---|
| committer | Ted Kremenek <kremenek@apple.com> | 2010-02-09 18:46:58 +0000 |
| commit | 8de7a0efd1428e6a9a8bd6333801c1ba2f74a4e2 (patch) | |
| tree | a2437d28c29c9d1c4ba986dcc35b20291633a61e /clang/tools | |
| parent | cce7e85165b9d5cc6afd3e6c3d4ffb2edd3ddacc (diff) | |
| download | bcm5719-llvm-8de7a0efd1428e6a9a8bd6333801c1ba2f74a4e2.tar.gz bcm5719-llvm-8de7a0efd1428e6a9a8bd6333801c1ba2f74a4e2.zip | |
Add a check for a running Xcode before modifying its configuration files.
llvm-svn: 95675
Diffstat (limited to 'clang/tools')
| -rwxr-xr-x | clang/tools/scan-build/set-xcode-analyzer | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/clang/tools/scan-build/set-xcode-analyzer b/clang/tools/scan-build/set-xcode-analyzer index cf0ba3a1af0..5f7551b7cb8 100755 --- a/clang/tools/scan-build/set-xcode-analyzer +++ b/clang/tools/scan-build/set-xcode-analyzer @@ -6,6 +6,7 @@ import re import tempfile import shutil import stat +from AppKit import * def FindClangSpecs(path): for root, dirs, files in os.walk(path): @@ -50,6 +51,12 @@ def main(): if options.path is None and options.default is None: parser.error("You must specify a version of Clang to use for static analysis. Specify '-h' for details") + # determine if Xcode is running + for x in NSWorkspace.sharedWorkspace().runningApplications(): + if x.localizedName().find("Xcode") >= 0: + print "You must quit Xcode first before modifying its configuration files." + return + if options.path: # Expand tildes. path = os.path.expanduser(options.path) @@ -61,8 +68,8 @@ def main(): else: print "Using the Clang bundled with Xcode" path = options.default - print "" + for x in FindClangSpecs('/Developer'): ModifySpec(x, path) |

