summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDeclCXX.cpp
diff options
context:
space:
mode:
authorErich Keane <erich.keane@intel.com>2017-09-15 16:03:35 +0000
committerErich Keane <erich.keane@intel.com>2017-09-15 16:03:35 +0000
commit58bd603109e4e6ca214712ca897d024bed07ef0f (patch)
treef4864509cdc5bb0e7bdf3502de05b680272f11db /clang/lib/Sema/SemaDeclCXX.cpp
parentf34537dff8e75704d699bca7b6a03a6949c50c61 (diff)
downloadbcm5719-llvm-58bd603109e4e6ca214712ca897d024bed07ef0f.tar.gz
bcm5719-llvm-58bd603109e4e6ca214712ca897d024bed07ef0f.zip
Fix the __interface inheritence rules to work better with IUnknown and IDispatch
__interface objects in MSVC are permitted to inherit from __interface types, and interface-like types. Additionally, there are two default interface-like types (IUnknown and IDispatch) that all interface-like types must inherit from. Differential Revision: https://reviews.llvm.org/D37308 llvm-svn: 313364
Diffstat (limited to 'clang/lib/Sema/SemaDeclCXX.cpp')
-rw-r--r--clang/lib/Sema/SemaDeclCXX.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp
index 941930c51ae..a9ef333c66e 100644
--- a/clang/lib/Sema/SemaDeclCXX.cpp
+++ b/clang/lib/Sema/SemaDeclCXX.cpp
@@ -2388,7 +2388,7 @@ bool Sema::AttachBaseSpecifiers(CXXRecordDecl *Class,
if (const RecordType *Record = NewBaseType->getAs<RecordType>()) {
const CXXRecordDecl *RD = cast<CXXRecordDecl>(Record->getDecl());
if (Class->isInterface() &&
- (!RD->isInterface() ||
+ (!RD->isInterfaceLike() ||
KnownBase->getAccessSpecifier() != AS_public)) {
// The Microsoft extension __interface does not permit bases that
// are not themselves public interfaces.
OpenPOWER on IntegriCloud