Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 344627

Summary: Selection expansion on arguments inside macro function call expands to the call
Product: [Tools] CDT Reporter: Marc-AndrĂ© Laperle <malaperle>
Component: cdt-editorAssignee: Project Inbox <cdt-editor-inbox>
Status: NEW --- QA Contact: Jonah Graham <jonah>
Severity: normal    
Priority: P3 CC: cdtdoug, yevshif
Version: 8.0   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Marc-André Laperle CLA 2011-05-03 14:03:02 EDT
Example:

#define Foo(a) bar(a)

int main() {
    int test;
    Foo(test);
    return 0;
}

Place cursor in the middle of the second 'test', expand (Alt+shift+up). 'Foo(test)' is selected instead of 'test'.
Comment 1 Andrew Gvozdev CLA 2011-05-03 14:45:03 EDT
Not sure if related but I also noticed that macro expansion hover presents outer macro for nested macro expressions when pointed to inner one. If I point mouse cursor to INNER_MACRO trying to see its value it will show OUTER_MACRO expansion instead:

int x = OUTER_MACRO(INNER_MACRO);