Community
Participate
Working Groups
Build Identifier: 7.0.0.201006141710 Searching for a particular struct variable with the C/C++ Search is not possible. Reproducible: Always Steps to Reproduce: 1. Select a piece of code similar to "myStruct.myVariable". 2. Click Search > C/C++ Result: The search string taken over from the selection does not contain the dot anymore (in this example: "myStructmyVariable").
Let's consider the following example: struct S { int a; }; void test() { S s; s.a= 1; } When trying to search for 's.a' the dot is removed, because you can only search for (possibly qualified) names, but not for expressions. What you really want to search for is 'S::a', or simply 'a'. As an alternative you can select 'a' and then use the context menu 'References - Workspace'. To improve the experience with the C/C++ search in such a situation we could either: * drop the text before the '.', i.e convert 's.a' into 'a', or * use the parser to convert the field-access expressions into the member it refers to (s.a -> S::a). This would raise the question whether the same should be done for names (a -> S::a).