diff options
author | John McCall <rjmccall@apple.com> | 2009-10-23 21:48:59 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2009-10-23 21:48:59 +0000 |
commit | 856bbea33288b351e3943c7544a8c94c39a014d4 (patch) | |
tree | 6b6f07c452b492c76d2b039c61ca967dff29fa34 /clang/lib/Sema/SemaDecl.cpp | |
parent | 3665e00c87ba3f69f731e5254140ec4cd36807a9 (diff) | |
download | bcm5719-llvm-856bbea33288b351e3943c7544a8c94c39a014d4.tar.gz bcm5719-llvm-856bbea33288b351e3943c7544a8c94c39a014d4.zip |
Remove OriginalTypeParmDecl; the original type is the one specified
in the DeclaratorInfo, if one is present.
Preserve source information through template instantiation. This is made
more complicated by the possibility that ParmVarDecls don't have DIs, which
is possibly worth fixing in the future.
Also preserve source information for function parameters in ObjC method
declarations.
llvm-svn: 84971
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r-- | clang/lib/Sema/SemaDecl.cpp | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index b83181becb9..98b71c7360c 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -3668,16 +3668,9 @@ Sema::ActOnParamDeclarator(Scope *S, Declarator &D) { QualType T = adjustParameterType(parmDeclType); - ParmVarDecl *New; - if (T == parmDeclType) // parameter type did not need adjustment - New = ParmVarDecl::Create(Context, CurContext, - D.getIdentifierLoc(), II, - parmDeclType, DInfo, StorageClass, - 0); - else // keep track of both the adjusted and unadjusted types - New = OriginalParmVarDecl::Create(Context, CurContext, - D.getIdentifierLoc(), II, T, DInfo, - parmDeclType, StorageClass, 0); + ParmVarDecl *New + = ParmVarDecl::Create(Context, CurContext, D.getIdentifierLoc(), II, + T, DInfo, StorageClass, 0); if (D.isInvalidType()) New->setInvalidDecl(); |