Merge pull request #2197 from swig-fortran/rename-warn

Print rename warnings except anonymous template methods
This commit is contained in:
Olly Betts 2022-02-10 16:15:10 +13:00 • committed by GitHub
commit 89a0a3c5f7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 54 additions and 21 deletions

View file

@ -2,9 +2,9 @@
#define CSHARP_CSHARPKW_SWG_
/* Warnings for C# keywords */
#define CSHARPKW(x) %keywordwarn("'" `x` "' is a C# keyword, renaming to '" `x` "_'",rename="%s_") `x`
#define CSHARPKW(x) %keywordwarn("'" `x` "' is a C# keyword",rename="%s_") `x`
#define CSHARPCLASSKW(x) %keywordwarn("'" `x` "' is a special method name used in the C# wrapper classes, class renamed to '" `x` "_'",%$isclass,rename="%s_") `x`
#define CSHARPCLASSKW(x) %keywordwarn("'" `x` "' is a special method name used in the C# wrapper classes",%$isclass,rename="%s_") `x`
/*
from

View file

@ -2,7 +2,7 @@
#define D_DKW_SWG_
/* Warnings for D keywords */
#define DKEYWORD(x) %keywordwarn("'" `x` "' is a D keyword, renaming to '_" `x` "'",rename="_%s") `x`
#define DKEYWORD(x) %keywordwarn("'" `x` "' is a D keyword",rename="_%s") `x`
// Source: http://www.digitalmars.com/d/{1.0,2.0}/lex.html and
DKEYWORD(Error);

View file

@ -1,6 +1,6 @@
/* Rename keywords. */
#define GOKW(x) %keywordwarn("'" `x` "' is a Go keyword, renaming to 'X"`x`"'",rename="X%s") `x`
#define GOKW(x) %keywordwarn("'" `x` "' is a Go keyword",rename="X%s") `x`
#define GOBN(x) %builtinwarn("'" `x` "' conflicts with a built-in name in Go") "::"`x`
GOKW(break);

View file

@ -2,7 +2,7 @@
#define JAVA_JAVAKW_SWG_
/* Warnings for Java keywords */
#define JAVAKW(x) %keywordwarn("'" `x` "' is a java keyword, renaming to '_"`x`"'",rename="_%s") `x`
#define JAVAKW(x) %keywordwarn("'" `x` "' is a java keyword",rename="_%s") `x`
/*
from

View file

@ -2,7 +2,7 @@
Warnings for Lua keywords, built-in names and bad names.
*/
#define LUAKW(x) %keywordwarn("'" `x` "' is a Lua keyword, renaming to 'c_" `x` "'", rename="c_%s") `x`
#define LUAKW(x) %keywordwarn("'" `x` "' is a Lua keyword", rename="c_%s") `x`
#define LUABN(x) %namewarn(%warningmsg(SWIGWARN_PARSE_BUILTIN_NAME, "'" `x` "' conflicts with a basic function in Lua"), %$not %$ismember) `x`
/*

View file

@ -3,13 +3,13 @@
* ----------------------------------------------------------------------------- */
/* Keyword (case insensitive) */
#define PHPKW(x) %keywordwarn("'" `x` "' is a PHP keyword, renaming to 'c_" `x` "'",sourcefmt="%(lower)s",rename="c_%s") `x`
#define PHPKW(x) %keywordwarn("'" `x` "' is a PHP keyword",sourcefmt="%(lower)s",rename="c_%s") `x`
/* Keyword, except ok as a function */
#define PHPKW_ok_as_function(x) %keywordwarn("'" `x` "' is a PHP keyword, renaming to 'c_" `x` "'",%$not %$isfunction,sourcefmt="%(lower)s",rename="c_%s") `x`
/* Class (case insensitive) */
#define PHPCN(x) %keywordwarn("'" `x` "' is a PHP reserved class name, renaming to 'c_" `x` "'",%$isclass,sourcefmt="%(lower)s",rename="c_%s") `x`
#define PHPCN(x) %keywordwarn("'" `x` "' is a PHP reserved class name",%$isclass,sourcefmt="%(lower)s",rename="c_%s") `x`
/* Constant (case insensitive) */
#define PHPBN1a(x) %namewarn(%warningmsg(SWIGWARN_PARSE_BUILTIN_NAME, "enum conflicts with a built-in constant '"`x`"' in PHP"),%$isenumitem,sourcefmt="%(lower)s") `x`
@ -25,7 +25,7 @@
PHPBN2a(X); PHPBN2b(X)
%enddef
#define PHPFN(x) %keywordwarn("'" `x` "' is a PHP built-in function, renaming to 'c_" `x` "'",sourcefmt="%(lower)s",%$isfunction,%$not %$ismember,rename="c_%s") `x`
#define PHPFN(x) %keywordwarn("'" `x` "' is a PHP built-in function",sourcefmt="%(lower)s",%$isfunction,%$not %$ismember,rename="c_%s") `x`
/* From: http://php.net/manual/en/reserved.keywords.php
* "You cannot use any of the following words as constants, class names,

View file

@ -2,7 +2,7 @@
Warnings for Python keywords, built-in names and bad names.
*/
#define PYTHONKW(x) %keywordwarn("'" `x` "' is a python keyword, renaming to '_" `x` "'", rename="_%s") `x`
#define PYTHONKW(x) %keywordwarn("'" `x` "' is a python keyword", rename="_%s") `x`
#define PYTHONBN(x) %builtinwarn("'" `x` "' conflicts with a built-in name in python") `x`

View file

@ -2,8 +2,8 @@
Warnings for R keywords, built-in names and bad names.
*/
#define RKW(x) %keywordwarn("'" `x` "' is a R keyword, renaming to '_" `x`"'", rename="_%s") `x`
#define RSWIGKW(x) %keywordwarn("'" `x` "' is a SWIG R reserved parameter name, renaming to '_" `x`"'", rename="_%s") `x`
#define RKW(x) %keywordwarn("'" `x` "' is a R keyword", rename="_%s") `x`
#define RSWIGKW(x) %keywordwarn("'" `x` "' is a SWIG R reserved parameter name", rename="_%s") `x`
/*
Warnings for R reserved words taken from

View file

@ -2,7 +2,7 @@
#define RUBY_RUBYKW_SWG_
/* Warnings for Ruby keywords */
#define RUBYKW(x) %keywordwarn("'" `x` "' is a ruby keyword, renaming to 'C_" `x` "'",rename="C_%s",fullname=1) `x`
#define RUBYKW(x) %keywordwarn("'" `x` "' is a ruby keyword",rename="C_%s",fullname=1) `x`
/*