Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Refactoring

Yes, but the index should know.
No need to scan the files.

-------- Original Message  --------
Subject: Re: [cdt-dev] Refactoring
From: Austin Morgan <admorgan@xxxxxxxxxxxxxxxxxxx>
To: CDT General developers list. <cdt-dev@xxxxxxxxxxx>
Date: Mittwoch, 20. April 2011 13:48:25

Your variable isn't necessarily only visible from that source file.  If
your definition was

namespace {
     static x *foo;

you would be right, but you can access that namespace from any file and
using extern x *foo utilize that variable.  I wouldn't advise it, but the
refactoring tool has to deal with worse case scenarios.


On Wed, Apr 20, 2011 at 08:48:24AM +0200, Jesper Eskilson wrote:

Hi people,

I'm attempting to rename a variable declared inside an anonymous namespace:

namespace {
    X *foo;

This all goes fine, but CDT first scans every single source file in my
project (~10k), which takes an annoyingly long time (10-15 seconds).
Isn't that pretty unnecessary, given that the variable is only visible
in the current source file?

Jesper Eskilson, Developer
IAR Systems AB
Box 23051, Strandbodgatan 1
SE-750 23 Uppsala, SWEDEN
Phone: +46 18 16 78 00 Fax: +46 18 16 78 38
E-mail: jesper.eskilson@xxxxxxx Website:

cdt-dev mailing list
cdt-dev mailing list

Back to the top