clang 23.0.0git
clang::ssaf::SerializationFormat::AnalysisResultRegistryGenerator< FormatT, SerializerFn, DeserializerFn > Class Template Reference

Per-format plugin registry for analysis result (de)serializers. More...

Inheritance diagram for clang::ssaf::SerializationFormat::AnalysisResultRegistryGenerator< FormatT, SerializerFn, DeserializerFn >:
[legend]

Detailed Description

template<class FormatT, class SerializerFn, class DeserializerFn>
class clang::ssaf::SerializationFormat::AnalysisResultRegistryGenerator< FormatT, SerializerFn, DeserializerFn >

Per-format plugin registry for analysis result (de)serializers.

Each concrete format (e.g. JSONFormat) instantiates this template once via a public using alias. Analysis authors register support with:

static MyFormat::AnalysisResultRegistry::Add<MyAnalysisResult>
Reg(serializeFn, deserializeFn);

The serializer receives a const reference to MyAnalysisResult directly and the Add wrapper handles the downcast from AnalysisResult internally via virtual dispatch.

Template Parameters
FormatTPhantom type is needed to disambiguate llvm::Registry instantiations. llvm::Registry is keyed on the Entry type, so two formats sharing the same serializer/deserializer signatures would collide on the same registry without this parameter.

Definition at line 106 of file SerializationFormat.h.


The documentation for this class was generated from the following file: