Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [cdt-dev] Indexer question!

Hi,
the parser considers global declaraions even if you ommit include directives. With that you
can use navigation features before you provide the include directive.
 
Per default the indexer does not look at header files. Therefore, initially Sample.h is not part
of the index and no navigation is possible. After you have included it once it is parsed and
stored in the index. Removing the include directive does not remove the header from the index
so navigation continues to work.
 
One could argue that CDT should immediatly detect that the header is no longer included and
that it should be removed from the index. However, I don't think that this is important.
 
Markus.


From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Figuer, Felipe A
Sent: Thursday, April 22, 2010 10:53 PM
To: cdt-dev@xxxxxxxxxxx
Subject: [cdt-dev] Indexer question!
Importance: Low

Does “Update index immediately after every file-save” mean every time I do a file-save operation the indexer is kept updated?

 

I have the following case where the index does NOT seem to be updated correctly.

 

Given the following header file contents:

 

#ifndef SAMPLE_H_

#define SAMPLE_H_

 

int h_function();

#endif /* SAMPLE_H_ */

 

And the following source file contents:

 

//#include "Sample.h"

int main(void) {

      return function() * EXIT_SUCCESS;

}

int h_function() {

      return 55;

}

 

1.-When just open the project and I do a F3 over h_function it takes me no where which makes sense because the header that contains the function prototype is commented out.

 

2.-If I uncomment the header Sample.h and I save the F3 over h_function starts working taking me to the h_function prototype so far so good.

 

3.-But if I comment again the line where I have the #include “Sample.h”, F3 over h_function still works taking me to the prototype so the index seems to have OLD data.

 

4.-Nevertheless if rebuild the index (index->Rebuild) I get back the behavior when I just opened the project (step 1).

 

Could you explain why this happens please? Am I missing something?

 

Thanks in advance,

 

Felipe Antonio Martinez Figueroa.

+52 442 1030500 Ext.1249.

felipe.a.figuer@xxxxxxxxxx

Delphi Electronics & Safety

Software Development Tools & Expert Synergy User & Suggestions Committee Leader

Queretaro Technical Center.

Circuito Palma Cocotera No. 2059.

Fraccionamiento Palmares.

Queretaro, Qro. CP 76127

Mexico.

 

****************************************************************************************

Note:  If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to the message and deleting it from your computer. Thank you. 

****************************************************************************************

Back to the top