Author: enrico
Date: Thu Jan 28 19:12:13 2016
New Revision: 259135

URL: http://llvm.org/viewvc/llvm-project?rev=259135&view=rev
Log:
Fix a bug where type <formatter> list would ignore the -w argument

rdar://24379879


Modified:
    
lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/type_summary_list_arg/TestTypeSummaryListArg.py
    lldb/trunk/source/Commands/CommandObjectType.cpp

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/type_summary_list_arg/TestTypeSummaryListArg.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/type_summary_list_arg/TestTypeSummaryListArg.py?rev=259135&r1=259134&r2=259135&view=diff
==============================================================================
--- 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/type_summary_list_arg/TestTypeSummaryListArg.py
 (original)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/type_summary_list_arg/TestTypeSummaryListArg.py
 Thu Jan 28 19:12:13 2016
@@ -24,3 +24,7 @@ class TypeSummaryListArgumentTestCase(Te
         """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)

Modified: lldb/trunk/source/Commands/CommandObjectType.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectType.cpp?rev=259135&r1=259134&r2=259135&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectType.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectType.cpp Thu Jan 28 19:12:13 2016
@@ -1282,9 +1282,12 @@ class CommandObjectTypeFormatterList : p
             {
                 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);


_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to