Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
Qt Creator 4.7.1, Qt Creator 4.10.0-beta2
-
Windows 7 x64
Qt 5.9.1 for MinGW 5.3.0 32 bit
Clang Code Model
Description
I have a macro COMPARE which is just a define:
#define COMPARE(foo, bar) compare(foo, bar, __LINE__)
When I use the macro, I expect to see foo and bar as completion suggestions, but Creator offers me foo, bar and line from the underlying compare function.
Example:
#include <stdio.h> void compare(int foo, int bar, int line) { if (foo != bar) printf("Line %d: %d != %d", line, foo, bar); } #define COMPARE(foo, bar) compare(foo, bar, __LINE__) int main() { COMPARE(42, |) // Cursor here, press Ctrl+Space // Expected: Suggestion COMPARE(foo, *bar*) // Actual: Suggestion COMPARE(foo, *bar*, line) return 0; }