From: Nate Begeman Date: Sun, 17 Feb 2008 21:02:04 +0000 (+0000) Subject: Handle parameter attributes X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6d20d031c606466c6280873210791f2e09444e47;p=clang Handle parameter attributes git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47243 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/Sema/SemaDecl.cpp b/Sema/SemaDecl.cpp index 6a718aef91..9a19928ce7 100644 --- a/Sema/SemaDecl.cpp +++ b/Sema/SemaDecl.cpp @@ -936,8 +936,8 @@ Sema::DeclTy *Sema::FinalizeDeclaratorGroup(Scope *S, DeclTy *group) { // Called from Sema::ParseStartOfFunctionDef(). ParmVarDecl * -Sema::ActOnParamDeclarator(struct DeclaratorChunk::ParamInfo &PI, Scope *FnScope) -{ +Sema::ActOnParamDeclarator(struct DeclaratorChunk::ParamInfo &PI, + Scope *FnScope) { IdentifierInfo *II = PI.Ident; // TODO: CHECK FOR CONFLICTS, multiple decls with same name in one scope. // Can this happen for params? We already checked that they don't conflict @@ -977,7 +977,6 @@ Sema::ActOnParamDeclarator(struct DeclaratorChunk::ParamInfo &PI, Scope *FnScope ParmVarDecl *New = new ParmVarDecl(PI.IdentLoc, II, parmDeclType, VarDecl::None, 0); - // FIXME: Handle attributes if (PI.InvalidType) New->setInvalidDecl(); @@ -989,6 +988,7 @@ Sema::ActOnParamDeclarator(struct DeclaratorChunk::ParamInfo &PI, Scope *FnScope FnScope->AddDecl(New); } + HandleDeclAttributes(New, PI.AttrList, 0); return New; }