Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix -Wbitwise-instead-of-logical in 5 files starting w/ fbpcs/emp_games/pcf2_attribution/AttributionRule_impl.h #9310

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions hphp/runtime/base/runtime-option.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1416,13 +1416,17 @@ static std::vector<std::string> getTierOverwrites(IniSetting::Map& ini,
// Check the patterns one by one so they all get evaluated; otherwise, when
// using "&&" in a single expression with multiple patterns, if an earlier
// one fails to match, the later one would be reported as unused.
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wbitwise-instead-of-logical"
auto matched = true;
matched &= Config::matchHdfPattern(hostname, ini, hdf, "machine");
matched &= Config::matchHdfPattern(tier, ini, hdf, "tier");
matched &= Config::matchHdfPattern(task, ini, hdf, "task");
matched &= Config::matchHdfPattern(tiers, ini, hdf, "tiers", "m");
matched &= Config::matchHdfPattern(tags, ini, hdf, "tags", "m");
matched &= Config::matchHdfPattern(cpu, ini, hdf, "cpu");
#pragma clang diagnostic pop

return matched;
};

Expand All @@ -1433,10 +1437,14 @@ static std::vector<std::string> getTierOverwrites(IniSetting::Map& ini,
// Check the patterns one by one so they all get evaluated; otherwise, when
// using "&&" in a single expression with multiple patterns, if an earlier
// one fails to match, the later one would be reported as unused.
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wbitwise-instead-of-logical"
auto matched = true;
matched &= checkPatterns(hdf);
matched &= !hdf.exists("exclude") || !checkPatterns(hdf["exclude"]);
matched &= matchShard(enableShards, hostname, ini, hdf, messages);
#pragma clang diagnostic pop

return matched;
};

Expand Down
2 changes: 1 addition & 1 deletion hphp/runtime/ext/hsl/hsl_locale_libc_ops.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ String HSLLocaleLibcOps::replace_every_nonrecursive_ci(const String& haystack,
haystack,
replacements,
/* to_t = */ id,
/* from_t = */ id,
/* from_t = */ id,
/* normalize = */ [](String* s) {},
[](String* s) {
*s = HHVM_FN(strtolower)(*s);
Expand Down