diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2011-02-08 18:05:59 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2011-02-08 18:05:59 +0000 |
commit | 1e52dfc648ce0b25ef57ae29ef1b4337d80011ef (patch) | |
tree | 7f98634461762173d237a91bf2420778873376a5 /lib/Sema/SemaDecl.cpp | |
parent | b6c2b3f658df5525b9c0af606b64d304e7416c2f (diff) |
Support for objextive-c++ use of property-dot syntax as receiver
in liu of a class method getter.
// rdar://8962253
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125094 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r-- | lib/Sema/SemaDecl.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index aed950c8fc..a5190961b5 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -60,7 +60,7 @@ Sema::DeclGroupPtrTy Sema::ConvertDeclToDeclGroup(Decl *Ptr) { /// and then return NULL. ParsedType Sema::getTypeName(IdentifierInfo &II, SourceLocation NameLoc, Scope *S, CXXScopeSpec *SS, - bool isClassName, + bool isClassName, bool HasTrailingDot, ParsedType ObjectTypePtr) { // Determine where we will perform name lookup. DeclContext *LookupCtx = 0; @@ -193,13 +193,15 @@ ParsedType Sema::getTypeName(IdentifierInfo &II, SourceLocation NameLoc, T = getElaboratedType(ETK_None, *SS, T); } else if (ObjCInterfaceDecl *IDecl = dyn_cast<ObjCInterfaceDecl>(IIDecl)) { - T = Context.getObjCInterfaceType(IDecl); - } else { + if (!HasTrailingDot) + T = Context.getObjCInterfaceType(IDecl); + } + + if (T.isNull()) { // If it's not plausibly a type, suppress diagnostics. Result.suppressDiagnostics(); return ParsedType(); } - return ParsedType::make(T); } |