[prev in list] [next in list] [prev in thread] [next in thread]
List: kdevelop-bugs
Subject: [Bug 183614] Code completition inside template specialization not
From: David Nolden <david.nolden.kde () art-master ! de>
Date: 2009-12-05 12:33:49
Message-ID: 20091205123349.0B2DA28A3B () immanuel ! kde ! org
[Download RAW message or body]
https://bugs.kde.org/show_bug.cgi?id=183614
David Nolden <david.nolden.kde@art-master.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |david.nolden.kde@art-master
| |.de
--- Comment #3 from David Nolden <david nolden kde art-master de> 2009-12-05 13:33:46 ---
@Olivier.jg:
It won't need such a high amount of work to get this basically working.
What seems to work: The context of the class "Foo" is correctly imported into
the function-context, so the function and the class have _some_ connection.
What doesn't work here is the correct resolution of the "this" expression,
which happens at expressionvisitor.cpp:667. It indeed relies on the definition
-> declaration mapping there.
However the definition/declaration mapping is _not_ unique, which means that
multiple definitions can be mapped to one declaration. There's a semantic
problem here though, is the 'definition' mentioned in this case is _not really_
a definition, but rather a _specialization_ declaration, so that
definition/declaration mapping probably shouldn't even be used here.
The proper solution here would be:
A) Make sure that the specialization and the declaration are connected through
TemplateDeclaration::specializations() and
TemplateDeclarations::specializedFrom(), as I didn't care about explicit
function specializations until now.
B) At expressionvisitor.cpp:673, when no function-declaration was retrieved
through definition/declaration mapping, try retrieving the declaration through
"dynamic_cast<TemplateDeclaration*>(..)->specializedFrom().data()".
Should you try to fix this, a unit-test in test_expressionparser.cpp to verify
these things would be great.
--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
KDevelop-bugs mailing list
KDevelop-bugs@kdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-bugs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic