Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
Qt Creator 4.14.0
-
None
-
74177a559e16c5c260d8934a7f5a7a959e4565b3 (qt-creator/qt-creator/master)
Description
Consider the following code snippet:
struct S { union { int i = 12; void *something; }; int func(bool b) { if (b) return i; // <-- here int i = 42; return i; } };
In the marked line, i is not colored as a member variable; moreover go-to-definition will jump to the local definition of i, instead of to the one inside the union.
If the union is replaced with a simple member i, or if this->i is used instead of i, everything works as expected.