Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[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