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 compilation issues under ubuntu 20 and latest clang #2562

Merged
merged 2 commits into from May 24, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions third_party/spirv-tools/source/val/validate.cpp
Expand Up @@ -142,7 +142,7 @@ spv_result_t ValidateEntryPointNameUnique(ValidationState_t& _,
for (const auto other_id : _.entry_points()) {
if (other_id == id) continue;
const auto other_id_names = CalculateNamesForEntryPoint(_, other_id);
for (const auto other_id_name : other_id_names) {
for (const auto &other_id_name : other_id_names) {
if (names.find(other_id_name) != names.end()) {
return _.diag(SPV_ERROR_INVALID_BINARY, _.FindDef(id))
<< "Entry point name \"" << other_id_name
Expand Down Expand Up @@ -431,7 +431,7 @@ spv_result_t ValidateBinaryUsingContextAndValidationState(
if (auto error = ValidateBuiltIns(*vstate)) return error;
// These checks must be performed after individual opcode checks because
// those checks register the limitation checked here.
for (const auto inst : vstate->ordered_instructions()) {
for (const auto &inst : vstate->ordered_instructions()) {
if (auto error = ValidateExecutionLimitations(*vstate, &inst)) return error;
if (auto error = ValidateSmallTypeUses(*vstate, &inst)) return error;
}
Expand Down
2 changes: 1 addition & 1 deletion third_party/spirv-tools/source/val/validation_state.cpp
Expand Up @@ -1052,7 +1052,7 @@ void ValidationState_t::ComputeFunctionToEntryPointMapping() {
}

void ValidationState_t::ComputeRecursiveEntryPoints() {
for (const Function func : functions()) {
for (const Function &func : functions()) {
std::stack<uint32_t> call_stack;
std::set<uint32_t> visited;

Expand Down