PATH="/opt/homebrew/opt/llvm/bin${PATH:+:${PATH}}"; export PATH;
It should return something like:
$clang --version
Homebrew clang version 16.0.6
Target: arm64-apple-darwin22.6.0
Thread model: posix
InstalledDir: /opt/homebrew/opt/llvm/bin
brew install llvm@{version}
For llvm-sys library, it can be configured using environment variable like:
export LLVM_SYS_120_PREFIX=/opt/homebrew/opt/llvm@12