summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang/lib/Sema/SemaExprObjC.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaExprObjC.cpp b/clang/lib/Sema/SemaExprObjC.cpp
index a2399b7ec42..cc8eacee610 100644
--- a/clang/lib/Sema/SemaExprObjC.cpp
+++ b/clang/lib/Sema/SemaExprObjC.cpp
@@ -3170,8 +3170,8 @@ static inline ObjCBridgeAttr *getObjCBridgeAttr(const TypedefType *TD) {
QualType QT = TDNDecl->getUnderlyingType();
if (QT->isPointerType()) {
QT = QT->getPointeeType();
- if (QT->isStructureType() || QT->isUnionType() || QT->isClassType())
- if (RecordDecl *RD = QT->getAs<RecordType>()->getDecl())
+ if (const RecordType *RT = QT->getAs<RecordType>())
+ if (RecordDecl *RD = RT->getDecl())
if (RD->hasAttr<ObjCBridgeAttr>())
return RD->getAttr<ObjCBridgeAttr>();
}
OpenPOWER on IntegriCloud