gnu.cfg: Add support for non-GNU _(string) macro. (#1726)

As can be read here:
https://www.gnu.org/software/gettext//manual/html_node/Mark-Keywords.html
The _(str) macro is typically defined for a project to abbreviate the
gettext(str) call. Although this is not part of GNU it would enhance the
analysis. Cppcheck often does not know what _() is. In daca@home it is
reported thousands of times as a function without configuration.
This commit is contained in:
Sebastian 2019-03-06 10:57:59 +01:00 committed by GitHub
parent ecba3db9cc
commit 1fe1fc7008
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -837,6 +837,9 @@
<not-bool/>
</arg>
</function>
<!-- _(string) is often defined as gettext(string) or string somewhere in projects. -->
<!-- See https://www.gnu.org/software/gettext//manual/html_node/Mark-Keywords.html -->
<define name="_(string)" value="string"/>
<!-- char * dgettext (const char *domainname, const char *msgid); -->
<function name="dgettext">
<noreturn>false</noreturn>