]> granicus.if.org Git - clang/commit
MS ABI: Fix inheritance model calculation in CRTP
authorDavid Majnemer <david.majnemer@gmail.com>
Fri, 13 Jun 2014 06:43:46 +0000 (06:43 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Fri, 13 Jun 2014 06:43:46 +0000 (06:43 +0000)
commit22b4e77bd6ac8b36a61fb1cf830c3af191950d4c
treebc5d5ff0f3b7a4da5093bbb836782d6fc61be9f1
parentaf74764a820bdf7d017a8c934bc7140cb080d9e1
MS ABI: Fix inheritance model calculation in CRTP

CRTP-like patterns involve a class which inherits from another class
using itself as a template parameter.

However, the base class itself may try to create a pointer-to-member
which involves the derived class.  This is problematic because we
may not have finished parsing the most derived classes' base specifiers
yet.

It turns out that MSVC simply uses the unspecified inheritance model
instead of doing anything fancy.

This fixes PR19987.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210886 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/AST/DeclCXX.h
lib/AST/DeclCXX.cpp
lib/AST/MicrosoftCXXABI.cpp
lib/Sema/SemaDeclCXX.cpp
test/CodeGenCXX/microsoft-abi-member-pointers.cpp