Bug 344627 - Selection expansion on arguments inside macro function call expands to the call
Summary: Selection expansion on arguments inside macro function call expands to the call
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-editor (show other bugs)
Version: 8.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-03 14:03 EDT by Marc-André Laperle CLA
Modified: 2020-09-04 15:17 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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);