Previously, it was only documented by -cc1 -help, so people weren't
aware of it, as discussed in D60732.
Details
Diff Detail
Event Timeline
Thanks you!
I really like live working examples, I hope not just me. Could you link https://github.com/llvm/llvm-project/blob/master/clang/test/Analysis/use-after-move.cpp as well as a live example?
Yup, i confirm that this improves discoverability of this feature :) Maybe it deserves its own .rst doc, like FileCheck, but for now doxygen seems to be the best source of truth on how to use -verify and i consult it regularly.
I'd rather reserve an ability for myself to move the test around without breaking links all over the place. Live examples are easy to grep for as soon as you know what to grep for.
I've seen a few projects outside of clang use -verify mode for their own testing of various things. Maybe it's time we promote it from an internal self-testing tool to a full-fledged and supported part of Clang's interface (including adding a driver flag and a proper description in the user manual)?
Thanks. I just took a quick glance at libc++. I see checks that the library manages to induce desired compiler diagnostics in code that incorrectly interfaces with the library. That's a nice capability to expose, especially for people writing C++ libraries.