Unfortunately, yaml::Input::setCurrentDocument() and yaml::Input::nextDocument() are
internal APIs, the way we use them may cause a nullptr accessing when
processing an empty YAML file.
Details
Details
Diff Detail
Diff Detail
- Repository
- rCTE Clang Tools Extra
- Build Status
Buildable 26494 Build 26493: arc lint + arc unit
Event Timeline
Comment Actions
LGTM. Thanks for fixing this.
A few questions for the long-term:
- Should we consider removing the YAML support altogether?
- If we want to keep, are there non-private APIs that we could use? (I assume we need them to avoid keeping the whole parsed YAML tree in memory, right?)
Comment Actions
The motivation of the YAML is for debugging purpose (compared with the binary format), we might want to switch to another human-readable format like json.
- If we want to keep, are there non-private APIs that we could use? (I assume we need them to avoid keeping the whole parsed YAML tree in memory, right?)
This is the best way we've found so far. The public YAML APIs don't seem provide enough flexibility to read an Variant element (but I may miss something).