Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Ctor name in a ctor call expression gets resolved to CPPClassType instead of CPPConstructor

Interesting since when you do an open definition on the constructor call it goes to the constructor properly. But, yes, I'd expect the highlighting to do the same.

From: Sergey Prigogin <eclipse.sprigogin@xxxxxxxxx>
Reply-To: "CDT General developers list." <cdt-dev@xxxxxxxxxxx>
Date: Monday, 29 October, 2012 2:22 PM
To: Markus Schorn <Markus.Schorn@xxxxxxxxxxxxx>
Cc: "CDT General developers list." <cdt-dev@xxxxxxxxxxx>
Subject: [cdt-dev] Ctor name in a ctor call _expression_ gets resolved to CPPClassType instead of CPPConstructor

I've noticed that a constructor name in a constructor call _expression_ gets resolved to CPPClassType instead of CPPConstructor. In the following code select "A" in "A(1)". Notice that "A" gets highlighted in the first and the fourth lines, but not in the second line (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=393084).

struct A {
  A(int x);
};

A a = A(1);

This may seem like a minor annoyance, but it causes bug 393068.
Is it the expected behavior? If so, how to get the constructor being called?
-sergey

Back to the top