From 8e97b20b15b783998faf6275a1076474dd023e31 Mon Sep 17 00:00:00 2001 From: jsg Date: Tue, 22 Sep 2020 06:19:47 +0000 Subject: [PATCH] glsl: Use 'using' to be explicit about visitor overloads From Kristian Hoegsberg e3dfa8f4d694e7d64a6401752af1f973b0852aab in mainline Mesa reduces clang warnings --- lib/mesa/src/compiler/glsl/linker.cpp | 4 ++++ lib/mesa/src/compiler/glsl/lower_jumps.cpp | 2 ++ lib/mesa/src/compiler/glsl/opt_constant_variable.cpp | 3 +++ lib/mesa/src/compiler/glsl/opt_dead_code_local.cpp | 2 ++ 4 files changed, 11 insertions(+) diff --git a/lib/mesa/src/compiler/glsl/linker.cpp b/lib/mesa/src/compiler/glsl/linker.cpp index 519fc14a4..77e7489a0 100644 --- a/lib/mesa/src/compiler/glsl/linker.cpp +++ b/lib/mesa/src/compiler/glsl/linker.cpp @@ -260,6 +260,8 @@ public: class array_resize_visitor : public deref_type_updater { public: + using deref_type_updater::visit; + unsigned num_vertices; gl_shader_program *prog; gl_shader_stage stage; @@ -1506,6 +1508,8 @@ move_non_declarations(exec_list *instructions, exec_node *last, */ class array_sizing_visitor : public deref_type_updater { public: + using deref_type_updater::visit; + array_sizing_visitor() : mem_ctx(ralloc_context(NULL)), unnamed_interfaces(_mesa_pointer_hash_table_create(NULL)) diff --git a/lib/mesa/src/compiler/glsl/lower_jumps.cpp b/lib/mesa/src/compiler/glsl/lower_jumps.cpp index 3286a1c57..389f5847b 100644 --- a/lib/mesa/src/compiler/glsl/lower_jumps.cpp +++ b/lib/mesa/src/compiler/glsl/lower_jumps.cpp @@ -268,6 +268,8 @@ struct ir_lower_jumps_visitor : public ir_control_flow_visitor { * contains the jump. */ + using ir_control_flow_visitor::visit; + bool progress; struct function_record function; diff --git a/lib/mesa/src/compiler/glsl/opt_constant_variable.cpp b/lib/mesa/src/compiler/glsl/opt_constant_variable.cpp index a1fffd4a5..cc2760f56 100644 --- a/lib/mesa/src/compiler/glsl/opt_constant_variable.cpp +++ b/lib/mesa/src/compiler/glsl/opt_constant_variable.cpp @@ -49,6 +49,9 @@ struct assignment_entry { class ir_constant_variable_visitor : public ir_hierarchical_visitor { public: + using ir_hierarchical_visitor::visit; + using ir_hierarchical_visitor::visit_enter; + virtual ir_visitor_status visit_enter(ir_dereference_variable *); virtual ir_visitor_status visit(ir_variable *); virtual ir_visitor_status visit_enter(ir_assignment *); diff --git a/lib/mesa/src/compiler/glsl/opt_dead_code_local.cpp b/lib/mesa/src/compiler/glsl/opt_dead_code_local.cpp index 3cbc441ac..b2d35bbaf 100644 --- a/lib/mesa/src/compiler/glsl/opt_dead_code_local.cpp +++ b/lib/mesa/src/compiler/glsl/opt_dead_code_local.cpp @@ -66,6 +66,8 @@ public: class kill_for_derefs_visitor : public ir_hierarchical_visitor { public: + using ir_hierarchical_visitor::visit; + kill_for_derefs_visitor(exec_list *assignments) { this->assignments = assignments;