2. How to Extend the Framework#
Warning
The framework is rapidly evolving. The documentation might be out-of-sync with the implementation. The purpose of this documentation is to give context for upcoming reviews.
SSAF is designed to be extensible with new summary extractors and serialization formats. Extensions can be added in three ways:
Statically, in-tree — built as part of the upstream LLVM/Clang tree.
Statically, out-of-tree (downstream) — built in a downstream fork or project that links
clangScalableStaticAnalysisCoreas a static library.Dynamically, via plugins — loaded at runtime as shared objects.
All three approaches use the same llvm::Registry-based registration mechanism.
The key difference is how the linker sees the registration:
static libraries need force-linker anchors to prevent dead-stripping, while shared libraries do not.
2.1. Adding a summary extractor#
A summary extractor is an ASTConsumer that inspects the AST and populates a