Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1416,6 +1416,8 @@ F_name_function
Defaults to evaluation of option *F_name_function_template*.

F_name_generic
The generic name for a function.
Set with option **class_ctor* or *F_create_generic*.
Defaults to evaluation of option *F_name_generic_template*.

F_name_impl
Expand Down
2 changes: 2 additions & 0 deletions regression/do-test.py
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,8 @@ def __init__(self, name, yaml=None, cmdline=None, keywords=[]):
keywords=["err"]),
TestDesc("error-ast",
keywords=["err"]),
TestDesc("error-fmt",
keywords=["err"]),
TestDesc("error-generate",
keywords=["err"]),
]
Expand Down
11 changes: 0 additions & 11 deletions regression/input/error-ast.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -120,17 +120,6 @@ declarations:
####
#

- decl: typedef int64_t IndexType
fields:
# Unknown key for Typemap 'no_such_keyword'
no_such_keyword: True
f_c_module:
"--import--":
- LIB_IndexType

####
#

- decl: template<typename T, typename U>
struct twostruct

Expand Down
27 changes: 27 additions & 0 deletions regression/input/error-fmt.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
copyright:
- Copyright Shroud Project Developers. See LICENSE file for details.
-
- "SPDX-License-Identifier: (BSD-3-Clause)"
-

# Test error messages from fcfmt.py.

library: error
cxx_header: error.hpp

options:
debug: True
wrap_python: True

declarations:

####
#

