Skip to content
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ Notable changes are grouped by release. See [all releases](https://github.com/Co

## Unreleased

- Building requires LLVM 20. CMake rejects an older LLVM when it configures the build, where
LLVM 19 passed that check and then failed to compile. On macOS, `scripts/build.sh` looks for
Homebrew `llvm@20` before `llvm`, a later version, and no longer for `llvm@19` or `llvm@18`.
- The GitHub Action accepts `llvm-version: 20` only. On a runner for which apt.llvm.org
publishes no LLVM 20 packages, such as `ubuntu-26.04`, it stops with an error before
installing LLVM (#255).
- StackBufferOverflow and MultipleStoresToStackBuffer resolve each pointer variable to its
stack array once per function, by strongly connected components: pointer variables
assigned from one another no longer make the analysis walk every path between them,
Expand Down
3 changes: 1 addition & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ include(CheckLLVMVersion OPTIONAL)
include(CheckCXXCompilerFlag)

if(COMMAND check_llvm_version)
set(LLVM_MIN_REQUIRED_VERSION "19" CACHE STRING "Minimum required LLVM version")
check_llvm_version(${LLVM_MIN_REQUIRED_VERSION})
check_llvm_version(20)
else()
message(WARNING "check_llvm_version() not available, skipping LLVM version check")
endif()
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This document defines the expected workflow for code, tests, and pull requests.

Prerequisites:
- CMake `>= 3.16`
- LLVM/Clang `>= 19` (20 recommended)
- LLVM/Clang 20
- A C++20 compiler

Build:
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

#### BUILD (macOS/Linux)

The analyzer builds with LLVM and Clang 20 only. On macOS, install them with
`brew install llvm@20`, not `llvm`, which is a later version. On Ubuntu, install
`llvm-20-dev`, `libclang-20-dev` and `clang-20` from apt.llvm.org.

```zsh
./build.sh
```
Expand Down
2 changes: 1 addition & 1 deletion scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ detect_from_brew() {

local formula
local prefix
for formula in llvm llvm@20 llvm@19 llvm@18; do
for formula in llvm@20 llvm; do
prefix="$(brew --prefix "$formula" 2>/dev/null || true)"
if [ -n "$prefix" ] && [ -d "$prefix" ]; then
if [ -z "$LLVM_DIR" ] && [ -d "$prefix/lib/cmake/llvm" ]; then
Expand Down
Loading