Author Topic: Call tip and autocomplete for auto type  (Read 4095 times)

Offline NON

  • Single posting newcomer
  • *
  • Posts: 2
Call tip and autocomplete for auto type
« on: May 28, 2014, 01:03:27 pm »
I'm using Code::Blocks 13.12, and it seems call tip and autocomplete is not working for variables declared with C++11 auto type?

Example with explicit type:
Code: [Select]
MyType* thing = new MyType;
thing-> //after typing "->", a list of call tips pops up (usually)

Example with auto type:
Code: [Select]
auto thing = new MyType;
thing-> //no call tips pops up after typing "->"

Are there any plans to implement call tip and autocomplete for auto types? Or is there some plugin or setting which allow this alrady?

From what I can tell, several IDEs already support this (Visual Studio 201x, Eclipse, Qt Creator 2.7.0, KDevelop 4.5.1). See this question on stackoverflow:
http://stackoverflow.com/questions/19625115/which-ides-and-text-editors-can-deduce-type-of-variables-declared-using-auto-key

I think the auto feature is a very useful addition for several reasons, and I've already replaced a bunch of explicit type names with auto in my project. But it's a pity that the call tips don't show up there anymore.

Code::Blocks is my favorite IDE and I don't want to change to any of the other's I mentioned above. If there is some indication that call tips and autocomplete for auto types is going to be fixed soon-ish, I'll just hold out without call tips until then :)
« Last Edit: May 28, 2014, 01:06:21 pm by NON »

Offline NON

  • Single posting newcomer
  • *
  • Posts: 2
Re: Call tip and autocomplete for auto type
« Reply #1 on: July 28, 2014, 06:18:50 pm »
No?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12625
    • Travis build status
Re: Call tip and autocomplete for auto type
« Reply #2 on: July 28, 2014, 09:32:10 pm »
I don't think there are plans to implement auto in our parser anytime soon. Probably you can try Alpha's clang based code completion plugin...
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 2730
Re: Call tip and autocomplete for auto type
« Reply #3 on: July 28, 2014, 11:36:48 pm »
I don't think there are plans to implement auto in our parser anytime soon. Probably you can try Alpha's clang based code completion plugin...
As oBFusCATed says the closest is the clang based code completion (http://forums.codeblocks.org/index.php/topic,18785.0.html)... writing a c++ parser is close to cooling the hell, the c::b team is really happy for any improvement patch ;)

greetings

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: Call tip and autocomplete for auto type
« Reply #4 on: July 29, 2014, 03:53:36 am »
The Clang plugin does handle auto just fine.  (However, note that this plugin is not production ready.  It can lag, freeze, and crash if you are unlucky.  I consider it functional, but use it with caution.)
I have not had time to do development on this plugin recently, but hopefully I will be able to start up again soon.  Clang has a lot of potential.