| Summary: | PLDT artifacts not recognized w/i some macro expansions | ||
|---|---|---|---|
| Product: | [Tools] PTP | Reporter: | Beth Tibbitts <beth> |
| Component: | PLDT | Assignee: | Beth Tibbitts <beth> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | 5.0 | ||
| Target Milestone: | 5.0 | ||
| Hardware: | PC | ||
| OS: | Mac OS X - Carbon (unsup.) | ||
| Whiteboard: | |||
The PldtAstVisitors were changed to use more of the logic that the MPI visitor in MPICASTVisitor used. So now the behavior at PldtAstVisitor.visit(IASTExpression) is what all the derived classes used. Removed the derived classes implementation of this method since they had diverged and now all handle things like macro expansions more accurately. Added several more tests to org.eclipse.ptp.pldt.tests as well to check for these. |
In the following small file, the LAPI artifcat LAPI_Amsend inside the do_accumulate is not recognized #include <lapi.h> char err_msg_buf[LAPI_MAX_ERR_STRING]; #define CHECK(func_and_args) \ { \ int rc; \ if ((rc = (func_and_args)) != LAPI_SUCCESS) { \ LAPI_Msg_string(rc, err_msg_buf); \ fprintf(stderr, \ "LAPI returns error message: %s, rc = %d\n", \ err_msg_buf, rc); \ exit(1); \ } \ \ } void do_accumulate(lapi_handle_t *handle, void *param) { CHECK((LAPI_Amsend(*handle, buddy, (void *)(hdr_hdl_list[buddy]), &uhdr, sizeof(uhdr_t), &(data_buffer[0]), len*(sizeof(data_buffer[0])), NULL, NULL, NULL))); } ================= The expansion doesn't expand into something that the visitor hits as a function call expression. Will probably be more accurate and flexible to recognize IdExpressions.