[PATCH] D55221: [AST] Make ArrayTypeTraitExpr non-polymorphic.
Bruno Ricci via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 3 07:51:25 PST 2018
riccibruno created this revision.
riccibruno added a reviewer: aaron.ballman.
riccibruno added a project: clang.
Herald added a subscriber: cfe-commits.
`ArrayTypeTraitExpr` is the only expression class which is polymorphic.
As far as I can tell this is completely pointless.
Repository:
rC Clang
https://reviews.llvm.org/D55221
Files:
include/clang/AST/ExprCXX.h
lib/AST/ExprCXX.cpp
Index: lib/AST/ExprCXX.cpp
===================================================================
--- lib/AST/ExprCXX.cpp
+++ lib/AST/ExprCXX.cpp
@@ -1443,5 +1443,3 @@
void *Mem = C.Allocate(totalSizeToAlloc<TypeSourceInfo *>(NumArgs));
return new (Mem) TypeTraitExpr(EmptyShell());
}
-
-void ArrayTypeTraitExpr::anchor() {}
Index: include/clang/AST/ExprCXX.h
===================================================================
--- include/clang/AST/ExprCXX.h
+++ include/clang/AST/ExprCXX.h
@@ -2455,8 +2455,6 @@
/// The type being queried.
TypeSourceInfo *QueriedType = nullptr;
- virtual void anchor();
-
public:
friend class ASTStmtReader;
@@ -2474,8 +2472,6 @@
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; }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55221.176405.patch
Type: text/x-patch
Size: 978 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181203/09c4f1a3/attachment-0001.bin>
More information about the cfe-commits
mailing list