This is an archive of the discontinued LLVM Phabricator instance.

[AST] Forbid copy/move of statements/types.
ClosedPublic

Authored by riccibruno on Apr 2 2019, 5:49 AM.

Details

Summary

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.

Diff Detail

Repository
rC Clang

Event Timeline

riccibruno created this revision.Apr 2 2019, 5:49 AM

Probably Decl too?

Probably Decl too?

Yep. I though it was already done but after checking it seems I remembered incorrectly.

riccibruno updated this revision to Diff 193267.Apr 2 2019, 6:10 AM
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. (Show Details)
riccibruno added a reviewer: lebedev.ri.

Probably Decl too?

Yep. I though it was already done but after checking it seems I remembered incorrectly.

Huh, never mind. It seems that at least ImplicitParamDecls are used in a SmallVector, and this requires the copy-constructor to be usable.

riccibruno updated this revision to Diff 193271.Apr 2 2019, 6:27 AM
riccibruno retitled this revision from [AST] Forbid copy/move of statements/declarations/types. to [AST] Forbid copy/move of statements/types..
This revision is now accepted and ready to land.Apr 2 2019, 7:49 AM
This revision was automatically updated to reflect the committed changes.