diff options
Diffstat (limited to 'tools/libclang/CXType.cpp')
-rw-r--r-- | tools/libclang/CXType.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/libclang/CXType.cpp b/tools/libclang/CXType.cpp index 93326724de846..5af955357bb2a 100644 --- a/tools/libclang/CXType.cpp +++ b/tools/libclang/CXType.cpp @@ -379,9 +379,10 @@ CXString clang_getDeclObjCTypeEncoding(CXCursor C) { ASTContext &Ctx = AU->getASTContext(); std::string encoding; - if (ObjCMethodDecl *OMD = dyn_cast<ObjCMethodDecl>(D)) - Ctx.getObjCEncodingForMethodDecl(OMD, encoding); - else if (ObjCPropertyDecl *OPD = dyn_cast<ObjCPropertyDecl>(D)) + if (ObjCMethodDecl *OMD = dyn_cast<ObjCMethodDecl>(D)) { + if (Ctx.getObjCEncodingForMethodDecl(OMD, encoding)) + return cxstring::createCXString("?"); + } else if (ObjCPropertyDecl *OPD = dyn_cast<ObjCPropertyDecl>(D)) Ctx.getObjCEncodingForPropertyDecl(OPD, NULL, encoding); else if (FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) Ctx.getObjCEncodingForFunctionDecl(FD, encoding); |