[AST] Assert that no statement/expression class is polymorphic
authorBruno Ricci <riccibrun@gmail.com>
Tue, 4 Dec 2018 16:04:19 +0000 (16:04 +0000)
committerBruno Ricci <riccibrun@gmail.com>
Tue, 4 Dec 2018 16:04:19 +0000 (16:04 +0000)
commit65034b8698851e22d03b2c4f51fe12df957a5279
tree6fc754c1f1bcb8cda236c461957abe665c9e8b50
parente82c3dab12dd81362459d86ad824850e92a3d8ac
[AST] Assert that no statement/expression class is polymorphic

Add a static_assert checking that no statement/expression class
is polymorphic. People should use LLVM style RTTI instead.

Differential Revision: https://reviews.llvm.org/D55222

Reviewed By: aaron.ballman

llvm-svn: 348278
clang/lib/AST/Stmt.cpp