mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-22 15:45:08 +00:00
Change whitelist behavior so it is more likely what the user wants.
This commit is contained in:
parent
58f2107714
commit
93d3b2b3cb
@ -61,11 +61,8 @@ GroupMatch::GroupMatch(const std::vector<std::string>& whitelist,
|
||||
bool GroupMatch::IsMatch(const std::string& value,
|
||||
std::string* match_failure_reason) const {
|
||||
for (const Matcher& m : whitelist) {
|
||||
if (!m.IsMatch(value)) {
|
||||
if (match_failure_reason)
|
||||
*match_failure_reason = "whitelist \"" + m.regex_string + "\"";
|
||||
return false;
|
||||
}
|
||||
if (m.IsMatch(value))
|
||||
return true;
|
||||
}
|
||||
|
||||
for (const Matcher& m : blacklist) {
|
||||
|
Loading…
Reference in New Issue
Block a user