summaryrefslogtreecommitdiffstats
path: root/lldb/source/Commands
diff options
context:
space:
mode:
authorRaphael Isemann <teemperor@gmail.com>2019-11-29 12:26:33 +0100
committerRaphael Isemann <teemperor@gmail.com>2019-11-29 12:34:23 +0100
commitd752b75d7fce2a77bb7656d33d2aa062372dc014 (patch)
treef1471ab76cad461aedf209b5523e60404f314592 /lldb/source/Commands
parentd1d6049e9d6600f28746379290705b02ffb52d4b (diff)
downloadbcm5719-llvm-d752b75d7fce2a77bb7656d33d2aa062372dc014.tar.gz
bcm5719-llvm-d752b75d7fce2a77bb7656d33d2aa062372dc014.zip
[lldb][NFC] Simplify regex_chars in CommandCompletions
Diffstat (limited to 'lldb/source/Commands')
-rw-r--r--lldb/source/Commands/CommandCompletions.cpp5
1 files changed, 1 insertions, 4 deletions
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(
OpenPOWER on IntegriCloud