Support: Stop relying on iterator auto-conversion, NFC
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Thu, 8 Oct 2015 22:47:55 +0000 (22:47 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Thu, 8 Oct 2015 22:47:55 +0000 (22:47 +0000)
commite38e995296990da45788fe474d38d2642d38026b
treebbae7cc1bb6d595f08a7c561421ff3ccf24012fa
parent1f7789545d94098d6147593fd065fb23086ec2a4
Support: Stop relying on iterator auto-conversion, NFC

Stop relying on ilist implicit conversions from `value_type&` to
`iterator` in YAMLParser.cpp.

I eventually want to outlaw this entirely.  It encourages
`getNextNode()` and `getPrevNode()` in iterator logic, which is
extremely fragile (and relies on them never returning `nullptr`).

FTR, there's nothing nefarious going on in this case, it was just easy
to clean up since the callers really wanted iterators to begin with.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249767 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Support/YAMLParser.cpp