6 Commits

Author SHA1 Message Date
Aviral Goel
997f28069d
[clang][ssaf] Remove VFS support from SerializationFormat (#180891)
This change removes support for `VFS` in `SerializationFormat`,
introduced in https://github.com/llvm/llvm-project/pull/179516/. `VFS`
only provides a virtual input backend and its matched pair,
`VirtualOutputBackend`, does not provide support for an
`InMemoryOutputBackend`. There was an attempt from our end to implement
this support in https://github.com/llvm/llvm-project/pull/179515 but it
did not succeed. Supporting virtual reads but not virtual writes makes
the SerializationFormat APIs asymmetric. So we have decided to remove
`VFS` support altogether.

---------

Co-authored-by: Balazs Benics <benicsbalazs@gmail.com>
2026-02-11 11:44:11 -08:00
Balázs Benics
7e34aaeb91
[clang][ssaf][NFC] Refactor SerializationFormat to use macro-based field accessors (#180842)
This reduces code duplication and makes it easier to add new field
accessors.

Assisted-By: claude
2026-02-11 11:22:11 +00:00
Balázs Benics
8ccfa9a52d
[clang][ssaf] Make SerializationFormat llvm-RTTI friendly (#180616) 2026-02-10 08:38:33 +00:00
Balázs Benics
e59e9fcd38
[clang][ssaf] Add FormatInfo sub-registry and tests [2/2] (#179517)
Add `FormatInfoEntry` template to support per-analysis-type
serialization within a `SerializationFormat`.
This allows to implement different formats for the different analyses in
a decoupled way.

For testing, this patch also implements the MockSerializationFormat
demonstrating the FormatInfo sub-registry pattern.

Assisted-by: claude
Depends on #179516
rdar://169192127
2026-02-05 16:37:21 +00:00
Balázs Benics
77740f5577
[clang][ssaf] Add SerializationFormatRegistry [1/2] (#179516)
Add a registry infrastructure for SerializationFormat implementations,
enabling registration and instantiation of different serialization
formats.

For example:
```c++
  static SerializationFormatRegistry::Add<MyFormat>
    RegisterFormat("MyFormat", "Description");
```

Formats can then be instantiated by name using `makeFormat()`.

The patch also updates the SerializationFormat base class to accept
FileSystem for virtualising reading inputs eg. by using file overlays in
the future.

Assisted-by: claude
rdar://169192127
2026-02-05 16:34:54 +00:00
Aviral Goel
69c0f929e0
[SSAF] Add SerializationFormat Interface (#177719)
To support multiple serialization formats in SSAF this PR adds a common
serialization format interface. We will separately implement a
serialization format registry similar to
[this](https://github.com/llvm/llvm-project/pull/173290) PR, followed by
a JSON-based serialization format.
2026-01-29 09:19:07 -08:00