diff options
Diffstat (limited to 'clang/lib/AST/ASTContext.cpp')
-rw-r--r-- | clang/lib/AST/ASTContext.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp index c50a0210282..d03ed41a152 100644 --- a/clang/lib/AST/ASTContext.cpp +++ b/clang/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 += '#'; |