Skip to content

ctags fails if a template parameter list has an expression that uses << or >> in it #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
focalintent opened this issue Feb 24, 2016 · 1 comment

Comments

@focalintent
Copy link
Contributor

Originally opened as arduino/arduino-builder#120

FastLED makes pretty extensive use of templates to do a lot of this work. Some of what's done with templates involves creating bitmasks from template parameters as parameters to other templates. Unfortunately, when the ctags parser sees "1<<X" as a template parameter, it eats itself.

This code demonstrates the problem:

template <int PORT_MASK> class controller { 

};

template <int LANES> class myClass { 
  public:
    void useController(controller<(1<<LANES)-1> & controller);    
};

void setup() { myctagstestfunc(); }
void myctagstestfunc() { }
void loop() {}

Because ctags stops parsing, the prototype for myctagstestfunc() is never created, and the dreaded 'myctagstestfun' was not declared in this scope error (as seen in #68)

@facchinm
Copy link
Member

facchinm commented Mar 2, 2016

Fixed by merging #7

@facchinm facchinm closed this as completed Mar 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants