]> granicus.if.org Git - clang/commit
Sema: Disallow inheriting from classes with flexible array members
authorDavid Majnemer <david.majnemer@gmail.com>
Sat, 2 Nov 2013 12:00:36 +0000 (12:00 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Sat, 2 Nov 2013 12:00:36 +0000 (12:00 +0000)
commit28165b7a977339253ce34b7b1b1c442b9b73f46d
tree2a7ca788f52ca086f79b6ac27b95c8f4468aa02f
parent7041fcc6b8078a7f87713dac168c2bed64a9d191
Sema: Disallow inheriting from classes with flexible array members

Flexible array members inherently index off of the end of their parent
type.

We shouldn't allow this type to be used as a base, virtual or otherwise,
because indexing off the end may find us inside of another base or the
derived types members.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193923 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/SemaDeclCXX.cpp