[PATCH] D60123: [AST] Forbid copy/move of statements/types.
Bruno Ricci via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 2 06:27:33 PDT 2019
riccibruno updated this revision to Diff 193271.
riccibruno retitled this revision from "[AST] Forbid copy/move of statements/declarations/types." to "[AST] Forbid copy/move of statements/types.".
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60123/new/
https://reviews.llvm.org/D60123
Files:
include/clang/AST/Stmt.h
include/clang/AST/Type.h
Index: include/clang/AST/Type.h
===================================================================
--- include/clang/AST/Type.h
+++ include/clang/AST/Type.h
@@ -1813,7 +1813,9 @@
friend class ASTWriter;
Type(const Type &) = delete;
+ Type(Type &&) = delete;
Type &operator=(const Type &) = delete;
+ Type &operator=(Type &&) = delete;
TypeClass getTypeClass() const { return static_cast<TypeClass>(TypeBits.TC); }
Index: include/clang/AST/Stmt.h
===================================================================
--- include/clang/AST/Stmt.h
+++ include/clang/AST/Stmt.h
@@ -1042,6 +1042,11 @@
return static_cast<StmtClass>(StmtBits.sClass);
}
+ Stmt(const Stmt &) = delete;
+ Stmt(Stmt &&) = delete;
+ Stmt &operator=(const Stmt &) = delete;
+ Stmt &operator=(Stmt &&) = delete;
+
const char *getStmtClassName() const;
bool isOMPStructuredBlock() const { return StmtBits.IsOMPStructuredBlock; }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60123.193271.patch
Type: text/x-patch
Size: 940 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190402/b6a46b2d/attachment-0001.bin>
More information about the cfe-commits
mailing list