Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 345485 - PLDT artifacts not recognized w/i some macro expansions
Summary: PLDT artifacts not recognized w/i some macro expansions
Status: RESOLVED FIXED
Alias: None
Product: PTP
Classification: Tools
Component: PLDT (show other bugs)
Version: 5.0   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: 5.0   Edit
Assignee: Beth Tibbitts CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-11 14:33 EDT by Beth Tibbitts CLA
Modified: 2011-05-16 10:35 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Beth Tibbitts CLA 2011-05-11 14:33:13 EDT
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.
Comment 1 Beth Tibbitts CLA 2011-05-16 10:35:19 EDT
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.