git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: xfuncname problems with C++

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Jan 2, 2015, 22:05 UTC
Message-ID
<20150102220556.GH29365@google.com>
In-Reply-To
<CAHd499DpyO6Csji8gp1E6HsrvtBa7QMKBah2xOewrWAfNgQUHg@mail.gmail.com>
Robert Dailey wrote:
> The 'void' does not start on the leftmost column, due to tabbing there
> can be any number of whitespace (the regex should account for this).

Ah, that explains it. The default C++ pattern assumes the 'void' starts at the leftmost column, so that the funcname header represents whatever top-level construct forms the context (e.g., "class foo {").

(Jump targets or access declarations) !^[ \t]*[A-Za-z_][A-Za-z_0-9]*:[[:space:]]*($|/[/*])

(functions/methods, variables, and compounds at top level) ^((::[[:space:]]*)?[A-Za-z_].*)$

Thanks, Jonathan

Previous: Robert DaileyNext: Jonathan Nieder
Message 5 of 7 in “xfuncname problems with C++”
  1. Robert DaileyJan 2, 2015
  2. Robert DaileyJan 2, 2015
  3. Johannes SixtJan 2, 2015
  4. Robert DaileyJan 2, 2015
  5. Jonathan NiederJan 2, 2015
  6. Jonathan NiederJan 2, 2015
  7. Johannes SixtJan 2, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.