D14838: Add ExplicitlyTyped flag to Declaration.

Michal Srb noreply at phabricator.kde.org
Tue Aug 14 15:33:44 BST 2018


michalsrb created this revision.
Herald added a project: KDevelop.
Herald added a subscriber: kdevelop-devel.
michalsrb requested review of this revision.

REVISION SUMMARY
  Explicitly typed declaration has the type writen as part of the declaration. The opposite, implicitly typed declaration, has the type deduced by the compiler.
  
  E.g. in C++ variable declarations are explicitly typed unless the "auto" keyword is used.
  
  The intended use is to display inline note with the deduced type next to all implicitly typed declarations.
  Another use, maybe a bit of a stretch; Suggestions on the right side of assignment to an explicitly typed declaration should take the declaration type into consideration, but assignments to implicitly typed declaration should ignore the currently deduced type, since it will change into whatever new type will be assigned into it.

TEST PLAN
  The plugins/clang/tests/files/variables.cpp was extended to test the basic C++ case.

REPOSITORY
  R32 KDevelop

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D14838

AFFECTED FILES
  kdevplatform/CMakeLists.txt
  kdevplatform/language/duchain/declaration.cpp
  kdevplatform/language/duchain/declaration.h
  kdevplatform/language/duchain/declarationdata.h
  kdevplatform/tests/json/jsondeclarationtests.h
  plugins/clang/duchain/builder.cpp
  plugins/clang/tests/files/variables.cpp

To: michalsrb
Cc: brauch, kdevelop-devel, antismap, iodelay, vbspam, geetamc, Pilzschaf, akshaydeo, surgenight, arrowd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20180814/9bc6bf35/attachment.html>


More information about the KDevelop-devel mailing list