In the next patch, I make backend_reg's inheritance from brw_reg
private, which confuses clang when it sees the type "struct brw_reg" in
the derived class constructors, thinking it is referring to the
privately inherited brw_reg:
brw_fs.cpp:366:23: error: 'brw_reg' is a private member of 'brw_reg'
fs_reg::fs_reg(struct brw_reg reg) :
^
brw_shader.h:39:22: note: constrained by private inheritance here
struct backend_reg : private brw_reg
^~~~~~~~~~~~~~~
brw_reg.h:232:8: note: member is declared here
struct brw_reg {
^
Avoid this by marking brw_reg with the scope resolution operator.
this->file = BAD_FILE;
}
-fs_reg::fs_reg(struct brw_reg reg) :
+fs_reg::fs_reg(struct ::brw_reg reg) :
backend_reg(reg)
{
this->reg_offset = 0;
void init();
fs_reg();
- fs_reg(struct brw_reg reg);
+ fs_reg(struct ::brw_reg reg);
fs_reg(enum brw_reg_file file, int nr);
fs_reg(enum brw_reg_file file, int nr, enum brw_reg_type type);
src_reg(enum brw_reg_file file, int nr, const glsl_type *type);
src_reg();
- src_reg(struct brw_reg reg);
+ src_reg(struct ::brw_reg reg);
bool equals(const src_reg &r) const;
unsigned writemask);
dst_reg(enum brw_reg_file file, int nr, brw_reg_type type,
unsigned writemask);
- dst_reg(struct brw_reg reg);
+ dst_reg(struct ::brw_reg reg);
dst_reg(class vec4_visitor *v, const struct glsl_type *type);
explicit dst_reg(const src_reg ®);
init();
}
-src_reg::src_reg(struct brw_reg reg) :
+src_reg::src_reg(struct ::brw_reg reg) :
backend_reg(reg)
{
this->reg_offset = 0;
this->writemask = writemask;
}
-dst_reg::dst_reg(struct brw_reg reg) :
+dst_reg::dst_reg(struct ::brw_reg reg) :
backend_reg(reg)
{
this->reg_offset = 0;