[cfe-commits] [PATCH] Find comment attached to any redeclaration

Dmitri Gribenko gribozavr at gmail.com
Wed Aug 8 11:38:11 PDT 2012


On Tue, Aug 7, 2012 at 4:43 PM, Douglas Gregor <dgregor at apple.com> wrote:
>
> This uncached search seems a bit pessimistic. Why not peek into the cache for each of the redeclarations, to avoid repeatedly performing the unchanged search. Then, when we actually do find a raw comment attached to one of the declarations, update the cache for each of the redeclarations to point at that same raw comment?

I've implemented your suggestion.  Unfortunately, this required some
code restructuring in order not to re-parse one RawComment when it is
attached to multiple redeclarations.

Please review.

Dmitri

-- 
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: find-comment-walk-redecls-v2.patch
Type: application/octet-stream
Size: 15285 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120808/70b2f20a/attachment.obj>


More information about the cfe-commits mailing list