Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] Intended behaviour for hover on ICPPVariable with type=ICPPClassType?

struct MyType {}t{};

int main() {
auto foo = t;
auto bar = 1 + 4.2;
}
When I move my mouse cursor over foo I expect it to show “MyType foo” as it is done for other auto variable like bar that shows “double bar”. org.eclipse.cdt.internal.ui.text.c.hover.CSourceHover.ComputeSourceRunnable.runOnAST(ILanguage, IASTTranslationUnit) correctly deduces the binding for foo and even has type=MyType. However, the method checks after if it could be an implicit constructor call and replaces the binding with a CPPImplicitConstructor that later cannot be found with org.eclipse.cdt.internal.ui.text.c.hover.CSourceHover.ComputeSourceRunnable.findDefsOrDecls(IASTTranslationUnit, IBinding), so null is returned and no tooltip/hover is shown for the user. I tested it with the version from the master branch and a downloaded 9.3 and had it in both versions.

Is this the intended behavior? If not, I would create a bug and maybe try to fix it myself.

Back to the top