- decl: typedef int64_t IndexType
fields:
# Unknown key for Typemap 'no_such_keyword'
no_such_keyword: True
f_c_module:
"--import--":
- LIB_IndexType
2 changes: 0 additions & 2 deletions regression/reference/cdesc/cdesc.json
Original file line number Diff line number Diff line change
Expand Up @@ -1281,7 +1281,6 @@
"C_name_api": "getData",
"F_name_api": "get_data",
"F_name_function": "get_data_int",
"F_name_generic": "get_data",
"F_name_impl": "get_data_int",
"c_arglist": [
"SHC_rv"
Expand Down Expand Up @@ -1445,7 +1444,6 @@
"C_name_api": "getData",
"F_name_api": "get_data",
"F_name_function": "get_data_double",
"F_name_generic": "get_data",
"F_name_impl": "get_data_double",
"c_arglist": [
"SHC_rv"
Expand Down
2 changes: 0 additions & 2 deletions regression/reference/debugfalse/tutorial.json
Original file line number Diff line number Diff line change
Expand Up @@ -3560,7 +3560,6 @@
"C_name_api": "TemplateReturn",
"F_name_api": "template_return",
"F_name_function": "template_return_int",
"F_name_generic": "template_return",
"F_name_impl": "template_return_int",
"c_arglist": [
"SHC_rv"
Expand Down Expand Up @@ -3723,7 +3722,6 @@
"C_name_api": "TemplateReturn",
"F_name_api": "template_return",
"F_name_function": "template_return_double",
"F_name_generic": "template_return",
"F_name_impl": "template_return_double",
"c_arglist": [
"SHC_rv"
Expand Down
17 changes: 5 additions & 12 deletions regression/reference/error-ast/output
Original file line number Diff line number Diff line change
Expand Up @@ -108,28 +108,21 @@ Error in 'decl' field
^
Expected EOF, found ID
--------------------
Node: IndexType
Typemap IndexType: Unknown key 'no_such_keyword'
--------------------
Node: IndexType
typedef int64_t IndexType
Deprecated: Typemap IndexType: Replacing deprecated field 'f_c_module' with 'i_module'
--------------------
Node: process_twostruct
line 137
line 126
Templated function requires the 'cxx_template' field
--------------------
Node: process_twostruct
line 137
line 126
field f_arg_decl is deprecated, changed to f_dummy_decl
--------------------
Node: process_twostruct
line 145
line 134
'cxx_template' field only used with a templated function
--------------------
Node: getConstCharPtrAsCopyArg
line 153
line 142
format F_string_result_as_arg is deprecated, changed to option.F_result_as_arg
Instead add attribute +funcarg(name)+deref(copy) to decl.
Option F_result_as_arg is the default name when not specified in +funcarg.
Too many warnings: 30
Too many warnings: 29
123 changes: 123 additions & 0 deletions regression/reference/error-fmt/error-fmt.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
{
"<NOTICE>": "This file is generated by Shroud nowrite-version and is useful for debugging.",
"library": {
"copyright": [
"Copyright Shroud Project Developers. See LICENSE file for details.",
"",
"SPDX-License-Identifier: (BSD-3-Clause)",
""
],
"cxx_header": [
"error.hpp"
],
"language": "cxx",
"scope_file": [
"error"
],
"typedefs": [
{
"<TYPEDEF>": "IndexType ****************************************",
"ast": {
"declarator": {
"name": "IndexType",
"typemap_name": "int64_t"
},
"specifier": [
"int64_t"
],
"storage": [
"typedef"
],
"typemap_name": "IndexType"
},
"f_kind": "C_INT64_T",
"f_module": {
"iso_c_binding": [
"C_INT64_T"
]
},
"name": "IndexType",
"options": {},
"user_fields": {
"f_c_module": {
"--import--": [
"LIB_IndexType"
]
},
"no_such_keyword": true
},
"wrap": {
"c": true,
"fortran": true,
"python": true
},
"zz_bind": {
"c": {
"IndexType": {}
},
"f": {
"IndexType": {}
},
"share": {
"IndexType": {}
}
},
"zz_fmtdict": {
"C_name_api": "IndexType",
"C_name_typedef": "ERR_IndexType",
"F_name_api": "index_type",
"F_name_typedef": "index_type",
"cxx_type": "IndexType",
"typedef_name": "IndexType"
}
}
],
"wrap": {
"c": true,
"fortran": true,
"python": true
}
},
"types": {
"IndexType": {
"LUA_pop": "lua_tointeger({LUA_state_var}, {LUA_index})",
"LUA_push": "lua_pushinteger({LUA_state_var}, {push_arg})",
"LUA_type": "LUA_TNUMBER",
"PYN_typenum": "NPY_INT64",
"PY_ctor": "PyInt_FromLong({ctor_expr})",
"PY_format": "L",
"PY_get": "PyInt_AsLong({py_var})",
"base": "integer",
"c_header": [
"<stdint.h>"
],
"c_type": "ERR_IndexType",
"cfi_type": "CFI_type_int64_t",
"cxx_header": [
"<cstdint>"
],
"cxx_type": "IndexType",
"f_cast": "int({f_var}, index_type)",
"f_kind": "index_type",
"f_module": {
"error_mod": [
"index_type"
]
},
"f_module_name": "error_mod",
"f_type": "integer(index_type)",
"flat_name": "int64_t",
"i_module": {
"--import--": [
"LIB_IndexType"
]
},
"sgroup": "native",
"sh_type": "SH_TYPE_INT64_T",
"typedef": "int64_t",
"wrap_header": [
"wraperror.h"
]
}
}
}
9 changes: 9 additions & 0 deletions regression/reference/error-fmt/error-fmt.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Read yaml error-fmt.yaml
Close wraperror.h
typedef IndexType
Close wrapferror.f
Close utilerror.cpp
Close typeserror.h
Close pyerrormodule.cpp
Close pyerrormodule.hpp
Close setup.py
17 changes: 17 additions & 0 deletions regression/reference/error-fmt/output
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

----------------------------------------
Phase: FillFormat typedef
----------------------------------------
Node: IndexType
Typemap IndexType: Unknown key 'no_such_keyword'
--------------------
Node: IndexType
typedef int64_t IndexType
Deprecated: Typemap IndexType: Replacing deprecated field 'f_c_module' with 'i_module'
Wrote wraperror.h
Wrote wrapferror.f
Wrote utilerror.cpp
Wrote typeserror.h
Wrote pyerrormodule.cpp
Wrote pyerrormodule.hpp
Wrote setup.py
Loading