[analyzer] SATestBuild.py: Fix support for #NOPREFIX.
authorArtem Dergachev <artem.dergachev@gmail.com>
Tue, 12 May 2020 19:43:32 +0000 (22:43 +0300)
committerArtem Dergachev <artem.dergachev@gmail.com>
Tue, 12 May 2020 19:43:32 +0000 (22:43 +0300)
Regressed in ec2d93c.

clang/utils/analyzer/SATestBuild.py

index 38273af..347f1e2 100755 (executable)
@@ -298,7 +298,7 @@ def runScanBuild(Args, Dir, SBOutputDir, PBuildLogFile):
         SBPrefix = "scan-build " + SBOptions + " "
         for Command in SBCommandFile:
             Command = Command.strip()
-            if len(Command) == 0 or Command.startswith("#"):
+            if len(Command) == 0:
                 continue
 
             # Custom analyzer invocation specified by project.
@@ -311,6 +311,9 @@ def runScanBuild(Args, Dir, SBOutputDir, PBuildLogFile):
                 ExtraEnv['ANALYZER_CONFIG'] = generateAnalyzerConfig(Args)
                 continue
 
+            if Command.startswith("#"):
+                continue
+
             # If using 'make', auto imply a -jX argument
             # to speed up analysis.  xcodebuild will
             # automatically use the maximum number of cores.