libclang Questions
5
I am using Linux Mint and I installed clang_complete using the makefile from Clang Complete, but it does not work. When I open a cpp file, there is an error message:
Loading libclang failed, comple...
Ferrari asked 29/3, 2014 at 16:54
2
Solved
I have an instance of CXCursor of kind CXCursor_CXXMethod. I want to find out if the function is const or volatile, for example:
class Foo {
public:
void bar() const;
void baz() volatile;
void ...
4
Solved
2
I use ubuntu 20.04.2. I had some problems with rStudio so I unistalled completelly from my computer. I already have installed r, but now I want to install rStudio but when I try to I get that 'libc...
4
Solved
While running doxygen I get the following error:
doxygen: error while loading shared libraries: libclang.so.6: cannot open shared object file: No such file or directory
I have installed doxygen ...
4
How can I get a function's signature (or at least the entire definition?) as a string using Clang/Libclang, assuming I have its CXCursor or so?
I think that the definition may be somehow obtainabl...
1
I am toying with the Python bindings of libclang. Currently, I am trying to perform some very simple tasks, such as finding all the headers included in a C++ file. The code I use is as follows:
fro...
4
How can I get the value of a primitive literal using libclang?
For example, if I have a CXCursor of cursor kind CXCursor_IntegerLiteral, how can I extract the literal value.
UPDATE:
I've run i...
2
Short description: using libclang to autocomplete code does not work with python that comes bundled with Sublime Text 3.
Details: A small verifiable example is in the repo on Github
In essence, t...
Famished asked 12/6, 2016 at 13:6
3
Solved
Suppose I have an enum definition, e.g.:
// myenum.h
enum MyEnum {
First = 1,
Second,
Third,
TwoAgain = Second
};
I would like to programmatically generate a map from any given enum definiti...
1
I use libclang to parse source file and get reference to some type as CXType, say it is "const std::__1::basic_string<char>" (as reported by clang_getTypeSpelling). How can I get reference to...
Bladderwort asked 21/7, 2017 at 13:47
1
Following this question and Andrew's suggestions, I am trying to have liblang add the compiler system include paths (in Windows) in order for my Python code
import clang.cindex
def parse_decl(nod...
0
Background
Please see https://github.com/tingraldi/SwiftScripting/issues/18 for a full discussion of this problem.
The link above has a long Python script that translates an Objective-C File.h head...
Auricular asked 4/10, 2018 at 6:29
1
To get started with libclang, I build a very simple program that tries to load a very simple source file. It fails with 'stddef.h' file not found.
Here is the program using libclang:
#include &l...
2
Solved
I would like to get started with using libclang with Python. I am trying to get a sample code (http://www.altdevblogaday.com/2014/03/05/implementing-a-code-generator-with-libclang/) to work on Wind...
0
I'm trying to explore libclang (on Windows) to do "stuff*" based on parsing the AST. I find several examples, I'm unable to get anything to work.
When I try to run this
index = clang.cindex.Inde...
Colombia asked 3/4, 2018 at 19:30
2
Solved
I am learning to parse C++ files using Python + libclang with the help of this very informative (but slightly outdated) tutorial by Eli Bendersky.
My objective is to parse C++ files and identify t...
2
Solved
I am writing a utility which is supposed to parse C++ (and C) header files, extract the structs, enums, fields etc. and generate code in other languages based on the extracted information. I decide...
1
I have a software that is able to generate C code that I would like to use in a just-in-time compilation context. From what I understand, LLVM/Clang is the way to go and, for maintainability of the...
Bearden asked 27/8, 2015 at 16:27
1
I am trying to find (line and column position) all the references of a specific function declaration when parsing a C++ source file via libclang in Python.
For example:
#include <iostream>
...
1
Solved
I have some code (taken and adapted from here and here), which uses libclang to parse C++ sourcefiles in Python (Widnows) and get all of its declaration statements, as seen here:
import clang.cind...
2
Solved
libclang defines only 5 types of tokens:
CXToken_Punctuation
CXToken_Keyword
CXToken_Identifier
CXToken_Literal
CXToken_Comment
Is it possible to get a more detailed information about tokens? F...
1
Solved
After some research and a few questions, I ended up exploring libclang library in order to parse C++ source files in Python.
Given a C++ source
int fac(int n) {
return (n>1) ? n∗fac(n−1) : 1...
1
Solved
3
Solved
I've recently started using libclang to parse C files. The problem I'm having is that apparently, libclang initiates the preprocessor before generating AST. I would like to prohibit the preprocesso...
Cornea asked 14/12, 2012 at 15:22
1 Next >
© 2022 - 2025 — McMap. All rights reserved.