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( _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits