aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/AST/ASTContext.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp
index c50a021028..d03ed41a15 100644
--- a/lib/AST/ASTContext.cpp
+++ b/lib/AST/ASTContext.cpp
@@ -1795,10 +1795,12 @@ void ASTContext::getObjCEncodingForTypeImpl(QualType T, std::string& S,
}
else if (PointeeTy->isObjCInterfaceType()) {
S += '@';
- ObjCInterfaceDecl *OI = PointeeTy->getAsObjCInterfaceType()->getDecl();
- S += '"';
- S += OI->getNameAsCString();
- S += '"';
+ if (FD) {
+ ObjCInterfaceDecl *OI = PointeeTy->getAsObjCInterfaceType()->getDecl();
+ S += '"';
+ S += OI->getNameAsCString();
+ S += '"';
+ }
return;
} else if (isObjCClassType(PointeeTy)) {
S += '#';