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

Bug 322268

Summary: CPPSemantics should check null for op2 in function findOverloadedOperator
Product: [Tools] CDT Reporter: John Liu <john_ws_liu>
Component: cdt-indexerAssignee: Vivian Kong <vivkong>
Status: RESOLVED FIXED QA Contact: Markus Schorn <mschorn.eclipse>
Severity: normal    
Priority: P3 CC: vivkong
Version: 7.0   
Target Milestone: 7.0.1   
Hardware: PC   
OS: Windows XP   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=321376
Whiteboard:
Attachments:
Description Flags
a patch applied to org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPSemantics vivkong: iplog+

Description John Liu CLA 2010-08-10 14:31:56 EDT
Build Identifier: 

A bug found during the investigation for bug 321736
The function of findOverloadedOperator in class CPPSemantics should check if
the op2 is null since CPPASTBinaryExpression could return null by its
getOperand2 function.



Reproducible: Always
Comment 1 John Liu CLA 2010-08-10 14:36:47 EDT
Created attachment 176263 [details]
a patch applied to org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPSemantics

I have discussed the fix patch with Markus in the bug 321376, https://bugs.eclipse.org/bugs/show_bug.cgi?id=321376

The patch targets CDT 701 and I will also create a junit test case for this patch.
Comment 2 Vivian Kong CLA 2010-08-10 15:41:58 EDT
Applied to cdt_7_0 and HEAD.  Thanks John