| Summary: | Chained comma operator is not highlighted in editor | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Andrew Gvozdev <angvoz.dev> | ||||
| Component: | cdt-parser | Assignee: | Markus Schorn <mschorn.eclipse> | ||||
| Status: | RESOLVED FIXED | QA Contact: | Markus Schorn <mschorn.eclipse> | ||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | aleherb+eclipse, cdtdoug | ||||
| Version: | 8.0 | ||||||
| Target Milestone: | 8.0 | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
I assume this is a parser problem. Created attachment 187268 [details]
testcase + fix
Fixed in 8.0 > 20110121. *** cdt cvs genie on behalf of mschorn *** Bug 334955: Overloaded comma operator with const class reference. [*] CPPSemantics.java 1.198 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt-core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPSemantics.java?root=Tools_Project&r1=1.197&r2=1.198 [*] AST2CPPTests.java 1.379 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt-core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPTests.java?root=Tools_Project&r1=1.378&r2=1.379 |
In the example below only first overloaded comma operator in main() is being highlighted and hyperlinked in editor. On the other hand, operator plus works fine. #include <iostream> class CHAINER { public: CHAINER const & operator,(int x) const { std::cout << "*** " << x << " ***\n"; return *this; }; CHAINER const & operator+(int x) const { std::cout << "+++ " << x << " +++\n"; return *this; }; }; int main() { CHAINER c; c,0,1,2; // Only first comma is colored c+10+11+12; // Coloring is fine here return 0; }