mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-26 09:31:59 +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,
|
bool GroupMatch::IsMatch(const std::string& value,
|
||||||
std::string* match_failure_reason) const {
|
std::string* match_failure_reason) const {
|
||||||
for (const Matcher& m : whitelist) {
|
for (const Matcher& m : whitelist) {
|
||||||
if (!m.IsMatch(value)) {
|
if (m.IsMatch(value))
|
||||||
if (match_failure_reason)
|
return true;
|
||||||
*match_failure_reason = "whitelist \"" + m.regex_string + "\"";
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const Matcher& m : blacklist) {
|
for (const Matcher& m : blacklist) {
|
||||||
|
Loading…
Reference in New Issue
Block a user