================
@@ -67,10 +75,102 @@ class SerializationFormat {
static EntityId makeEntityId(const size_t Index) { return EntityId(Index); }
+ /// Constructs an empty WPASuite. Bypasses the private default constructor
+ /// so that deserialization code can build a WPASuite incrementally.
+ static WPASuite makeWPASuite() { return WPASuite(); }
+
#define FIELD(CLASS, FIELD_NAME)
\
static const auto &get##FIELD_NAME(const CLASS &X) { return X.FIELD_NAME; }
\
static auto &get##FIELD_NAME(CLASS &X) { return X.FIELD_NAME; }
#include
"clang/ScalableStaticAnalysisFramework/Core/Model/PrivateFieldNames.def"
+
+ /// Per-format plugin registry for analysis result (de)serializers.
+ ///
+ /// Each concrete format (e.g. JSONFormat) instantiates this template once
+ /// via a public \c using alias. Analysis authors register support with:
+ ///
+ /// static MyFormat::AnalysisResultRegistry::Add<MyAnalysisResult>
+ /// Reg(serializeFn, deserializeFn);
+ ///
+ /// The serializer receives \c const MyAnalysisResult & directly — the
----------------
aviralg wrote:
Changed the comments to avoid this problem altogether.
https://github.com/llvm/llvm-project/pull/187403
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits