aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaType.cpp
diff options
context:
space:
mode:
authorJoao Matos <ripzonetriton@gmail.com>2012-09-04 17:18:12 +0000
committerJoao Matos <ripzonetriton@gmail.com>2012-09-04 17:18:12 +0000
commit679fc9314c2bde5eb6bea33c790d1a035461e618 (patch)
tree00c8d18c8e6970114484d795b6fe59f8238b5e27 /lib/Sema/SemaType.cpp
parent21a37047e56d717c7979fa653c9f30aae468608d (diff)
Revert r163078 per chandlerc's request.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163145 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaType.cpp')
-rw-r--r--lib/Sema/SemaType.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Sema/SemaType.cpp b/lib/Sema/SemaType.cpp
index 68cd5cdcf8..82dccfa5f4 100644
--- a/lib/Sema/SemaType.cpp
+++ b/lib/Sema/SemaType.cpp
@@ -1583,6 +1583,14 @@ QualType Sema::BuildMemberPointerType(QualType T, QualType Class,
return QualType();
}
+ // In the Microsoft ABI, the class is allowed to be an incomplete
+ // type. In such cases, the compiler makes a worst-case assumption.
+ // We make no such assumption right now, so emit an error if the
+ // class isn't a complete type.
+ if (Context.getTargetInfo().getCXXABI() == CXXABI_Microsoft &&
+ RequireCompleteType(Loc, Class, diag::err_incomplete_type))
+ return QualType();
+
return Context.getMemberPointerType(T, Class.getTypePtr());
}