You must be registered to post a reply. Click here to register.
T O P I C R E V I E W
jay.carlton
Posted - Feb 20 2014 : 09:47:02 AM Hi,
Occasionally I'll come across a preprocessor macros or symbol that I'd rather not use anymore, and it would be nice to have a refactoring option to replace either individual occurrences or all occurrences of it with the expanded source code. Presumably VA is doing the heavy lifting to parse these macros already, and this capability might also be a good troubleshooting aid if anyone runs into problems with particular macros.
A related operation would be "Extract Preprocessor Macro/Constant" that could work like Extract Method or Extract Literal, except you'd probably eventually want support for the # and ## notions. In almost every case I'd tend to use C++ constants and typedefs rather than #defines, but for completeness I suppose there cases where one might want this (C code, for example).
Thanks, Jay
1 L A T E S T R E P L I E S (Newest First)
feline
Posted - Feb 25 2014 : 11:38:57 PM An interesting idea, we are considering adding a command to expand / inline a macro:
case=5160
As you say, there are some edge cases that we need to watch out for. Simple macros are safer than some of the more complex ones.