[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

llvm-svn: 348276

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

index 6f87b7d..33c014e 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 a58b0f7..5ed4ea2 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() {}