From f639b84bc566b86b535fee9e528e500dc811f488 Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Mon, 2 Nov 2009 22:24:53 +0000 Subject: [PATCH] Hopefully make gcc-4.0 happy with respect to the following warning: warning: 'class clang::StackFrameContext' has virtual functions but non-virtual destructor llvm-svn: 85833 --- .../include/clang/Analysis/PathSensitive/AnalysisContext.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/clang/include/clang/Analysis/PathSensitive/AnalysisContext.h b/clang/include/clang/Analysis/PathSensitive/AnalysisContext.h index e8e80fd286b9..66e850a91444 100644 --- a/clang/include/clang/Analysis/PathSensitive/AnalysisContext.h +++ b/clang/include/clang/Analysis/PathSensitive/AnalysisContext.h @@ -80,6 +80,8 @@ protected: : Kind(k), Ctx(ctx), Parent(parent) {} public: + virtual ~LocationContext() {} + ContextKind getKind() const { return Kind; } AnalysisContext *getAnalysisContext() const { return Ctx; } @@ -119,6 +121,9 @@ public: StackFrameContext(AnalysisContext *ctx, const LocationContext *parent, const Stmt *s) : LocationContext(StackFrame, ctx, parent), CallSite(s) {} + + virtual ~StackFrameContext() {} + Stmt const *getCallSite() const { return CallSite; } @@ -141,6 +146,8 @@ public: ScopeContext(AnalysisContext *ctx, const LocationContext *parent, const Stmt *s) : LocationContext(Scope, ctx, parent), Enter(s) {} + + virtual ~ScopeContext() {} virtual void Profile(llvm::FoldingSetNodeID &ID) { Profile(ID, getAnalysisContext(), getParent(), Enter);