]> granicus.if.org Git - clang/commitdiff
Better fix for -Wnon-virtual-dtor
authorMatt Beaumont-Gay <matthewbg@google.com>
Mon, 7 Nov 2011 18:30:47 +0000 (18:30 +0000)
committerMatt Beaumont-Gay <matthewbg@google.com>
Mon, 7 Nov 2011 18:30:47 +0000 (18:30 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143972 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaPseudoObject.cpp

index b8497e5f0285f52f64942512ec08118fe79676cb..b3ed145b155c14aa24f822f122ac629775158474 100644 (file)
@@ -141,8 +141,6 @@ namespace {
       : S(S), ResultIndex(PseudoObjectExpr::NoResult),
         GenericLoc(genericLoc) {}
 
-    virtual ~PseudoOpBuilder() {}
-
     /// Add a normal semantic expression.
     void addSemanticExpr(Expr *semantic) {
       Semantics.push_back(semantic);
@@ -181,6 +179,9 @@ namespace {
     virtual ExprResult buildGet() = 0;
     virtual ExprResult buildSet(Expr *, SourceLocation,
                                 bool captureSetValueAsResult) = 0;
+
+  protected:
+    ~PseudoOpBuilder() {}
   };
 
   /// A PseudoOpBuilder for Objective-C @properties.