[lldb] Skip check for conflicting filter/synth when adding a new regex.
authorJorge Gorbe Moya <jgorbe@google.com>
Fri, 23 Sep 2022 22:09:08 +0000 (15:09 -0700)
committerJorge Gorbe Moya <jgorbe@google.com>
Thu, 6 Oct 2022 20:27:11 +0000 (13:27 -0700)
commit69c661a65ff8c04ce9408a788a77df67481545a1
tree88332a138579566a63684f0313a8641a2c3a8c48
parent04bb32e58a6592e70148d41c999eb3949268328c
[lldb] Skip check for conflicting filter/synth when adding a new regex.

When adding a new synthetic child provider, we check for an existing
conflicting filter in the same category (and vice versa). This is done
by trying to match the new type name against registered formatters.

However, the new type name we're registered can also be a regex
(`type synth add -x`), and in this case the conflict check is just
wrong: it will try to match the new regex as if it was a type name,
against previously registered regexes.

See https://github.com/llvm/llvm-project/issues/57947 for a longer
explanation with concrete examples of incorrect behavior.

Differential Revision: https://reviews.llvm.org/D134570
lldb/source/Commands/CommandObjectType.cpp
lldb/test/API/functionalities/data-formatter/data-formatter-python-synth/TestDataFormatterPythonSynth.py