forked from OSchip/llvm-project
Make 'type lookup' print an error message instead of complete radio silence when it can't find a type matching user input
It would be fun to make it provide suggestions (e.g. 'can't find NString, did you mean NSString instead?'), but this worries me a little bit on the account of just how thorough of a type system scan it would have to do llvm-svn: 264343
This commit is contained in:
parent
8160812e26
commit
3cf9ff12c5
|
@ -42,3 +42,4 @@ class TypeLookupTestCase(TestBase):
|
|||
self.expect('type lookup NSURL', substrs=['NSURL'])
|
||||
self.expect('type lookup NSArray', substrs=['NSArray'])
|
||||
self.expect('type lookup NSObject', substrs=['NSObject', 'isa'])
|
||||
self.expect('type lookup PleaseDontBeARealTypeThatExists', substrs=["no type was found matching 'PleaseDontBeARealTypeThatExists'"])
|
||||
|
|
|
@ -3404,6 +3404,9 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
if (!any_found)
|
||||
result.AppendMessageWithFormat("no type was found matching '%s'\n", name_of_type);
|
||||
|
||||
result.SetStatus (any_found ? lldb::eReturnStatusSuccessFinishResult : lldb::eReturnStatusSuccessFinishNoResult);
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue