Subject: bug#24038: etags missing tag for static prototypes in header file

From: Eli Zaretskii <[email-masked]>
Date: Thu, 21 Jul 2016 17:51:17 +0300

> Date: Wed, 20 Jul 2016 21:39:08 +0800 (GMT+08:00)
> From: 312 <[email-masked]>
> 
> I found etags fails to create some tags for static method in header file. Is this a known issue.
> 
> for example:
> 
> etags NestedNameSpecifier.h
> 
> lines between 100 and 162 is ignored, those are all static prototype.
> Don’t know why this happened.

Thank you for your report.

What is ignored are not static methods, but any method that is not
in-line, i.e. for which you have only the declaration
(a.k.a. "prototype") in the header file, without the implementation.
For example, this method is also missing:

  /// \brief Determine what kind of nested name specifier is stored.
  SpecifierKind getKind() const;

although it isn't declared 'static'.

The reason is that etags by default doesn't tag declarations, on the
assumption that the user wants to see the definitions of the methods,
not their prototypes.  If you want declarations included, you need to
invoke etags with the --declarations option.  (That will also tag
global variables, so if you don't want that, use --no-globals as
well.)

IOW, this is not a bug, but the expected behavior.