Add ExplicitlyTyped flag to Declaration.

Authored by michalsrb on Aug 20 2018, 9:35 AM.

Description

Add ExplicitlyTyped flag to Declaration.

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.

Reviewers: brauch

Reviewed By: brauch

Subscribers: brauch, kdevelop-devel

Tags: KDevelop

Differential Revision: https://phabricator.kde.org/D14838

Details

Committed
brauchAug 20 2018, 9:35 AM
Reviewer
brauch
Differential Revision
D14838: Add ExplicitlyTyped flag to Declaration.
Parents
R32:524c189283b7: Cppcheck: use title capitalization for groupbox & tab labels
Branches
Unknown
Tags
Unknown