D18097: Show size and alignment information in tooltips for typedef or alias
Milian Wolff
noreply at phabricator.kde.org
Tue Jan 8 13:24:37 GMT 2019
mwolff created this revision.
mwolff added a reviewer: KDevelop.
Herald added a project: KDevelop.
Herald added a subscriber: kdevelop-devel.
mwolff requested review of this revision.
REVISION SUMMARY
This patch lets us view the size information when inspecting type
aliases. E.g. for C++ code like the following, we'll now see the
size (8) and alignment (also 8) when hovering Bar. Previously,
that was only shown when hovering Foo:
struct Foo { double m; };
using Bar = Foo;
Sadly, this patch by its own isn't yet enough for the more interesting
cases, namely aliases of explicit template instantiations, such as
using Ptr = std::shared_ptr<int>;
Here, we still don't show any size information, since we don't track
that information properly. In the builder, we only encounter std::shared_ptr
as a template, which doesn't have any size information yet. We would
need to build a declaration for the template instantiation of
std::shared_ptr, at which point we could ask libclang for the concrete size...
Still, this patch goes into the right direction already, I believe.
REPOSITORY
R32 KDevelop
BRANCH
master
REVISION DETAIL
https://phabricator.kde.org/D18097
AFFECTED FILES
kdevplatform/language/duchain/navigation/abstractdeclarationnavigationcontext.cpp
kdevplatform/language/duchain/navigation/abstractdeclarationnavigationcontext.h
To: mwolff, #kdevelop
Cc: kdevelop-devel, glebaccon, hase, antismap, iodelay, geetamc, Pilzschaf, akshaydeo, surgenight, arrowd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20190108/a8e5433f/attachment.html>
More information about the KDevelop-devel
mailing list