diff options
author | Reid Kleckner <reid@kleckner.net> | 2014-06-12 19:49:17 +0000 |
---|---|---|
committer | Reid Kleckner <reid@kleckner.net> | 2014-06-12 19:49:17 +0000 |
commit | 85f2aa90c23acc494ea5804f84e3ea780eaa1b54 (patch) | |
tree | 4407e019c886cb9c87173c48c1b7557b15a49df6 /tools/clang-format/ClangFormat.cpp | |
parent | cb4e543bc78da46d23c1df47b61d8dc417753a5b (diff) | |
download | clang-85f2aa90c23acc494ea5804f84e3ea780eaa1b54.tar.gz clang-85f2aa90c23acc494ea5804f84e3ea780eaa1b54.tar.bz2 clang-85f2aa90c23acc494ea5804f84e3ea780eaa1b54.tar.xz |
MS ABI: Fix forming pointers to members of a base class
Previously we would calculate the inheritance model of a class when
requiring a pointer to member type of that class to be complete. The
inheritance model is used to figure out how many fields are used by the
member pointer.
However, once we require a pointer to member of a derived class type to
be complete, we can form pointers to members of bases without
calculating the inheritance model for those bases. This was causing
crashes on this simple test case:
struct A {
void f();
void f(int);
};
struct B : public A {};
void g() { void (B::*a)() = &B::f; }
Now we calculate the inheritance models of all base classes when
completing a member pointer type.
Fixes PR2007.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210813 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/clang-format/ClangFormat.cpp')
0 files changed, 0 insertions, 0 deletions