Commit b6441da2 authored by Leo's avatar Leo
Browse files

main/clang: switch to python3 for clang-analyzer

parent f62f9a1c
Pipeline #1400 failed with stages
in 27 minutes and 48 seconds
diff --git a/bindings/python/examples/cindex/cindex-dump.py b/bindings/python/examples/cindex/cindex-dump.py
index 46073b28..fc513c7e 100644
--- a/bindings/python/examples/cindex/cindex-dump.py
+++ b/bindings/python/examples/cindex/cindex-dump.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#===- cindex-dump.py - cindex/Python Source Dump -------------*- python -*--===#
#
diff --git a/bindings/python/examples/cindex/cindex-includes.py b/bindings/python/examples/cindex/cindex-includes.py
index ec1fbc0c..be600342 100644
--- a/bindings/python/examples/cindex/cindex-includes.py
+++ b/bindings/python/examples/cindex/cindex-includes.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#===- cindex-includes.py - cindex/Python Inclusion Graph -----*- python -*--===#
#
diff --git a/docs/tools/dump_ast_matchers.py b/docs/tools/dump_ast_matchers.py
index c96c1ca2..26cf4156 100755
--- a/docs/tools/dump_ast_matchers.py
+++ b/docs/tools/dump_ast_matchers.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# A tool to parse ASTMatchers.h and update the documentation in
# ../LibASTMatchersReference.html automatically. Run from the
# directory in which this file is located to update the docs.
diff --git a/docs/tools/dump_format_style.py b/docs/tools/dump_format_style.py
index 5feb793a..e18a2ffb 100755
--- a/docs/tools/dump_format_style.py
+++ b/docs/tools/dump_format_style.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# A tool to parse the FormatStyle struct from Format.h and update the
# documentation in ../ClangFormatStyleOptions.rst automatically.
# Run from the directory in which this file is located to update the docs.
diff --git a/test/AST/gen_ast_dump_json_test.py b/test/AST/gen_ast_dump_json_test.py
index 975039ea..9a6ee94c 100644
--- a/test/AST/gen_ast_dump_json_test.py
+++ b/test/AST/gen_ast_dump_json_test.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
from collections import OrderedDict
from sets import Set
diff --git a/tools/clang-format/clang-format-diff.py b/tools/clang-format/clang-format-diff.py
index 3ba0abef..6b0425a7 100755
--- a/tools/clang-format/clang-format-diff.py
+++ b/tools/clang-format/clang-format-diff.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
#===- clang-format-diff.py - ClangFormat Diff Reformatter ----*- python -*--===#
#
diff --git a/tools/clang-format/git-clang-format b/tools/clang-format/git-clang-format
index ef7f22d0..4ea4521f 100755
--- a/tools/clang-format/git-clang-format
+++ b/tools/clang-format/git-clang-format
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
#===- git-clang-format - ClangFormat Git Integration ---------*- python -*--===#
#
diff --git a/tools/scan-build-py/bin/analyze-build b/tools/scan-build-py/bin/analyze-build
index 6c285874..5b270d54 100755
--- a/tools/scan-build-py/bin/analyze-build
+++ b/tools/scan-build-py/bin/analyze-build
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
diff --git a/tools/scan-build-py/bin/analyze-c++ b/tools/scan-build-py/bin/analyze-c++
index 564e2abf..b2b60a44 100755
--- a/tools/scan-build-py/bin/analyze-c++
+++ b/tools/scan-build-py/bin/analyze-c++
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
diff --git a/tools/scan-build-py/bin/analyze-cc b/tools/scan-build-py/bin/analyze-cc
index 564e2abf..b2b60a44 100755
--- a/tools/scan-build-py/bin/analyze-cc
+++ b/tools/scan-build-py/bin/analyze-cc
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
diff --git a/tools/scan-build-py/bin/intercept-build b/tools/scan-build-py/bin/intercept-build
index 23f51047..fe45c545 100755
--- a/tools/scan-build-py/bin/intercept-build
+++ b/tools/scan-build-py/bin/intercept-build
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
diff --git a/tools/scan-build-py/bin/intercept-c++ b/tools/scan-build-py/bin/intercept-c++
index 4230c803..0cba3a3c 100755
--- a/tools/scan-build-py/bin/intercept-c++
+++ b/tools/scan-build-py/bin/intercept-c++
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
diff --git a/tools/scan-build-py/bin/intercept-cc b/tools/scan-build-py/bin/intercept-cc
index 4230c803..0cba3a3c 100755
--- a/tools/scan-build-py/bin/intercept-cc
+++ b/tools/scan-build-py/bin/intercept-cc
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
diff --git a/tools/scan-build-py/bin/scan-build b/tools/scan-build-py/bin/scan-build
index 156da064..4fa08175 100755
--- a/tools/scan-build-py/bin/scan-build
+++ b/tools/scan-build-py/bin/scan-build
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
diff --git a/tools/scan-view/bin/scan-view b/tools/scan-view/bin/scan-view
index 6165432e..07effbca 100755
--- a/tools/scan-view/bin/scan-view
+++ b/tools/scan-view/bin/scan-view
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
from __future__ import print_function
diff --git a/tools/scan-view/share/Reporter.py b/tools/scan-view/share/Reporter.py
index b1ff1614..d6300e78 100644
--- a/tools/scan-view/share/Reporter.py
+++ b/tools/scan-view/share/Reporter.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Methods for reporting bugs."""
diff --git a/tools/scan-view/share/startfile.py b/tools/scan-view/share/startfile.py
index 9eb548bc..cdf3db27 100644
--- a/tools/scan-view/share/startfile.py
+++ b/tools/scan-view/share/startfile.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Utility for opening a file using the default application in a cross-platform
diff --git a/utils/ABITest/ABITestGen.py b/utils/ABITest/ABITestGen.py
index 93a6de93..efb35fa7 100755
--- a/utils/ABITest/ABITestGen.py
+++ b/utils/ABITest/ABITestGen.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
from __future__ import absolute_import, division, print_function
from pprint import pprint
diff --git a/utils/CIndex/completion_logger_server.py b/utils/CIndex/completion_logger_server.py
index 20166711..02d7cd6f 100755
--- a/utils/CIndex/completion_logger_server.py
+++ b/utils/CIndex/completion_logger_server.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
from __future__ import absolute_import, division, print_function
import sys
from socket import *
diff --git a/utils/CaptureCmd b/utils/CaptureCmd
index 705585c3..5ffdfe56 100755
--- a/utils/CaptureCmd
+++ b/utils/CaptureCmd
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""CaptureCmd - A generic tool for capturing information about the
invocations of another program.
diff --git a/utils/CmpDriver b/utils/CmpDriver
index 12ce7a32..c2b6ab5e 100755
--- a/utils/CmpDriver
+++ b/utils/CmpDriver
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""
A simple utility that compares tool invocations and exit codes issued by
diff --git a/utils/FindSpecRefs b/utils/FindSpecRefs
index 9097f93f..3ad581b3 100755
--- a/utils/FindSpecRefs
+++ b/utils/FindSpecRefs
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
import os
import re
diff --git a/utils/FuzzTest b/utils/FuzzTest
index 0e043df7..c4c956b6 100755
--- a/utils/FuzzTest
+++ b/utils/FuzzTest
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""
This is a generic fuzz testing tool, see --help for more information.
diff --git a/utils/TestUtils/deep-stack.py b/utils/TestUtils/deep-stack.py
index 10bf47ac..5fb8d0df 100755
--- a/utils/TestUtils/deep-stack.py
+++ b/utils/TestUtils/deep-stack.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
from __future__ import absolute_import, division, print_function
def pcall(f, N):
diff --git a/utils/analyzer/CmpRuns.py b/utils/analyzer/CmpRuns.py
index 3fab6ef5..9baa7a48 100755
--- a/utils/analyzer/CmpRuns.py
+++ b/utils/analyzer/CmpRuns.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""
CmpRuns - A simple tool for comparing two static analyzer runs to determine
diff --git a/utils/analyzer/SATestAdd.py b/utils/analyzer/SATestAdd.py
index 52089f4e..d087a90b 100755
--- a/utils/analyzer/SATestAdd.py
+++ b/utils/analyzer/SATestAdd.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""
Static Analyzer qualification infrastructure: adding a new project to
diff --git a/utils/analyzer/SATestBuild.py b/utils/analyzer/SATestBuild.py
index 691ded80..b17b3db1 100755
--- a/utils/analyzer/SATestBuild.py
+++ b/utils/analyzer/SATestBuild.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""
Static Analyzer qualification infrastructure.
diff --git a/utils/analyzer/SATestUpdateDiffs.py b/utils/analyzer/SATestUpdateDiffs.py
index ea3c08cc..08e3f82f 100755
--- a/utils/analyzer/SATestUpdateDiffs.py
+++ b/utils/analyzer/SATestUpdateDiffs.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""
Update reference results for static analyzer.
diff --git a/utils/analyzer/SumTimerInfo.py b/utils/analyzer/SumTimerInfo.py
index 36e519ad..d1934f19 100644
--- a/utils/analyzer/SumTimerInfo.py
+++ b/utils/analyzer/SumTimerInfo.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""
Script to Summarize statistics in the scan-build output.
diff --git a/utils/analyzer/exploded-graph-rewriter.py b/utils/analyzer/exploded-graph-rewriter.py
index 5ce56d61..808f21c9 100755
--- a/utils/analyzer/exploded-graph-rewriter.py
+++ b/utils/analyzer/exploded-graph-rewriter.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
#===- exploded-graph-rewriter.py - ExplodedGraph dump tool -----*- python -*--#
#
diff --git a/utils/check_cfc/check_cfc.py b/utils/check_cfc/check_cfc.py
index 311f502f..0bbbc088 100755
--- a/utils/check_cfc/check_cfc.py
+++ b/utils/check_cfc/check_cfc.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""Check CFC - Check Compile Flow Consistency
diff --git a/utils/check_cfc/obj_diff.py b/utils/check_cfc/obj_diff.py
index a0951c5b..b3866948 100755
--- a/utils/check_cfc/obj_diff.py
+++ b/utils/check_cfc/obj_diff.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
from __future__ import absolute_import, division, print_function
diff --git a/utils/check_cfc/test_check_cfc.py b/utils/check_cfc/test_check_cfc.py
index 0808252a..6f149ebc 100755
--- a/utils/check_cfc/test_check_cfc.py
+++ b/utils/check_cfc/test_check_cfc.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""Test internal functions within check_cfc.py."""
diff --git a/utils/creduce-clang-crash.py b/utils/creduce-clang-crash.py
index be16211c..e56f3697 100755
--- a/utils/creduce-clang-crash.py
+++ b/utils/creduce-clang-crash.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""Calls C-Reduce to create a minimal reproducer for clang crashes.
Output files:
diff --git a/utils/hmaptool/hmaptool b/utils/hmaptool/hmaptool
index 58baab2f..00296f11 100755
--- a/utils/hmaptool/hmaptool
+++ b/utils/hmaptool/hmaptool
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
from __future__ import absolute_import, division, print_function
import json
diff --git a/utils/modfuzz.py b/utils/modfuzz.py
index 61ca3272..19a9807b 100644
--- a/utils/modfuzz.py
+++ b/utils/modfuzz.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
# To use:
# 1) Update the 'decls' list below with your fuzzing configuration.
diff --git a/utils/token-delta.py b/utils/token-delta.py
index 62b4eb3c..022fb2f8 100755
--- a/utils/token-delta.py
+++ b/utils/token-delta.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
from __future__ import absolute_import, division, print_function
import os
diff --git a/www/builtins.py b/www/builtins.py
index f0bcf196..54901487 100755
--- a/www/builtins.py
+++ b/www/builtins.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
import sys, fileinput
diff --git a/www/make_cxx_dr_status b/www/make_cxx_dr_status
index 2d7c1f32..bc24cd12 100755
--- a/www/make_cxx_dr_status
+++ b/www/make_cxx_dr_status
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
import sys, os, re
index = 'cwg_index.html'
......@@ -4,7 +4,7 @@
pkgname=clang
# Note: Update together with llvm.
pkgver=9.0.0
pkgrel=0
pkgrel=1
_llvmver=${pkgver%%.*}
pkgdesc="A C language family front-end for LLVM"
arch="all"
......@@ -30,7 +30,9 @@ subpackages="$pkgname-static $pkgname-dev $pkgname-doc $pkgname-libs
$pkgname-analyzer::noarch"
source="https://releases.llvm.org/$pkgver/cfe-$pkgver.src.tar.xz
10-add-musl-triples.patch
20-Enable-stack-protector-by-default-for-Alpine-Linux.patch"
20-Enable-stack-protector-by-default-for-Alpine-Linux.patch
30-fix-python-shebangs.patch
"
builddir="$srcdir/cfe-$pkgver.src"
......@@ -83,7 +85,7 @@ static() {
analyzer() {
pkgdesc="Clang source code analysis framework"
depends="$pkgname=$pkgver-r$pkgrel perl python2"
depends="$pkgname=$pkgver-r$pkgrel perl python3"
cd "$pkgdir"
......@@ -97,4 +99,5 @@ analyzer() {
sha512sums="83fcca5499102b375e620cdac97d75e6111ebed4ef10240859ddd8a88bc5b022703739d2eae0d8693c91892ad11fc6b531c0dbee62fbce68d3be595b94f0b1fe cfe-9.0.0.src.tar.xz
367dcd43b42570b5688c4bb41daf2498447e9fa4384896e2b91782017a8ce15b1e6e15cb3a465595d69e681420fce170a6f9a57ea5268e21f0dec7d4605e4c4c 10-add-musl-triples.patch
a8557c5a26774bf98548b9fe77cd54a1b0591bc75beffcb5fbd070986ba954d82255dddbcfcc884c07c3f433b1428c2a6ce649c3a158f4352f30e7057872335b 20-Enable-stack-protector-by-default-for-Alpine-Linux.patch"
a8557c5a26774bf98548b9fe77cd54a1b0591bc75beffcb5fbd070986ba954d82255dddbcfcc884c07c3f433b1428c2a6ce649c3a158f4352f30e7057872335b 20-Enable-stack-protector-by-default-for-Alpine-Linux.patch
c7f34b425b0dcea9752eeb7ff3d3a33af9cc45740fd3e77d52e4d610c5fd3daaa4d59138a255b057ef886915615a77ec1e6a447f3818b4b2724129c0ba354932 30-fix-python-shebangs.patch"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment