Fix a bug where type <formatter> list would ignore the -w argument
rdar://24379879 llvm-svn: 259135
This commit is contained in:
parent
53010a0d5b
commit
fa7ae77af4
|
@ -24,3 +24,7 @@ class TypeSummaryListArgumentTestCase(TestBase):
|
|||
"""Test that the 'type summary list' command handles command line arguments properly"""
|
||||
self.expect('type summary list Foo', substrs=['Category: default', 'Category: system'])
|
||||
self.expect('type summary list char', substrs=['char *', 'unsigned char'])
|
||||
|
||||
self.expect('type summary list -w default', substrs=['system'], matching=False)
|
||||
self.expect('type summary list -w system unsigned', substrs=['default', '0-9'], matching=False)
|
||||
self.expect('type summary list -w system char', substrs=['unsigned char *'], matching=True)
|
||||
|
|
|
@ -1282,9 +1282,12 @@ class CommandObjectTypeFormatterList : public CommandObjectParsed
|
|||
{
|
||||
case 'w':
|
||||
m_category_regex.SetCurrentValue(option_arg);
|
||||
m_category_regex.SetOptionWasSet();
|
||||
break;
|
||||
case 'l':
|
||||
error = m_category_language.SetValueFromString(option_arg);
|
||||
if (error.Success())
|
||||
m_category_language.SetOptionWasSet();
|
||||
break;
|
||||
default:
|
||||
error.SetErrorStringWithFormat ("unrecognized option '%c'", short_option);
|
||||
|
|
Loading…
Reference in New Issue