Skip to content

Commit

Permalink
[analyzer] SATestBuild.py: Optionally override compiler
Browse files Browse the repository at this point in the history
Differential Revision: https://reviews.llvm.org/D80211

(cherry picked from commit 6846aec)
  • Loading branch information
SavchenkoValeriy authored and haoNoQ committed May 25, 2020
1 parent b529ca1 commit 22ebf99
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions clang/utils/analyzer/SATestBuild.py
Expand Up @@ -291,9 +291,9 @@ def runScanBuild(Args, Dir, SBOutputDir, PBuildLogFile):
SBOptions += "--keep-empty "
SBOptions += "-analyzer-config '%s' " % generateAnalyzerConfig(Args)

# Always use ccc-analyze to ensure that we can locate the failures
# directory.
SBOptions += "--override-compiler "
if Args.override_compiler:
SBOptions += "--override-compiler "

ExtraEnv = {}
try:
SBCommandFile = open(BuildScriptPath, "r")
Expand Down Expand Up @@ -800,11 +800,14 @@ def testAll(Args):
reference. Default is 0.')
Parser.add_argument('-r', dest='regenerate', action='store_true',
default=False, help='Regenerate reference output.')
Parser.add_argument('--override-compiler', action='store_true',
default=False, help='Call scan-build with \
--override-compiler option.')
Parser.add_argument('-j', '--jobs', dest='jobs', type=int,
default=0,
help='Number of projects to test concurrently')
Parser.add_argument('--extra-analyzer-config', dest='extra_analyzer_config',
type=str,
Parser.add_argument('--extra-analyzer-config',
dest='extra_analyzer_config', type=str,
default="",
help="Arguments passed to to -analyzer-config")
Args = Parser.parse_args()
Expand Down

0 comments on commit 22ebf99

Please sign in to comment.