Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re[cdt-dev] factoring Preconditions

Hi I've been trying out the refactorings in CDT 5.0 as I was hoping to do a
prototype extension of the refactorings which are currently available. I was
wondering if the refactorings were developed with Garrido's PHD thesis on
refactoring in the presence of preprocessor directives in mind as it seems
that the preconditions checking don't extend to preprocessor directives. 

For example with the rename refactoring, I could define a macro which say
makes reference to a variable which is only used within the scope of a
particular function yet if I were to perform a rename refactoring on that
particular variable it wouldn't check the macro definitions of macros called
from within that function to see if they referred to that variable and block
the refactoring.

e.g

#define COUNT i=i+1

void perform_counting (void) {

int i; <- rename i

i = 0;

while (i < 10) {

COUNT

}

return;
}

Is this due to limitations with the parser and ast representation and is
there an easy way to check all scopes in which a particular element is
referenced project-wide?


-- 
View this message in context: http://www.nabble.com/Refactoring-Preconditions-tp17186373p17186373.html
Sent from the Eclipse CDT - Development mailing list archive at Nabble.com.



Back to the top