<p>Tricky preprocessor :)  The thing is that it would be perfectly valid to have <code>struct BLEH foo</code> in your example, esp. as it expands to nothing.  Meh.<br>
Maybe you could try current Universal-CTags that has a totally new C and C++ parser, it would be interesting to see what the stock behavior is here (it might be better or worse I guess).</p>
<p>A workaround is to use <em>ignore.tags</em> and list your macros there.  E.g. mine contains a lot of GLib's macros and a few others:</p>
<pre><code>G_GNUC_DEPRECATED_FOR+
G_GNUC_PRINTF+
G_GNUC_SCANF+
G_GNUC_FORMAT+
G_GNUC_*
G_DEPRECATED
G_DEPRECATED_FOR+
G_UNAVAILABLE+
G_DEFINE_TYPE+
G_DEFINE_TYPE_EXTENDED+
G_DEFINE_TYPE_WITH_CODE+
G_DEFINE_BOXED_TYPE+
GLIB_AVAILABLE_*
GIO_AVAILABLE_*
GDK_AVAILABLE_*
GTK_AVAILABLE_*
GLIB_DEPRECATED_IN_2_50_FOR+
GLIB_DEPRECATED_IN_2_48_FOR+
GLIB_DEPRECATED_IN_2_46_FOR+
GLIB_DEPRECATED_IN_2_44_FOR+
GLIB_DEPRECATED_IN_2_42_FOR+
GLIB_DEPRECATED_IN_2_40_FOR+
GLIB_DEPRECATED_IN_2_38_FOR+
GLIB_DEPRECATED_IN_2_36_FOR+
GLIB_DEPRECATED_IN_2_34_FOR+
GLIB_DEPRECATED_IN_2_32_FOR+
GLIB_DEPRECATED_IN_2_30_FOR+
GLIB_DEPRECATED_IN_2_28_FOR+
GLIB_DEPRECATED_IN_2_26_FOR+
GLIB_DEPRECATED_IN_*
GLIB_EXTERN
GLIB_VAR
__STL_NOTHROW
__THROW
GIT_EXTERN=extern
cairo_public
GEANY_DEPRECATED
GEANY_PRIVATE_FIELD
GEANY_DEPRECATED_FOR+
</code></pre>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/geany/geany/issues/1654#issuecomment-338490889">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABDrJwR7JDBPU6UcJ2Nnu6ViIJLdiOVRks5su29ogaJpZM4QB8FO">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJ0K5dH5ouf-C7i7l6eksOQDzIEAAks5su29ogaJpZM4QB8FO.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/geany/geany/issues/1654#issuecomment-338490889"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/geany/geany","title":"geany/geany","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/geany/geany"}},"updates":{"snippets":[{"icon":"PERSON","message":"@b4n in #1654: Tricky preprocessor :)  The thing is that it would be perfectly valid to have `struct BLEH foo` in your example, esp. as it expands to nothing.  Meh.\r\nMaybe you could try current Universal-CTags that has a totally new C and C++ parser, it would be interesting to see what the stock behavior is here (it might be better or worse I guess).\r\n\r\nA workaround is to use *ignore.tags* and list your macros there.  E.g. mine contains a lot of GLib's macros and a few others:\r\n```\r\nG_GNUC_DEPRECATED_FOR+\r\nG_GNUC_PRINTF+\r\nG_GNUC_SCANF+\r\nG_GNUC_FORMAT+\r\nG_GNUC_*\r\nG_DEPRECATED\r\nG_DEPRECATED_FOR+\r\nG_UNAVAILABLE+\r\nG_DEFINE_TYPE+\r\nG_DEFINE_TYPE_EXTENDED+\r\nG_DEFINE_TYPE_WITH_CODE+\r\nG_DEFINE_BOXED_TYPE+\r\nGLIB_AVAILABLE_*\r\nGIO_AVAILABLE_*\r\nGDK_AVAILABLE_*\r\nGTK_AVAILABLE_*\r\nGLIB_DEPRECATED_IN_2_50_FOR+\r\nGLIB_DEPRECATED_IN_2_48_FOR+\r\nGLIB_DEPRECATED_IN_2_46_FOR+\r\nGLIB_DEPRECATED_IN_2_44_FOR+\r\nGLIB_DEPRECATED_IN_2_42_FOR+\r\nGLIB_DEPRECATED_IN_2_40_FOR+\r\nGLIB_DEPRECATED_IN_2_38_FOR+\r\nGLIB_DEPRECATED_IN_2_36_FOR+\r\nGLIB_DEPRECATED_IN_2_34_FOR+\r\nGLIB_DEPRECATED_IN_2_32_FOR+\r\nGLIB_DEPRECATED_IN_2_30_FOR+\r\nGLIB_DEPRECATED_IN_2_28_FOR+\r\nGLIB_DEPRECATED_IN_2_26_FOR+\r\nGLIB_DEPRECATED_IN_*\r\nGLIB_EXTERN\r\nGLIB_VAR\r\n__STL_NOTHROW\r\n__THROW\r\nGIT_EXTERN=extern\r\ncairo_public\r\nGEANY_DEPRECATED\r\nGEANY_PRIVATE_FIELD\r\nGEANY_DEPRECATED_FOR+\r\n```"}],"action":{"name":"View Issue","url":"https://github.com/geany/geany/issues/1654#issuecomment-338490889"}}}</script>