| Summary: | [f.p.] Bogus "Assignment to itself" error | ||
|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Sergey Prigogin <eclipse.sprigogin> |
| Component: | cdt-codan | Assignee: | Elena Laskavaia <elaskavaia.cdt> |
| Status: | RESOLVED FIXED | QA Contact: | Elena Laskavaia <elaskavaia.cdt> |
| Severity: | normal | ||
| Priority: | P3 | CC: | cdtdoug |
| Version: | 8.0 | ||
| Target Milestone: | 8.0 | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
did not know you can write programs like this...
Simpler case
#define X a = 1
main(){
X;
}
(In reply to comment #1) This is not the actual code on which I encountered the problem initially. The problem affects assertion macros of googletest (http://code.google.com/p/googletest/) framework. fixed on head (8.0) test case added *** cdt cvs genie on behalf of elaskavaia *** Bug 321933 fixed f.p. in assignment to itself checker when assignment is in macro [*] AssignmentToItselfCheckerTest.java 1.2 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/core/internal/checkers/AssignmentToItselfCheckerTest.java?root=Tools_Project&r1=1.1&r2=1.2 [*] AssignmentToItselfChecker.java 1.2 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/AssignmentToItselfChecker.java?root=Tools_Project&r1=1.1&r2=1.2 |
CDT HEAD: int& func(); #define X func() = 1 void test() { X; // The line is marked: Assignment to itself 'X' }