[lldb][NFC] Make some checks more readable in Variable::PrivateAutoComplete

This commit is contained in:
Raphael Isemann 2020-01-01 18:47:44 +01:00
parent f323ab919a
commit 9b24dad6c0
1 changed files with 3 additions and 3 deletions

View File

@ -705,9 +705,9 @@ static void PrivateAutoComplete(
if (!var_sp)
continue;
const char *variable_name = var_sp->GetName().AsCString();
if (strstr(variable_name, token.c_str()) == variable_name) {
if (strcmp(variable_name, token.c_str()) == 0) {
llvm::StringRef variable_name = var_sp->GetName().GetStringRef();
if (variable_name.startswith(token)) {
if (variable_name == token) {
Type *variable_type = var_sp->GetType();
if (variable_type) {
CompilerType variable_compiler_type(