[llvm] Make TestData compatible with c++20 (#143801)
The clang-debian-cpp20 buildbot did not like direct initialization
without a matching constructor. This patch adds a new constructor taking
a json::Object that directly initializes the struct fields. We also
update an internal interface for const correctness.
https://lab.llvm.org/buildbot/#/builders/108/builds/13950