Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

genbindings doesn't work with clang-19 #116

Open
arnetheduck opened this issue Jan 3, 2025 · 0 comments · May be fixed by #118
Open

genbindings doesn't work with clang-19 #116

arnetheduck opened this issue Jan 3, 2025 · 0 comments · May be fixed by #118
Labels

Comments

@arnetheduck
Copy link
Contributor

Just tried the bindings generator on a more recent distro than bookworm, where clang 19 is available - the json output has changed and the way constructor types are specified has changed as well:

			{
				"id": "0x564dc729da10",
				"inner": [
					{
						"id": "0x564dc729d8f0",
						"kind": "ParmVarDecl",
						"loc": {
							"col": 26,
							"offset": 13690,
							"tokLen": 4
						},
						"name": "type",
						"range": {
							"begin": {
								"col": 21,
								"offset": 13685,
								"tokLen": 4
							},
							"end": {
								"col": 26,
								"offset": 13690,
								"tokLen": 4
							}
						},
						"type": {
							"desugaredQualType": "QEvent::Type",
							"qualType": "Type"
						}
					}
				],
				"kind": "CXXConstructorDecl",
				"loc": {
					"col": 14,
					"line": 297,
					"offset": 13678,
					"tokLen": 6
				},
				"mangledName": "_ZN6QEventC1ENS_4TypeE",
				"name": "QEvent",
				"range": {
					"begin": {
						"col": 5,
						"offset": 13669,
						"tokLen": 8
					},
					"end": {
						"col": 30,
						"offset": 13694,
						"tokLen": 1
					}
				},
				"type": {
					"qualType": "void (Type)"
				}
			},

This is the QEvent constructor taking a QEvent::Type - in clang-14, the constructor type is void (QEvent::Type) while in clang-19 it's void (Type) - the consequence is that Type is no longer found as an "enum" leading to lots of downstream problems.

To support clang-19, one would have to dig into inner and fetch the type from desugaredQualType instead of parsing the prototype - opening this issue mostly to document the problem, even if this is not a supported way of running the generator today.

rcalixte added a commit to rcalixte/miqt that referenced this issue Jan 3, 2025
@mappu mappu added the wishlist label Jan 4, 2025
rcalixte added a commit to rcalixte/miqt that referenced this issue Jan 4, 2025
rcalixte added a commit to rcalixte/miqt that referenced this issue Jan 4, 2025
rcalixte added a commit to rcalixte/miqt that referenced this issue Jan 4, 2025
rcalixte added a commit to rcalixte/miqt that referenced this issue Jan 4, 2025
rcalixte added a commit to rcalixte/miqt that referenced this issue Jan 11, 2025
rcalixte added a commit to rcalixte/miqt that referenced this issue Jan 11, 2025
rcalixte added a commit to rcalixte/miqt that referenced this issue Jan 11, 2025
rcalixte added a commit to rcalixte/miqt that referenced this issue Jan 11, 2025
rcalixte added a commit to rcalixte/miqt that referenced this issue Jan 11, 2025
rcalixte added a commit to rcalixte/miqt that referenced this issue Jan 20, 2025
rcalixte added a commit to rcalixte/miqt that referenced this issue Jan 20, 2025
rcalixte added a commit to rcalixte/miqt that referenced this issue Jan 20, 2025
rcalixte added a commit to rcalixte/miqt that referenced this issue Jan 20, 2025
rcalixte added a commit to rcalixte/miqt that referenced this issue Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants