Author: brunoricci Date: Tue Dec 4 08:01:24 2018 New Revision: 348276 URL: http://llvm.org/viewvc/llvm-project?rev=348276&view=rev Log: [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 Modified: cfe/trunk/include/clang/AST/ExprCXX.h cfe/trunk/lib/AST/ExprCXX.cpp Modified: cfe/trunk/include/clang/AST/ExprCXX.h URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/ExprCXX.h?rev=348276&r1=348275&r2=348276&view=diff ============================================================================== --- cfe/trunk/include/clang/AST/ExprCXX.h (original) +++ cfe/trunk/include/clang/AST/ExprCXX.h Tue Dec 4 08:01:24 2018 @@ -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; } Modified: cfe/trunk/lib/AST/ExprCXX.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ExprCXX.cpp?rev=348276&r1=348275&r2=348276&view=diff ============================================================================== --- cfe/trunk/lib/AST/ExprCXX.cpp (original) +++ cfe/trunk/lib/AST/ExprCXX.cpp Tue Dec 4 08:01:24 2018 @@ -1443,5 +1443,3 @@ TypeTraitExpr *TypeTraitExpr::CreateDese void *Mem = C.Allocate(totalSizeToAlloc<TypeSourceInfo *>(NumArgs)); return new (Mem) TypeTraitExpr(EmptyShell()); } - -void ArrayTypeTraitExpr::anchor() {} _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits