riccibruno updated this revision to Diff 193267. riccibruno retitled this revision from "[AST] Forbid copy/move of Stmt." to "[AST] Forbid copy/move of statements/declarations/types.". riccibruno edited the summary of this revision. riccibruno added a reviewer: lebedev.ri.
Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60123/new/ https://reviews.llvm.org/D60123 Files: include/clang/AST/DeclBase.h 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; } Index: include/clang/AST/DeclBase.h =================================================================== --- include/clang/AST/DeclBase.h +++ include/clang/AST/DeclBase.h @@ -386,6 +386,11 @@ if (StatisticsEnabled) add(DK); } + Decl(const Decl &) = delete; + Decl(Decl &&) = delete; + Decl &operator=(const Decl &) = delete; + Decl &operator=(Decl &&) = delete; + virtual ~Decl(); /// Update a potentially out-of-date declaration.
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; } Index: include/clang/AST/DeclBase.h =================================================================== --- include/clang/AST/DeclBase.h +++ include/clang/AST/DeclBase.h @@ -386,6 +386,11 @@ if (StatisticsEnabled) add(DK); } + Decl(const Decl &) = delete; + Decl(Decl &&) = delete; + Decl &operator=(const Decl &) = delete; + Decl &operator=(Decl &&) = delete; + virtual ~Decl(); /// Update a potentially out-of-date declaration.
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits