This is an archive of the discontinued LLVM Phabricator instance.

[Support/YAMLTraits] - Refactor of Input::createHNodes
AbandonedPublic

Authored by grimar on Sep 19 2017, 8:38 AM.

Details

Summary

I tried to fix crash issue relative to this method and found it is hard to read.
It contained duplicated piece of code which is now moved to helper function and shared.
When error happened it returned half-broken instance of node, and since
createHNodes itself a reqursive method, it had to check EC in caller,
when I believe it is enough just to return nullptr on any error,
just like it already do for unknown node.
It is also was possible to use early returns, patch did that.

Diff Detail