[lldb] Fix TestDataFormatterLibcxxString broken by D129490
authorPavel Labath <pavel@labath.sk>
Tue, 12 Jul 2022 18:05:20 +0000 (20:05 +0200)
committerPavel Labath <pavel@labath.sk>
Tue, 12 Jul 2022 18:12:22 +0000 (20:12 +0200)
commita72306e202eedaed7c1a25caf4565bf5577110ce
tree28c772892cee570c21569379e0ecf88cd359931a
parent514dd3c3c334251e573cf2201273ab3c38982e94
[lldb] Fix TestDataFormatterLibcxxString broken by D129490

We need to check for the error inside the value object to avoid reading
garbage through invalid (target) pointers.
lldb/source/Plugins/Language/CPlusPlus/LibCxx.cpp