From: Baptiste L. <gai...@fr...> - 2003-04-26 22:30:38
|
Fine with me (doing the error detection is already part of the work). Though, we agree that it can be a useful refactoring ?. Notes that the code model make adding a compound fairly easy. The hard part is figuring out if it is needed, and what data to put in. Baptiste. ----- Original Message ----- From: "Sven Reichard" <rei...@ma...> To: "CppTool Mailing List" <Cpp...@li...> Sent: Friday, April 25, 2003 3:42 PM Subject: Re: [Cpptool-develop] space problem > On Fri, 25 Apr 2003, Baptiste Lepilleur wrote: > > > Good. > > > > I've added a test to SplitDeclarationRefactoringTest for declaration > > occuring inside for statement. > > > > What should we do in that case ? If we keep the current semantic of the > > refactoring, I think a error should be reported, but on the other hand, we > > could change the refactoring to ExtractDeclarationRefactoring. > > For now, I think an error should be reported. > > > > For a declaration statement, the semantic remaing identical. > > For a declaration occuring in a for statement (initializer), a if or a while > > condition, declarations are extracted before the for statement (tricky, may > > need to add a compound statement). > > > > What do you think ? > > This requires some more sophisticated code analysis, unless we decide to > always encapsulate the extracted declaration and the for statement in a > new compound. Let's keep this on the TODO list. > > Sven. > > > Baptiste. > > > > ----- Original Message ----- > > From: "Sven Reichard" <rei...@ma...> > > To: "CppTool Mailing List" <Cpp...@li...> > > Sent: Thursday, April 24, 2003 6:29 PM > > Subject: [Cpptool-develop] space problem > > > > > > > I solved the "space problem" that occured when rewriting declarator > > > expression. I'm currently checking in the changes. > > > > > > My past remarks about keeping pointers to deleted elements are obsolete. > > > Sorry about the confusion. > > > > > > Sven. > > > > > > -- > > > Sven Reichard > > > Dept. of Math. Sci. > > > University of Delaware > > > rei...@ma... |