From: Kristian H. Kristensen Date: Thu, 18 Apr 2019 18:28:12 +0000 (-0700) Subject: ralloc: Fully qualify non-virtual destructor call X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b5a3567b51824b7907d757b4bef5348fa864c7b3;p=mesa.git ralloc: Fully qualify non-virtual destructor call This suppresses warning about calling a non-virtual destructor in a non-final class with virtual functions: src/compiler/glsl/ast.h:53:4: warning: destructor called on non-final 'ast_node' that has virtual functions but non-virtual destructor [-Wdelete-non-virtual-dtor] DECLARE_LINEAR_ZALLOC_CXX_OPERATORS(ast_node); Signed-off-by: Kristian H. Kristensen Reviewed-by: Ian Romanick Reviewed-by: Emil Velikov --- diff --git a/src/util/ralloc.h b/src/util/ralloc.h index 05ae8f8407c..b4f372dfe9b 100644 --- a/src/util/ralloc.h +++ b/src/util/ralloc.h @@ -430,7 +430,7 @@ bool ralloc_vasprintf_append(char **str, const char *fmt, va_list args); private: \ static void _ralloc_destructor(void *p) \ { \ - reinterpret_cast(p)->~TYPE(); \ + reinterpret_cast(p)->TYPE::~TYPE(); \ } \ public: \ static void* operator new(size_t size, void *mem_ctx) \