thoni56 / c-xrefactory

A refactoring tool for C/Yacc and Emacs. The first tool to cross Refactory Rubicon. Initial work, and released under GPL in 2009, by Marián Vittek.
https://thoni56.github.io/c-xrefactory/
GNU General Public License v2.0
23 stars 4 forks source link

Macros with same name in different C files are considered the same #60

Open thoni56 opened 4 years ago

thoni56 commented 4 years ago

Looking at GetChar() in c-xrefactory itself, you will find it in lex.c, classfilereader.c and cxfile.c.

Pushing one of them and navigating through all references you will see that they are somehow considered the same by c-xrefactory.

(The example was taken from commit 0bec71f in case those functions are refactored out or renamed in later commits.)

thoni56 commented 4 years ago

This is an example of when to apply -exactpositionresolve option...

It seems like this flag is stored in the Tags file and tags generated without it are incompatible with c-xref updates running without that option, and vice versa.

It would be good to have the precision of -exactpositionresolve with out the cost of losing fast updates...

I am unsure why the macros in the example are missinterpreted since they are local to the C-files they reside in.