Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [cdt-dev] Error in Indexing with #define

Yes, that would be a bug.
 
We've struggled with producing a good context inside macro expansion for the search features.
 
Doug Schaefer
Engineering Manager, Wind River Systems
and Eclipse CDT Project Lead
 


From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Marcio Moreno
Sent: Wednesday, January 09, 2008 8:50 AM
To: cdt-dev@xxxxxxxxxxx
Subject: [cdt-dev] Error in Indexing with #define

I found a error in cdt. Please see this and tell me if is a bug.

I create 2 files.

test.h
#ifndef TEST_H_
#define TEST_H_

#undef ASSERT
#define ASSERT(_expression_) if ((_expression_) == 1) {exit()};

class test
{
public:
    test();
    test2(int a);
    test3(int a);
};

#endif /*TEST_H_*/


test.cpp:
#include "test.h"

test::test()
{   
}

test::test2(int a)
{   
}

test::test3(int a)
{
    int b;
    test2(b);
    ASSERT(test2(b));
}

When I press F3 on function test2 in line test2(b) the indexer work perfectly.
But when I press F3 on function test2 in line ASSERT(test2(b)) this dont work. In define ASSERT the index work very well.

This is a bug ??

Thks for any help.

[]s
Marcio

Back to the top