Fix set-xcode-analyzer to only modify the ExecPath for the analyzer when using --use-xcode-clang.
Turns out that the ExecPath for the ObjC migrator would also get set.
Fixes <rdar://problem/12961769>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171607 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/scan-build/set-xcode-analyzer b/tools/scan-build/set-xcode-analyzer
index e76e304..a32e676 100755
--- a/tools/scan-build/set-xcode-analyzer
+++ b/tools/scan-build/set-xcode-analyzer
@@ -45,6 +45,8 @@
m = re.search('^(\s*ExecPath\s*=\s*")', line)
if m:
line = "".join([m.group(0), pathToChecker, '";\n'])
+ # Do not modify further ExecPath's later in the xcspec.
+ foundAnalyzer = False
t.write(line)
t.close()
print "(+) processing:", path