]> granicus.if.org Git - clang/commitdiff
[AST][NFC] Make ArrayTypeTraitExpr non polymorphic
authorBruno Ricci <riccibrun@gmail.com>
Tue, 4 Dec 2018 16:01:24 +0000 (16:01 +0000)
committerBruno Ricci <riccibrun@gmail.com>
Tue, 4 Dec 2018 16:01:24 +0000 (16:01 +0000)
ArrayTypeTraitExpr is the only expression class which is polymorphic.
As far as I can tell this is completely pointless.

Differential Revision: https://reviews.llvm.org/D55221

Reviewed By: aaron.ballman

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

include/clang/AST/ExprCXX.h
lib/AST/ExprCXX.cpp

index 6f87b7d1f030451037771075e71148799405f61c..33c014e068ea6a0823cb1a2a5db137b780611610 100644 (file)
@@ -2455,8 +2455,6 @@ class ArrayTypeTraitExpr : public Expr {
   /// The type being queried.
   TypeSourceInfo *QueriedType = nullptr;
 
-  virtual void anchor();
-
 public:
   friend class ASTStmtReader;
 
@@ -2474,8 +2472,6 @@ public:
   explicit ArrayTypeTraitExpr(EmptyShell Empty)
       : Expr(ArrayTypeTraitExprClass, Empty), ATT(0) {}
 
-  virtual ~ArrayTypeTraitExpr() = default;
-
   SourceLocation getBeginLoc() const LLVM_READONLY { return Loc; }
   SourceLocation getEndLoc() const LLVM_READONLY { return RParen; }
 
index a58b0f7fa2b3039f111b41c6ca71b3e32e25ff05..5ed4ea2ab7692a7dd32e27eb3d6a57a1a9488bb3 100644 (file)
@@ -1443,5 +1443,3 @@ TypeTraitExpr *TypeTraitExpr::CreateDeserialized(const ASTContext &C,
   void *Mem = C.Allocate(totalSizeToAlloc<TypeSourceInfo *>(NumArgs));
   return new (Mem) TypeTraitExpr(EmptyShell());
 }
-
-void ArrayTypeTraitExpr::anchor() {}