[cfe-commits] r165256 - /cfe/trunk/lib/Sema/SemaDecl.cpp

Chandler Carruth chandlerc at google.com
Thu Oct 4 15:12:29 PDT 2012


Can we get a test case for this?

While previously, our ability to regression test the AST has been limited,
I think with the tooling infrastructure we got enough unittest
infrastructure to grab the AST node and call methods on it asserting their
expected contents.


On Thu, Oct 4, 2012 at 2:38 PM, Abramo Bagnara
<abramo.bagnara at bugseng.com>wrote:

> Author: abramo
> Date: Thu Oct  4 16:38:29 2012
> New Revision: 165256
>
> URL: http://llvm.org/viewvc/llvm-project?rev=165256&view=rev
> Log:
> Fixed ParamDecl source range for implicit typed k&r parameters.
>
> Modified:
>     cfe/trunk/lib/Sema/SemaDecl.cpp
>
> Modified: cfe/trunk/lib/Sema/SemaDecl.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDecl.cpp?rev=165256&r1=165255&r2=165256&view=diff
>
> ==============================================================================
> --- cfe/trunk/lib/Sema/SemaDecl.cpp (original)
> +++ cfe/trunk/lib/Sema/SemaDecl.cpp Thu Oct  4 16:38:29 2012
> @@ -7574,6 +7574,9 @@
>          unsigned DiagID; // unused
>          DS.SetTypeSpecType(DeclSpec::TST_int, FTI.ArgInfo[i].IdentLoc,
>                             PrevSpec, DiagID);
> +        // Use the identifier location for the type source range.
> +        DS.SetRangeStart(FTI.ArgInfo[i].IdentLoc);
> +        DS.SetRangeEnd(FTI.ArgInfo[i].IdentLoc);
>          Declarator ParamD(DS, Declarator::KNRTypeListContext);
>          ParamD.SetIdentifier(FTI.ArgInfo[i].Ident,
> FTI.ArgInfo[i].IdentLoc);
>          FTI.ArgInfo[i].Param = ActOnParamDeclarator(S, ParamD);
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20121004/89d94946/attachment.html>


More information about the cfe-commits mailing list