diff --git a/src/glsl/ast.h b/src/glsl/ast.h index 87f987682cd..8abea5225f0 100644 --- a/src/glsl/ast.h +++ b/src/glsl/ast.h @@ -460,7 +460,8 @@ public: * be modified. Zeros the inherited ast_node's fields. */ ast_struct_specifier(const ast_struct_specifier& that): - ast_node(), name(that.name), declarations(that.declarations) + ast_node(), name(that.name), declarations(that.declarations), + is_declaration(that.is_declaration) { /* empty */ } @@ -475,6 +476,7 @@ public: const char *name; /* List of ast_declarator_list * */ exec_list declarations; + bool is_declaration; }; diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp index 664f8d15917..aa5a435fa95 100644 --- a/src/glsl/glsl_parser_extras.cpp +++ b/src/glsl/glsl_parser_extras.cpp @@ -1236,6 +1236,7 @@ ast_struct_specifier::ast_struct_specifier(const char *identifier, } name = identifier; this->declarations.push_degenerate_list_at_head(&declarator_list->link); + is_declaration = true; } extern "C" {