[Mesa-dev] [PATCH] glsl: Silence clang warning about class vs no class.
Matt Turner
mattst88 at gmail.com
Fri Nov 21 15:19:21 PST 2014
note: hidden overloaded virtual function 'ir_hierarchical_visitor::visit_enter'
declared here: type mismatch at 1st parameter
('class ir_loop *' vs 'ir_dereference_variable *')
virtual ir_visitor_status visit_enter(class ir_loop *);
I don't see much value in this warning, but it spits out so many of them
that finding useful ones is difficult.
---
src/glsl/ir_hierarchical_visitor.cpp | 10 +++----
src/glsl/ir_print_visitor.cpp | 40 +++++++++++++-------------
src/glsl/ir_set_program_inouts.cpp | 4 +--
src/glsl/ir_validate.cpp | 8 +++---
src/glsl/ir_variable_refcount.cpp | 4 +--
src/glsl/link_uniform_block_active_visitor.cpp | 4 +--
src/glsl/loop_analysis.cpp | 10 +++----
src/glsl/lower_clip_distance.cpp | 4 +--
src/glsl/lower_output_reads.cpp | 2 +-
src/glsl/lower_vertex_id.cpp | 4 +--
src/glsl/opt_array_splitting.cpp | 8 +++---
src/glsl/opt_constant_variable.cpp | 4 +--
src/glsl/opt_copy_propagation.cpp | 2 +-
src/glsl/opt_cse.cpp | 4 +--
src/glsl/opt_structure_splitting.cpp | 8 +++---
15 files changed, 58 insertions(+), 58 deletions(-)
diff --git a/src/glsl/ir_hierarchical_visitor.cpp b/src/glsl/ir_hierarchical_visitor.cpp
index adb6294..b2ae8a2 100644
--- a/src/glsl/ir_hierarchical_visitor.cpp
+++ b/src/glsl/ir_hierarchical_visitor.cpp
@@ -35,7 +35,7 @@ ir_hierarchical_visitor::ir_hierarchical_visitor()
}
ir_visitor_status
-ir_hierarchical_visitor::visit(ir_rvalue *ir)
+ir_hierarchical_visitor::visit(class ir_rvalue *ir)
{
if (this->callback_enter != NULL)
this->callback_enter(ir, this->data_enter);
@@ -44,7 +44,7 @@ ir_hierarchical_visitor::visit(ir_rvalue *ir)
}
ir_visitor_status
-ir_hierarchical_visitor::visit(ir_variable *ir)
+ir_hierarchical_visitor::visit(class ir_variable *ir)
{
if (this->callback_enter != NULL)
this->callback_enter(ir, this->data_enter);
@@ -53,7 +53,7 @@ ir_hierarchical_visitor::visit(ir_variable *ir)
}
ir_visitor_status
-ir_hierarchical_visitor::visit(ir_constant *ir)
+ir_hierarchical_visitor::visit(class ir_constant *ir)
{
if (this->callback_enter != NULL)
this->callback_enter(ir, this->data_enter);
@@ -62,7 +62,7 @@ ir_hierarchical_visitor::visit(ir_constant *ir)
}
ir_visitor_status
-ir_hierarchical_visitor::visit(ir_loop_jump *ir)
+ir_hierarchical_visitor::visit(class ir_loop_jump *ir)
{
if (this->callback_enter != NULL)
this->callback_enter(ir, this->data_enter);
@@ -71,7 +71,7 @@ ir_hierarchical_visitor::visit(ir_loop_jump *ir)
}
ir_visitor_status
-ir_hierarchical_visitor::visit(ir_dereference_variable *ir)
+ir_hierarchical_visitor::visit(class ir_dereference_variable *ir)
{
if (this->callback_enter != NULL)
this->callback_enter(ir, this->data_enter);
diff --git a/src/glsl/ir_print_visitor.cpp b/src/glsl/ir_print_visitor.cpp
index bd39805..b120713 100644
--- a/src/glsl/ir_print_visitor.cpp
+++ b/src/glsl/ir_print_visitor.cpp
@@ -152,12 +152,12 @@ print_type(FILE *f, const glsl_type *t)
}
}
-void ir_print_visitor::visit(ir_rvalue *)
+void ir_print_visitor::visit(class ir_rvalue *)
{
fprintf(f, "error");
}
-void ir_print_visitor::visit(ir_variable *ir)
+void ir_print_visitor::visit(class ir_variable *ir)
{
fprintf(f, "(declare ");
@@ -182,7 +182,7 @@ void ir_print_visitor::visit(ir_variable *ir)
}
-void ir_print_visitor::visit(ir_function_signature *ir)
+void ir_print_visitor::visit(class ir_function_signature *ir)
{
_mesa_symbol_table_push_scope(symbols);
fprintf(f, "(signature ");
@@ -223,7 +223,7 @@ void ir_print_visitor::visit(ir_function_signature *ir)
}
-void ir_print_visitor::visit(ir_function *ir)
+void ir_print_visitor::visit(class ir_function *ir)
{
fprintf(f, "(function %s\n", ir->name);
indentation++;
@@ -238,7 +238,7 @@ void ir_print_visitor::visit(ir_function *ir)
}
-void ir_print_visitor::visit(ir_expression *ir)
+void ir_print_visitor::visit(class ir_expression *ir)
{
fprintf(f, "(expression ");
@@ -254,7 +254,7 @@ void ir_print_visitor::visit(ir_expression *ir)
}
-void ir_print_visitor::visit(ir_texture *ir)
+void ir_print_visitor::visit(class ir_texture *ir)
{
fprintf(f, "(%s ", ir->opcode_string());
@@ -327,7 +327,7 @@ void ir_print_visitor::visit(ir_texture *ir)
}
-void ir_print_visitor::visit(ir_swizzle *ir)
+void ir_print_visitor::visit(class ir_swizzle *ir)
{
const unsigned swiz[4] = {
ir->mask.x,
@@ -346,14 +346,14 @@ void ir_print_visitor::visit(ir_swizzle *ir)
}
-void ir_print_visitor::visit(ir_dereference_variable *ir)
+void ir_print_visitor::visit(class ir_dereference_variable *ir)
{
ir_variable *var = ir->variable_referenced();
fprintf(f, "(var_ref %s) ", unique_name(var));
}
-void ir_print_visitor::visit(ir_dereference_array *ir)
+void ir_print_visitor::visit(class ir_dereference_array *ir)
{
fprintf(f, "(array_ref ");
ir->array->accept(this);
@@ -362,7 +362,7 @@ void ir_print_visitor::visit(ir_dereference_array *ir)
}
-void ir_print_visitor::visit(ir_dereference_record *ir)
+void ir_print_visitor::visit(class ir_dereference_record *ir)
{
fprintf(f, "(record_ref ");
ir->record->accept(this);
@@ -370,7 +370,7 @@ void ir_print_visitor::visit(ir_dereference_record *ir)
}
-void ir_print_visitor::visit(ir_assignment *ir)
+void ir_print_visitor::visit(class ir_assignment *ir)
{
fprintf(f, "(assign ");
@@ -399,7 +399,7 @@ void ir_print_visitor::visit(ir_assignment *ir)
}
-void ir_print_visitor::visit(ir_constant *ir)
+void ir_print_visitor::visit(class ir_constant *ir)
{
fprintf(f, "(constant ");
print_type(f, ir->type);
@@ -445,7 +445,7 @@ void ir_print_visitor::visit(ir_constant *ir)
void
-ir_print_visitor::visit(ir_call *ir)
+ir_print_visitor::visit(class ir_call *ir)
{
fprintf(f, "(call %s ", ir->callee_name());
if (ir->return_deref)
@@ -459,7 +459,7 @@ ir_print_visitor::visit(ir_call *ir)
void
-ir_print_visitor::visit(ir_return *ir)
+ir_print_visitor::visit(class ir_return *ir)
{
fprintf(f, "(return");
@@ -474,7 +474,7 @@ ir_print_visitor::visit(ir_return *ir)
void
-ir_print_visitor::visit(ir_discard *ir)
+ir_print_visitor::visit(class ir_discard *ir)
{
fprintf(f, "(discard ");
@@ -488,7 +488,7 @@ ir_print_visitor::visit(ir_discard *ir)
void
-ir_print_visitor::visit(ir_if *ir)
+ir_print_visitor::visit(class ir_if *ir)
{
fprintf(f, "(if ");
ir->condition->accept(this);
@@ -526,7 +526,7 @@ ir_print_visitor::visit(ir_if *ir)
void
-ir_print_visitor::visit(ir_loop *ir)
+ir_print_visitor::visit(class ir_loop *ir)
{
fprintf(f, "(loop (\n");
indentation++;
@@ -543,13 +543,13 @@ ir_print_visitor::visit(ir_loop *ir)
void
-ir_print_visitor::visit(ir_loop_jump *ir)
+ir_print_visitor::visit(class ir_loop_jump *ir)
{
fprintf(f, "%s", ir->is_break() ? "break" : "continue");
}
void
-ir_print_visitor::visit(ir_emit_vertex *ir)
+ir_print_visitor::visit(class ir_emit_vertex *ir)
{
fprintf(f, "(emit-vertex ");
ir->stream->accept(this);
@@ -557,7 +557,7 @@ ir_print_visitor::visit(ir_emit_vertex *ir)
}
void
-ir_print_visitor::visit(ir_end_primitive *ir)
+ir_print_visitor::visit(class ir_end_primitive *ir)
{
fprintf(f, "(end-primitive ");
ir->stream->accept(this);
diff --git a/src/glsl/ir_set_program_inouts.cpp b/src/glsl/ir_set_program_inouts.cpp
index 97ead75..d3d1ad4 100644
--- a/src/glsl/ir_set_program_inouts.cpp
+++ b/src/glsl/ir_set_program_inouts.cpp
@@ -61,7 +61,7 @@ public:
virtual ir_visitor_status visit_enter(ir_expression *);
virtual ir_visitor_status visit_enter(ir_discard *);
virtual ir_visitor_status visit_enter(ir_texture *);
- virtual ir_visitor_status visit(ir_dereference_variable *);
+ virtual ir_visitor_status visit(class ir_dereference_variable *);
private:
void mark_whole_variable(ir_variable *var);
@@ -136,7 +136,7 @@ ir_set_program_inouts_visitor::mark_whole_variable(ir_variable *var)
/* Default handler: Mark all the locations in the variable as used. */
ir_visitor_status
-ir_set_program_inouts_visitor::visit(ir_dereference_variable *ir)
+ir_set_program_inouts_visitor::visit(class ir_dereference_variable *ir)
{
if (!is_shader_inout(ir->var))
return visit_continue;
diff --git a/src/glsl/ir_validate.cpp b/src/glsl/ir_validate.cpp
index 5a6f8bb..a8fb041 100644
--- a/src/glsl/ir_validate.cpp
+++ b/src/glsl/ir_validate.cpp
@@ -58,8 +58,8 @@ public:
hash_table_dtor(this->ht);
}
- virtual ir_visitor_status visit(ir_variable *v);
- virtual ir_visitor_status visit(ir_dereference_variable *ir);
+ virtual ir_visitor_status visit(class ir_variable *v);
+ virtual ir_visitor_status visit(class ir_dereference_variable *ir);
virtual ir_visitor_status visit_enter(ir_if *ir);
@@ -85,7 +85,7 @@ public:
} /* anonymous namespace */
ir_visitor_status
-ir_validate::visit(ir_dereference_variable *ir)
+ir_validate::visit(class ir_dereference_variable *ir)
{
if ((ir->var == NULL) || (ir->var->as_variable() == NULL)) {
printf("ir_dereference_variable @ %p does not specify a variable %p\n",
@@ -647,7 +647,7 @@ ir_validate::visit_leave(ir_swizzle *ir)
}
ir_visitor_status
-ir_validate::visit(ir_variable *ir)
+ir_validate::visit(class ir_variable *ir)
{
/* An ir_variable is the one thing that can (and will) appear multiple times
* in an IR tree. It is added to the hashtable so that it can be used
diff --git a/src/glsl/ir_variable_refcount.cpp b/src/glsl/ir_variable_refcount.cpp
index f67fe67..b5f2205 100644
--- a/src/glsl/ir_variable_refcount.cpp
+++ b/src/glsl/ir_variable_refcount.cpp
@@ -85,7 +85,7 @@ ir_variable_refcount_visitor::get_variable_entry(ir_variable *var)
ir_visitor_status
-ir_variable_refcount_visitor::visit(ir_variable *ir)
+ir_variable_refcount_visitor::visit(class ir_variable *ir)
{
ir_variable_refcount_entry *entry = this->get_variable_entry(ir);
if (entry)
@@ -96,7 +96,7 @@ ir_variable_refcount_visitor::visit(ir_variable *ir)
ir_visitor_status
-ir_variable_refcount_visitor::visit(ir_dereference_variable *ir)
+ir_variable_refcount_visitor::visit(class ir_dereference_variable *ir)
{
ir_variable *const var = ir->variable_referenced();
ir_variable_refcount_entry *entry = this->get_variable_entry(var);
diff --git a/src/glsl/link_uniform_block_active_visitor.cpp b/src/glsl/link_uniform_block_active_visitor.cpp
index 9da6a4b..20bc702 100644
--- a/src/glsl/link_uniform_block_active_visitor.cpp
+++ b/src/glsl/link_uniform_block_active_visitor.cpp
@@ -73,7 +73,7 @@ process_block(void *mem_ctx, struct hash_table *ht, ir_variable *var)
}
ir_visitor_status
-link_uniform_block_active_visitor::visit(ir_variable *var)
+link_uniform_block_active_visitor::visit(class ir_variable *var)
{
if (!var->is_in_uniform_block())
return visit_continue;
@@ -192,7 +192,7 @@ link_uniform_block_active_visitor::visit_enter(ir_dereference_array *ir)
}
ir_visitor_status
-link_uniform_block_active_visitor::visit(ir_dereference_variable *ir)
+link_uniform_block_active_visitor::visit(class ir_dereference_variable *ir)
{
ir_variable *var = ir->var;
diff --git a/src/glsl/loop_analysis.cpp b/src/glsl/loop_analysis.cpp
index 21d46eb..0f5ef1c 100644
--- a/src/glsl/loop_analysis.cpp
+++ b/src/glsl/loop_analysis.cpp
@@ -175,8 +175,8 @@ class loop_analysis : public ir_hierarchical_visitor {
public:
loop_analysis(loop_state *loops);
- virtual ir_visitor_status visit(ir_loop_jump *);
- virtual ir_visitor_status visit(ir_dereference_variable *);
+ virtual ir_visitor_status visit(class ir_loop_jump *);
+ virtual ir_visitor_status visit(class ir_dereference_variable *);
virtual ir_visitor_status visit_enter(ir_call *);
@@ -206,7 +206,7 @@ loop_analysis::loop_analysis(loop_state *loops)
ir_visitor_status
-loop_analysis::visit(ir_loop_jump *ir)
+loop_analysis::visit(class ir_loop_jump *ir)
{
(void) ir;
@@ -236,7 +236,7 @@ loop_analysis::visit_enter(ir_call *)
ir_visitor_status
-loop_analysis::visit(ir_dereference_variable *ir)
+loop_analysis::visit(class ir_dereference_variable *ir)
{
/* If we're not somewhere inside a loop, there's nothing to do.
*/
@@ -516,7 +516,7 @@ public:
this->loop_variables = loop_variables;
}
- virtual ir_visitor_status visit(ir_dereference_variable *ir)
+ virtual ir_visitor_status visit(class ir_dereference_variable *ir)
{
loop_variable *lv =
(loop_variable *) hash_table_find(this->loop_variables, ir->var);
diff --git a/src/glsl/lower_clip_distance.cpp b/src/glsl/lower_clip_distance.cpp
index 2d6138d..591120e 100644
--- a/src/glsl/lower_clip_distance.cpp
+++ b/src/glsl/lower_clip_distance.cpp
@@ -61,7 +61,7 @@ public:
{
}
- virtual ir_visitor_status visit(ir_variable *);
+ virtual ir_visitor_status visit(class ir_variable *);
void create_indices(ir_rvalue*, ir_rvalue *&, ir_rvalue *&);
bool is_clip_distance_vec8(ir_rvalue *ir);
ir_rvalue *lower_clip_distance_vec8(ir_rvalue *ir);
@@ -108,7 +108,7 @@ public:
* declaration of gl_ClipDistanceMESA as an array of vec4's.
*/
ir_visitor_status
-lower_clip_distance_visitor::visit(ir_variable *ir)
+lower_clip_distance_visitor::visit(class ir_variable *ir)
{
if (!ir->name || strcmp(ir->name, "gl_ClipDistance") != 0)
return visit_continue;
diff --git a/src/glsl/lower_output_reads.cpp b/src/glsl/lower_output_reads.cpp
index 1ee815d..89fc355 100644
--- a/src/glsl/lower_output_reads.cpp
+++ b/src/glsl/lower_output_reads.cpp
@@ -89,7 +89,7 @@ output_read_remover::~output_read_remover()
}
ir_visitor_status
-output_read_remover::visit(ir_dereference_variable *ir)
+output_read_remover::visit(class ir_dereference_variable *ir)
{
if (ir->var->data.mode != ir_var_shader_out)
return visit_continue;
diff --git a/src/glsl/lower_vertex_id.cpp b/src/glsl/lower_vertex_id.cpp
index fc90bc8..5891473 100644
--- a/src/glsl/lower_vertex_id.cpp
+++ b/src/glsl/lower_vertex_id.cpp
@@ -58,7 +58,7 @@ public:
}
}
- virtual ir_visitor_status visit(ir_dereference_variable *);
+ virtual ir_visitor_status visit(class ir_dereference_variable *);
bool progress;
@@ -74,7 +74,7 @@ private:
} /* anonymous namespace */
ir_visitor_status
-lower_vertex_id_visitor::visit(ir_dereference_variable *ir)
+lower_vertex_id_visitor::visit(class ir_dereference_variable *ir)
{
if (ir->var->data.mode != ir_var_system_value ||
ir->var->data.location != SYSTEM_VALUE_VERTEX_ID)
diff --git a/src/glsl/opt_array_splitting.cpp b/src/glsl/opt_array_splitting.cpp
index 9e73f3c..69d4a5d 100644
--- a/src/glsl/opt_array_splitting.cpp
+++ b/src/glsl/opt_array_splitting.cpp
@@ -102,8 +102,8 @@ public:
bool get_split_list(exec_list *instructions, bool linked);
- virtual ir_visitor_status visit(ir_variable *);
- virtual ir_visitor_status visit(ir_dereference_variable *);
+ virtual ir_visitor_status visit(class ir_variable *);
+ virtual ir_visitor_status visit(class ir_dereference_variable *);
virtual ir_visitor_status visit_enter(ir_dereference_array *);
virtual ir_visitor_status visit_enter(ir_function_signature *);
@@ -147,7 +147,7 @@ ir_array_reference_visitor::get_variable_entry(ir_variable *var)
ir_visitor_status
-ir_array_reference_visitor::visit(ir_variable *ir)
+ir_array_reference_visitor::visit(class ir_variable *ir)
{
variable_entry *entry = this->get_variable_entry(ir);
@@ -158,7 +158,7 @@ ir_array_reference_visitor::visit(ir_variable *ir)
}
ir_visitor_status
-ir_array_reference_visitor::visit(ir_dereference_variable *ir)
+ir_array_reference_visitor::visit(class ir_dereference_variable *ir)
{
variable_entry *entry = this->get_variable_entry(ir->var);
diff --git a/src/glsl/opt_constant_variable.cpp b/src/glsl/opt_constant_variable.cpp
index 7222eb9..ab98195 100644
--- a/src/glsl/opt_constant_variable.cpp
+++ b/src/glsl/opt_constant_variable.cpp
@@ -50,7 +50,7 @@ struct assignment_entry {
class ir_constant_variable_visitor : public ir_hierarchical_visitor {
public:
virtual ir_visitor_status visit_enter(ir_dereference_variable *);
- virtual ir_visitor_status visit(ir_variable *);
+ virtual ir_visitor_status visit(class ir_variable *);
virtual ir_visitor_status visit_enter(ir_assignment *);
virtual ir_visitor_status visit_enter(ir_call *);
@@ -76,7 +76,7 @@ get_assignment_entry(ir_variable *var, exec_list *list)
}
ir_visitor_status
-ir_constant_variable_visitor::visit(ir_variable *ir)
+ir_constant_variable_visitor::visit(class ir_variable *ir)
{
struct assignment_entry *entry = get_assignment_entry(ir, &this->list);
entry->our_scope = true;
diff --git a/src/glsl/opt_copy_propagation.cpp b/src/glsl/opt_copy_propagation.cpp
index 5c65af6..f28632d 100644
--- a/src/glsl/opt_copy_propagation.cpp
+++ b/src/glsl/opt_copy_propagation.cpp
@@ -160,7 +160,7 @@ ir_copy_propagation_visitor::visit_enter(ir_function *ir)
* must not be shared by multiple IR operations!
*/
ir_visitor_status
-ir_copy_propagation_visitor::visit(ir_dereference_variable *ir)
+ir_copy_propagation_visitor::visit(class ir_dereference_variable *ir)
{
if (this->in_assignee)
return visit_continue;
diff --git a/src/glsl/opt_cse.cpp b/src/glsl/opt_cse.cpp
index b0b67f4..48e9268 100644
--- a/src/glsl/opt_cse.cpp
+++ b/src/glsl/opt_cse.cpp
@@ -141,7 +141,7 @@ public:
{
}
- virtual ir_visitor_status visit(ir_dereference_variable *ir);
+ virtual ir_visitor_status visit(class ir_dereference_variable *ir);
bool ok;
};
@@ -186,7 +186,7 @@ dump_ae(exec_list *ae)
}
ir_visitor_status
-is_cse_candidate_visitor::visit(ir_dereference_variable *ir)
+is_cse_candidate_visitor::visit(class ir_dereference_variable *ir)
{
/* Currently, since we don't handle kills of the ae based on variables
* getting assigned, we can only handle constant variables.
diff --git a/src/glsl/opt_structure_splitting.cpp b/src/glsl/opt_structure_splitting.cpp
index 5e82fe9..733f590 100644
--- a/src/glsl/opt_structure_splitting.cpp
+++ b/src/glsl/opt_structure_splitting.cpp
@@ -84,8 +84,8 @@ public:
ralloc_free(mem_ctx);
}
- virtual ir_visitor_status visit(ir_variable *);
- virtual ir_visitor_status visit(ir_dereference_variable *);
+ virtual ir_visitor_status visit(class ir_variable *);
+ virtual ir_visitor_status visit(class ir_dereference_variable *);
virtual ir_visitor_status visit_enter(ir_dereference_record *);
virtual ir_visitor_status visit_enter(ir_assignment *);
virtual ir_visitor_status visit_enter(ir_function_signature *);
@@ -119,7 +119,7 @@ ir_structure_reference_visitor::get_variable_entry(ir_variable *var)
ir_visitor_status
-ir_structure_reference_visitor::visit(ir_variable *ir)
+ir_structure_reference_visitor::visit(class ir_variable *ir)
{
variable_entry *entry = this->get_variable_entry(ir);
@@ -130,7 +130,7 @@ ir_structure_reference_visitor::visit(ir_variable *ir)
}
ir_visitor_status
-ir_structure_reference_visitor::visit(ir_dereference_variable *ir)
+ir_structure_reference_visitor::visit(class ir_dereference_variable *ir)
{
ir_variable *const var = ir->variable_referenced();
variable_entry *entry = this->get_variable_entry(var);
--
2.0.4
More information about the mesa-dev
mailing list