Last active
October 23, 2022 11:33
-
-
Save tienntr/8de8d8ff370d512aad5d4776884ade23 to your computer and use it in GitHub Desktop.
Newer Clang/LLVM on CentOS7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd /etc/pki/rpm-gpg | |
curl -O http://springdale.princeton.edu/data/springdale/7/x86_64/os/RPM-GPG-KEY-springdale | |
cd /etc/yum.repos.d | |
cat << EOF > Springdale-SCL.repo | |
[Springdale-SCL] | |
name=Springdale - SCL | |
baseurl=http://springdale.princeton.edu/data/springdale/SCL/$releasever/$basearch | |
gpgcheck=1 | |
enabled=1 | |
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-springdale | |
EOF | |
yum install llvm-toolset-13.0 llvm-toolset-13.0-clang-analyzer llvm-toolset-13.0-clang-tools-extra |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Static analysis with Z3 | |
printf "void f(){}" | clang -xc - -o - --analyze -Xclang -analyzer-constraints=z3 | |
# Z3 refutation, require Z3 (see above) | |
clang -cc1 -analyzer-config-help | grep crosscheck-with-z3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment