mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[ClangImporter] Don't crash on empty initial selector pieces. (#6284)
Yes, ':' is a valid selector, as are '::' and ':seriously:'. rdar://problem/28448188
This commit is contained in:
@@ -109,6 +109,7 @@ namespace swift {
|
||||
WordIterator(StringRef string, unsigned position)
|
||||
: String(string), Position(position)
|
||||
{
|
||||
assert(!string.empty());
|
||||
NextPositionValid = false;
|
||||
PrevPositionValid = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user