My clang on MacOS that is provided by Apple seems to be a bit outdated.
> clang -v
Apple clang version 12.0.5 (clang-1205.0.22.9)
Target: arm64-apple-darwin22.1.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
But my MacOS is up to date: MacOS Ventura 13.0.1 I have recently installed Xcode version 14.1, but I think the Xcode developer tools (CLI tools) are installed independently.
How can I upgrade the clang that is provided by Apple on MacOS? According to Xcode on Wikipedia it looks like the clang used by Xcode is newer.
Some command outputs:
>where clang
/usr/bin/clang
>xcode-select -p
/Library/Developer/CommandLineTools
>sudo xcode-select -r
xcode-select -p
/Applications/Xcode.app/Contents/Developer
This looks like you've got remnants of an Xcode 12.5 installation on your system.
Things I would try/check:
where clang
say? Is it/usr/bin/clang
?xcode-select -p
? It should be something like/Applications/Xcode.app/Contents/Developer
(depending on where/how you installed Xcode).xcode-select -s <path>
with the path to your Xcode installation, or try resetting withxcode-select -r
sudo xcode-select --install
may force a new installation of the commandline toolsIn any case, the output of
clang -v
on my Ventura box isas one would expect.