From d752b75d7fce2a77bb7656d33d2aa062372dc014 Mon Sep 17 00:00:00 2001 From: Raphael Isemann Date: Fri, 29 Nov 2019 12:26:33 +0100 Subject: [lldb][NFC] Simplify regex_chars in CommandCompletions --- lldb/source/Commands/CommandCompletions.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'lldb/source/Commands') diff --git a/lldb/source/Commands/CommandCompletions.cpp b/lldb/source/Commands/CommandCompletions.cpp index d325b724a38..b382e26e2b7 100644 --- a/lldb/source/Commands/CommandCompletions.cpp +++ b/lldb/source/Commands/CommandCompletions.cpp @@ -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( -- cgit v1.2.3