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

"const" unseen in LValueReference with libclang-16. #13

Open
ttamttam opened this issue Nov 3, 2024 · 1 comment
Open

"const" unseen in LValueReference with libclang-16. #13

ttamttam opened this issue Nov 3, 2024 · 1 comment

Comments

@ttamttam
Copy link

ttamttam commented Nov 3, 2024

Hello.

I managed to install clangml with libclang-16 on a bookworm debian (WSL) with ocaml 5.1.1:

  • adjusted locally conf-libclang (upper bound -> 16);
  • compiled from a clone of the github dev repo.
    • removed (ocaml-migrate-parsetree (>= 2.2.0)) from dune-project,
    • bootstrapped,
    • and then locally pinned the directory to let opam compile and install the library.

Compared to libclang-11, "const" are not seen by the parser in LValueReferences: do you know if something changed between those version that would explain this behaviour?

Example: in the following code, the two "const" are missed.

	class AFM_API tfm_acquisition_PE_specification : public acquisition_specification
	{
	public:
		struct implementation;
		tfm_acquisition_PE_specification(const tfm_acquisition_PE_specification& other);
		tfm_acquisition_PE_specification& operator=(const tfm_acquisition_PE_specification& other);
		~tfm_acquisition_PE_specification();

If i dump the AST, I obtain something like that:

 desc =
                                                LValueReference
                                                ({ cxtype = <opaque>;
                                                   type_loc = <opaque>;
                                                   const = false;
                                                   volatile = false;
                                                   restrict = false;
                                                   desc =
                                                   Record
                                                   ({ nested_name_specifier =
                                                      None;
                                                      name =
                                                      IdentifierName
                                                      ("tfm_acquisition_PE_specification");
                                                      template_arguments = []
                                                      })
                                                   })
                                                };

while I have const = true with libclang-11.

I hope my question is understandable.

@ttamttam
Copy link
Author

ttamttam commented Nov 3, 2024

Solved after I switched to libclang-15.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant