Review Request 124285: Compare declarations using declaration chain and marshaled symbols
Maciej Poleski
d82ks8djf82msd83hf8sc02lqb5gh5 at gmail.com
Sun Jul 26 19:40:10 UTC 2015
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/124285/
-----------------------------------------------------------
(Updated Lip 26, 2015, 9:40 po poĊudniu)
Status
------
This change has been marked as submitted.
Review request for KDevelop.
Repository: kdev-clang
Description
-------
Compare declarations using declaration chain and marshaled symbols.
I have serious issue with reflecting declaration entities. Clang provides all required measures for Translation Unit, but we are refactoring whole projects, not single TU.
When I want to make even the simplest refactoring action (like rename variable) I have to find all declarations of this variable in the whole project (world). It is very simple in TU as Clang provides tools like `getCanonicalDecl()` which returns universal witness of declaration. The problem is that usages of this variable can occur also in other TUs. But in other TU we will have other witness. Clang can't help this. I introduced my own facility to compare declarations "globally". It uses two techniques depending on situation:
- declaration chains - if we have "local" symbol (local to TU)
- marshalled symbols (like name mangling) - if we have symbol with external linkage (global)
The second is rewriting of some language rules. It is very disappointing that such functionality had to be rewritten (it _must_ be somewhere in compiler).
Currently this feature is employed in rename varaible action. Works (as with older engine). It is going to be used in change signature as well soon. (I was working on change signature when this issue blocked me)
It seems that I successfully stripped old commits from this new review, but I'm not sure if this fact will be preserved when I begin updates.
I still didn't succeed pushing old changes to repo...
Diffs
-----
refactoring/CMakeLists.txt PRE-CREATION
refactoring/debug.h PRE-CREATION
refactoring/declarationcomparator.h PRE-CREATION
refactoring/declarationcomparator.cpp PRE-CREATION
refactoring/declarationsymbol.h PRE-CREATION
refactoring/declarationsymbol.cpp PRE-CREATION
refactoring/redeclarationchain.h PRE-CREATION
refactoring/redeclarationchain.cpp PRE-CREATION
refactoring/refactoringmanager.cpp PRE-CREATION
refactoring/renamevardeclrefactoring.h PRE-CREATION
refactoring/renamevardeclrefactoring.cpp PRE-CREATION
refactoring/tudecldispatcher.h PRE-CREATION
refactoring/tudecldispatcher.cpp PRE-CREATION
refactoring/utils.h PRE-CREATION
refactoring/utils.cpp PRE-CREATION
Diff: https://git.reviewboard.kde.org/r/124285/diff/
Testing
-------
Thanks,
Maciej Poleski
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20150726/b1276ad9/attachment.html>
More information about the KDevelop-devel
mailing list