r/cpp • u/c0r3ntin • Feb 24 '26
Clang 22 Release Notes
https://releases.llvm.org/22.1.0/tools/clang/docs/ReleaseNotes.htmlLLVM 22 was released, update your toolchains!
118
Upvotes
r/cpp • u/c0r3ntin • Feb 24 '26
LLVM 22 was released, update your toolchains!
View all comments
Show parent comment
3
u/smdowney WG21, Text/Unicode SG, optional<T&> Feb 26 '26
Yes, and that's all excellent news, especially for the clang-tidy embedded in clangd. That's even more (soft) real time.
The thing about -isystem is that it also changes the order of search paths. In nice environments that's fine, and you mostly just have to worry about not getting a /usr/include header when you intended your local vendored heder. Or the "same" one that you just happen to be working on.
In less nice environments, you have a delicate dance of searching for the right header, carefully hiding or shadowing one, to replace or change some other version appearing elsewhere on the filesystem. Maybe you even #include_next to pick up the other one. In the nightmare case, changing to SYSTEM still compiles, but the meaning has changed. And you don't discover this until someone else uses your new build.
This is not "good" or how things ought to work, but the larger the system the more likely someone has to apply these "clever" hacks.
And that is all why I say that SYSTEM, although useful, couples too many things together that would be better to be separated out. I'd love to be able to say "don't warn on these immutable header files" without changing anything else.
But "the street finds its own uses for things," and that's where we are with system.