From: Bruno Ricci Date: Tue, 4 Dec 2018 16:01:24 +0000 (+0000) Subject: [AST][NFC] Make ArrayTypeTraitExpr non polymorphic X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7ad3b78a570107b0f679c666ce5bb845858a139e;p=clang [AST][NFC] Make ArrayTypeTraitExpr non polymorphic 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 --- diff --git a/include/clang/AST/ExprCXX.h b/include/clang/AST/ExprCXX.h index 6f87b7d1f0..33c014e068 100644 --- a/include/clang/AST/ExprCXX.h +++ b/include/clang/AST/ExprCXX.h @@ -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; } diff --git a/lib/AST/ExprCXX.cpp b/lib/AST/ExprCXX.cpp index a58b0f7fa2..5ed4ea2ab7 100644 --- a/lib/AST/ExprCXX.cpp +++ b/lib/AST/ExprCXX.cpp @@ -1443,5 +1443,3 @@ TypeTraitExpr *TypeTraitExpr::CreateDeserialized(const ASTContext &C, void *Mem = C.Allocate(totalSizeToAlloc(NumArgs)); return new (Mem) TypeTraitExpr(EmptyShell()); } - -void ArrayTypeTraitExpr::anchor() {}