Details
-
Bug
-
Resolution: Cannot Reproduce
-
P3: Somewhat important
-
None
-
Qt Creator 3.6.0
Description
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.
Attachments
Issue Links
- is duplicated by
-
QTCREATORBUG-19189 Clang: No highlighting for operator[] argument
- Closed
- links to
For Gerrit Dashboard: QTCREATORBUG-15473 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
143387,3 | Clang: Add disabled test ArgumentToUserDefinedIndexOperator | master | qt-creator/qt-creator | Status: MERGED | +2 | 0 |