diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2007-11-09 22:27:59 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2007-11-09 22:27:59 +0000 |
commit | 360300ca2ee298d585d29baf006519507d968812 (patch) | |
tree | b94824afb408a9c8c22de5baff3749ef9e6e9538 /Sema/SemaType.cpp | |
parent | 7964c9f61e77b2cdf6c5c08c97ee2ea0c8360aec (diff) |
Some code clean up in the form of name changes for functions which
process method definitions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43967 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Sema/SemaType.cpp')
-rw-r--r-- | Sema/SemaType.cpp | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/Sema/SemaType.cpp b/Sema/SemaType.cpp index 71ec3f395d..7eb546efbf 100644 --- a/Sema/SemaType.cpp +++ b/Sema/SemaType.cpp @@ -325,9 +325,9 @@ QualType Sema::GetTypeForDeclarator(Declarator &D, Scope *S) { return T; } -/// ObjcGetTypeForDeclarator - Convert the type for the specified declarator to Type -/// instances. -QualType Sema::ObjcGetTypeForDeclarator(DeclTy *D, Scope *S) { +/// ObjcGetTypeForMethodDefinition - Builds the type for a method definition +/// declarator +QualType Sema::ObjcGetTypeForMethodDefinition(DeclTy *D, Scope *S) { ObjcMethodDecl *MDecl = dyn_cast<ObjcMethodDecl>(static_cast<Decl *>(D)); QualType T = MDecl->getResultType(); llvm::SmallVector<QualType, 16> ArgTys; @@ -346,20 +346,9 @@ QualType Sema::ObjcGetTypeForDeclarator(DeclTy *D, Scope *S) { ParmVarDecl *PDecl = MDecl->getParamDecl(i); QualType ArgTy = PDecl->getType(); assert(!ArgTy.isNull() && "Couldn't parse type?"); - // // Perform the default function/array conversion (C99 6.7.5.3p[7,8]). // This matches the conversion that is done in - // Sema::ParseParamDeclarator(). Without this conversion, the - // argument type in the function prototype *will not* match the - // type in ParmVarDecl (which makes the code generator unhappy). - // - // FIXME: We still apparently need the conversion in - // Sema::ParseParamDeclarator(). This doesn't make any sense, since - // it should be driving off the type being created here. - // - // FIXME: If a source translation tool needs to see the original type, - // then we need to consider storing both types somewhere... - // + // Sema::ObjcBuildMethodParameter(). if (const ArrayType *AT = ArgTy->getAsArrayType()) ArgTy = Context.getPointerType(AT->getElementType()); else if (ArgTy->isFunctionType()) |