Mesa (master): ralloc: Fully qualify non-virtual destructor call
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Apr 19 16:29:19 UTC 2019
Module: Mesa
Branch: master
Commit: b5a3567b51824b7907d757b4bef5348fa864c7b3
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b5a3567b51824b7907d757b4bef5348fa864c7b3
Author: Kristian H. Kristensen <hoegsberg at google.com>
Date: Thu Apr 18 11:28:12 2019 -0700
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 <hoegsberg at google.com>
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
Reviewed-by: Emil Velikov <emil.velikov at collabora.com>
---
src/util/ralloc.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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<TYPE *>(p)->~TYPE(); \
+ reinterpret_cast<TYPE *>(p)->TYPE::~TYPE(); \
} \
public: \
static void* operator new(size_t size, void *mem_ctx) \
More information about the mesa-commit
mailing list