Sema: Don't permit variably modified types in typeid
authorDavid Majnemer <david.majnemer@gmail.com>
Fri, 21 Nov 2014 21:09:12 +0000 (21:09 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Fri, 21 Nov 2014 21:09:12 +0000 (21:09 +0000)
commit6f3150a7d2626ebfcffdef01d91f86daaffc662b
tree8a2bc343c291a8833ff8ee1a6c19b873c8b9b769
parentd5178014938df1cd5117230950bfd935d14f2f9c
Sema: Don't permit variably modified types in typeid

GCC and ICC both reject this and the 'Runtime-sized arrays with
automatic storage duration' (N3639) paper forbade this as well.
Previously, we would crash on our way to mangling.

This fixes PR21632.

llvm-svn: 222569
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/lib/Sema/SemaExprCXX.cpp
clang/test/SemaCXX/typeid.cpp