[Mesa-dev] [PATCH 2/4] glsl: make ast_node destructor virtual
Ian Romanick
idr at freedesktop.org
Wed May 31 01:05:16 UTC 2017
This patch is
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
On 05/30/2017 01:47 PM, Rob Herring wrote:
> Make ast_node destructor virtual to fix the following clang warning:
>
> src/compiler/glsl/ast.h:51:4: warning: destructor called on non-final 'ast_node' that has virtual functions but non-virtual destructor [-Wdelete-non-virtual-dtor]
>
> Signed-off-by: Rob Herring <robh at kernel.org>
> ---
> src/compiler/glsl/ast.h | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/src/compiler/glsl/ast.h b/src/compiler/glsl/ast.h
> index 9327e0397935..5515dabf0504 100644
> --- a/src/compiler/glsl/ast.h
> +++ b/src/compiler/glsl/ast.h
> @@ -50,6 +50,8 @@ class ast_node {
> public:
> DECLARE_LINEAR_ZALLOC_CXX_OPERATORS(ast_node);
>
> + virtual ~ast_node() {};
> +
> /**
> * Print an AST node in something approximating the original GLSL code
> */
>
More information about the mesa-dev
mailing list