Files
swift-mirror/lib/IDE/REPLCodeCompletion.cpp
Martin Svensson fd5c56ee59 [IDE] Fix crash in common root search in REPL code completion
Specify end of second range to std::mismatch (since C++14) to avoid
accidentally stepping outside that range. In this case fixes a crash when
trying to find a common prefix with an empty StringRef.

Also add early return if no common root can be found.

Fix for "REPL crashes during autocompletion" #62802
2023-01-20 13:25:24 +09:00

13 KiB