|
Lines 32-37
import org.eclipse.cdt.core.dom.ast.IASTBreakStatement;
Link Here
|
| 32 |
import org.eclipse.cdt.core.dom.ast.IASTCaseStatement; |
32 |
import org.eclipse.cdt.core.dom.ast.IASTCaseStatement; |
| 33 |
import org.eclipse.cdt.core.dom.ast.IASTCompoundStatement; |
33 |
import org.eclipse.cdt.core.dom.ast.IASTCompoundStatement; |
| 34 |
import org.eclipse.cdt.core.dom.ast.IASTContinueStatement; |
34 |
import org.eclipse.cdt.core.dom.ast.IASTContinueStatement; |
|
|
35 |
import org.eclipse.cdt.core.dom.ast.IASTDeclaration; |
| 35 |
import org.eclipse.cdt.core.dom.ast.IASTDeclarationStatement; |
36 |
import org.eclipse.cdt.core.dom.ast.IASTDeclarationStatement; |
| 36 |
import org.eclipse.cdt.core.dom.ast.IASTDefaultStatement; |
37 |
import org.eclipse.cdt.core.dom.ast.IASTDefaultStatement; |
| 37 |
import org.eclipse.cdt.core.dom.ast.IASTDoStatement; |
38 |
import org.eclipse.cdt.core.dom.ast.IASTDoStatement; |
|
Lines 238-244
public class ControlFlowGraphBuilder {
Link Here
|
| 238 |
ICPPASTCatchHandler[] catchHandlers = body.getCatchHandlers(); |
239 |
ICPPASTCatchHandler[] catchHandlers = body.getCatchHandlers(); |
| 239 |
for (int i = 0; i < catchHandlers.length; i++) { |
240 |
for (int i = 0; i < catchHandlers.length; i++) { |
| 240 |
ICPPASTCatchHandler handler = catchHandlers[i]; |
241 |
ICPPASTCatchHandler handler = catchHandlers[i]; |
| 241 |
IBranchNode handlerNode = factory.createBranchNode(handler.getDeclaration()); |
242 |
IASTDeclaration handlerDecl = handler.getDeclaration(); |
|
|
243 |
// handlerDecl might be null if the handler is of the form 'catch (...)' |
| 244 |
IBranchNode handlerNode; |
| 245 |
if (handlerDecl == null) |
| 246 |
handlerNode = factory.createBranchNode("..."); //$NON-NLS-1$ |
| 247 |
else |
| 248 |
handlerNode = factory.createBranchNode(handler.getDeclaration()); |
| 242 |
addOutgoing(ifNode, handlerNode); |
249 |
addOutgoing(ifNode, handlerNode); |
| 243 |
IBasicBlock els = createSubGraph(handlerNode, handler.getCatchBody()); |
250 |
IBasicBlock els = createSubGraph(handlerNode, handler.getCatchBody()); |
| 244 |
addJump(els, mergeNode); |
251 |
addJump(els, mergeNode); |