forked from OSchip/llvm-project
[AST] Forbid copy/move of statements/types
Statements, expressions and types are not supposed to be copied/moved, and trying to do so is only going to result in tears. Someone tripped on this a few days ago on the mailing list. NFC. Differential Revision: https://reviews.llvm.org/D60123 Reviewed By: aaron.ballman llvm-svn: 358283
This commit is contained in:
parent
6460883312
commit
f6c7692d60
|
@ -1042,6 +1042,11 @@ public:
|
|||
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; }
|
||||
|
|
|
@ -1813,7 +1813,9 @@ public:
|
|||
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); }
|
||||
|
||||
|
|
Loading…
Reference in New Issue