[lldb] Fix `TestDataFormatterStdList` regression
authorJan Kratochvil <jan.kratochvil@redhat.com>
Thu, 22 Aug 2019 14:29:52 +0000 (14:29 +0000)
committerJan Kratochvil <jan.kratochvil@redhat.com>
Thu, 22 Aug 2019 14:29:52 +0000 (14:29 +0000)
commitb17d6c52fd4eaa5ae26b1ec5eea642d6d933ee37
tree364bed0212cd9e0b60d3d0697b3c3bb10aa7e500
parent70576cac521a3d6eb90db41fa2e60b4b55eec861
[lldb] Fix `TestDataFormatterStdList` regression

Since D66174 I see failures of TestDataFormatterStdList in about 50% of runs on
Fedora 30 x86_64 libstdc++. I have found out that LLDB internally expects these
RegularExpressions to be matched in their alphabetical order:
^std::(__cxx11::)?list<.+>(( )?&)?$
^std::__[[:alnum:]]+::list<.+>(( )?&)?$

But since D66174 they are sometimes matched in reverse order. In fact it was
only some luck it worked before as there is internally
std::map<lldb::RegularExpressionSP, FormatterImpl> (FormattersContainer).

Differential Revision: https://reviews.llvm.org/D66398

llvm-svn: 369655
lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp