[lldb][NFC] Simplify regex_chars in CommandCompletions

This commit is contained in:
Raphael Isemann 2019-11-29 12:26:33 +01:00
parent d1d6049e9d
commit d752b75d7f
1 changed files with 1 additions and 4 deletions

View File

@ -413,10 +413,7 @@ void CommandCompletions::SourceFileCompleter::DoCompletion(
// SymbolCompleter
static bool regex_chars(const char comp) {
return (comp == '[' || comp == ']' || comp == '(' || comp == ')' ||
comp == '{' || comp == '}' || comp == '+' || comp == '.' ||
comp == '*' || comp == '|' || comp == '^' || comp == '$' ||
comp == '\\' || comp == '?');
return llvm::StringRef("[](){}+.*|^$\\?").contains(comp);
}
CommandCompletions::SymbolCompleter::SymbolCompleter(