-
Bug
-
Resolution: Cannot Reproduce
-
P3: Somewhat important
-
None
-
Qt Creator 3.6.0
struct Foo {
Foo &operator[](int key);
};
void failsHere()
{
const int index = 3;
Foo foo;
foo[index]; // Ops, "index" is highlighted as "function"
}
void worksAsExpectedHere()
{
const int index = 3;
int foo[100];
foo[index]; // OK, "index" is highlighted as "local variable".
}
This is a libclang bug, re-producible with libclang 3.6 and the current (not yet released) 3.8.
Underlying issue seems to be that the "referenced cursor" for "index" is of kind CXCursor_CXXMethod, not CXCursor_VarDecl.
- is duplicated by
-
QTCREATORBUG-19189 Clang: No highlighting for operator[] argument
-
- Closed
-
- links to