[analyzer] New checker for std::any as a BSc thesis

Interesting!

Have you considered std::variant as well? It appears to be similar but arguably more practical. At least, that’s something I’ve reached for a few times myself (before remembering that in LLVM we use custom RTTI instead). After all, discriminated union types and algebraic type systems are hot right now.

How difficult are these classes to inline? Say, with smart pointers we were wary of null checks and, for shared pointers, reference count checks. But if the class doesn’t have any “unexpected” nested branches, maybe we should just force-inline it all? (By “expected” inlined branches I mean branches in nested stack frames such that hitting that branch is the whole point of calling the function, eg. isa(); such branches don’t cause unwanted execution paths to appear, so a state split over them is “justified” in the caller stack frame).

Technically this sounds straightforward enough, as long as you know how to deal with C++ value semantics (i.e., objects under construction and related problems). As usual, I’ll encourage you folks to build a better checker API around those, so that it wasn’t too painful to implement the related boilerplate in every checker ^.^