]> granicus.if.org Git - clang/commitdiff
Hopefully make gcc-4.0 happy with respect to the following warning:
authorTed Kremenek <kremenek@apple.com>
Mon, 2 Nov 2009 22:24:53 +0000 (22:24 +0000)
committerTed Kremenek <kremenek@apple.com>
Mon, 2 Nov 2009 22:24:53 +0000 (22:24 +0000)
warning: 'class clang::StackFrameContext' has virtual functions but non-virtual destructor

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85833 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Analysis/PathSensitive/AnalysisContext.h

index e8e80fd286b9034a717375f9f4f03fc54caf05ed..66e850a91444d7d64383541c26187061d0c79c03 100644 (file)
@@ -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);