Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 334955

Summary: Chained comma operator is not highlighted in editor
Product: [Tools] CDT Reporter: Andrew Gvozdev <angvoz.dev>
Component: cdt-parserAssignee: 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:
Description Flags
testcase + fix mschorn.eclipse: iplog-

Description Andrew Gvozdev CLA 2011-01-20 17:10:29 EST
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;
}
Comment 1 Anton Leherbauer CLA 2011-01-21 04:04:14 EST
I assume this is a parser problem.
Comment 2 Markus Schorn CLA 2011-01-21 05:38:33 EST
Created attachment 187268 [details]
testcase + fix
Comment 3 Markus Schorn CLA 2011-01-21 05:42:14 EST
Fixed in 8.0 > 20110121.