summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorReid Kleckner <reid@kleckner.net>2013-03-28 23:11:29 +0000
committerReid Kleckner <reid@kleckner.net>2013-03-28 23:11:29 +0000
commit557a0352299ffe3d843682c66324c3975ca4c6d1 (patch)
treeab6c8c28bd4d6df7e891c51bf041682d455a4c8b /clang/lib
parentba64859e6e193ef29ceee5da1b55a81cefe2b7dd (diff)
downloadbcm5719-llvm-557a0352299ffe3d843682c66324c3975ca4c6d1.tar.gz
bcm5719-llvm-557a0352299ffe3d843682c66324c3975ca4c6d1.zip
[ms-cxxabi] Add more tests for r178297
This covers a few cases where the class of a member pointer is not a CXXRecordDecl. llvm-svn: 178307
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Sema/SemaType.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaType.cpp b/clang/lib/Sema/SemaType.cpp
index 06004bd00c5..136de7c221a 100644
--- a/clang/lib/Sema/SemaType.cpp
+++ b/clang/lib/Sema/SemaType.cpp
@@ -1733,12 +1733,12 @@ QualType Sema::BuildMemberPointerType(QualType T, QualType Class,
// when passing pointers between TUs that disagree about the size.
if (Context.getTargetInfo().getCXXABI().isMicrosoft()) {
CXXRecordDecl *RD = Class->getAsCXXRecordDecl();
- if (!RD || !RD->hasAttr<MSInheritanceAttr>()) {
+ if (RD && !RD->hasAttr<MSInheritanceAttr>()) {
// Lock in the inheritance model on the first use of a member pointer.
// Otherwise we may disagree about the size at different points in the TU.
// FIXME: MSVC picks a model on the first use that needs to know the size,
// rather than on the first mention of the type, e.g. typedefs.
- if (RequireCompleteType(Loc, Class, 0) && RD && !RD->isBeingDefined()) {
+ if (RequireCompleteType(Loc, Class, 0) && !RD->isBeingDefined()) {
// We know it doesn't have an attribute and it's incomplete, so use the
// unspecified inheritance model. If we're in the record body, we can
// figure out the inheritance model.
OpenPOWER on IntegriCloud