[Lldb-commits] [lldb] d752b75 - [lldb][NFC] Simplify regex_chars in CommandCompletions
Raphael Isemann via lldb-commits
lldb-commits at lists.llvm.org
Fri Nov 29 03:34:50 PST 2019
Author: Raphael Isemann
Date: 2019-11-29T12:34:23+01:00
New Revision: d752b75d7fce2a77bb7656d33d2aa062372dc014
URL: https://github.com/llvm/llvm-project/commit/d752b75d7fce2a77bb7656d33d2aa062372dc014
DIFF: https://github.com/llvm/llvm-project/commit/d752b75d7fce2a77bb7656d33d2aa062372dc014.diff
LOG: [lldb][NFC] Simplify regex_chars in CommandCompletions
Added:
Modified:
lldb/source/Commands/CommandCompletions.cpp
Removed:
################################################################################
diff --git a/lldb/source/Commands/CommandCompletions.cpp b/lldb/source/Commands/CommandCompletions.cpp
index d325b724a38f..b382e26e2b70 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(
More information about the lldb-commits
mailing list