Home » Community » U++ community news and announcements » 2022.3rc5
Re: 2022.3rc5 [message #59576 is a reply to message #59568] |
Wed, 08 February 2023 17:55 |
Oblivion
Messages: 1094 Registered: August 2007
|
Senior Contributor |
|
|
Hello Mirek,
I've stripped the code, and wrote the below test:
struct Clang {
CXIndex index = nullptr;
CXTranslationUnit tu = nullptr;
Clang()
{
MemoryIgnoreLeaksBlock __;
index = clang_createIndex(0, 0);
}
void Parse()
{
Vector<const char*> args = {
"-std=c++14",
"-xc++",
"-I/usr/include/llvm",
"-I/usr/include/c++",
"-I/usr/include/c++/12.2.1",
"-I/usr/include/c++/12.2.1/x86_64-pc-linux-gnu",
"-I/usr/include/c++/12.2.1/backward",
"-I/usr/lib/clang/15.0.7/include",
"-I/usr/include"
"-I/usr/local/include",
};
tu = clang_parseTranslationUnit(
index,
"/home/user/test.cpp",
args,
args.GetCount(),
nullptr,
0,
CXTranslationUnit_None
);
}
~Clang()
{
MemoryIgnoreLeaksBlock __;
if(tu) clang_disposeTranslationUnit(tu);
clang_disposeIndex(index);
}
CONSOLE_APP_MAIN
{
StdLogSetup(LOG_COUT);
Clang().Parse();
}
This works. clang_parseTranslationUnit() returns a translation unit handle every single time. (And the handle can be successfully used to traverse the AST.
However, the same code applied to TheIDE's Clang::Parse() method, with hard coded paths as is above,
clang_parseTranslationUnit() still fails to return a translation unit every single time.
I've tried both dynamic loading and static linking (LCLANG), tested both the above code & TheIDe on Linux 6.1.9/Clang 14 & 15
At this point I am almost sure that this is not a user-side problem, because I have installed vanilla ArchLinux on both a real hardware and on a VM (on windows machine), yet I get the same failure... Could this be a process env issue? Any ideas?
Best regards,
Oblivion
Github page: https://github.com/ismail-yilmaz
upp-components: https://github.com/ismail-yilmaz/upp-components
Bobcat the terminal emulator: https://github.com/ismail-yilmaz/Bobcat
[Updated on: Wed, 08 February 2023 17:57] Report message to a moderator
|
|
|
|
|
2022.3rc5
By: mirek on Fri, 23 December 2022 09:52
|
|
|
Re: 2022.3rc4
By: Tom1 on Fri, 23 December 2022 11:51
|
|
|
Re: 2022.3rc4
By: Klugier on Fri, 23 December 2022 13:45
|
|
|
Re: 2022.3rc4
By: Tom1 on Fri, 23 December 2022 14:37
|
|
|
Re: 2022.3rc4
|
|
|
Re: 2022.3rc4
|
|
|
Re: 2022.3rc4
By: Oblivion on Sat, 24 December 2022 12:25
|
|
|
Re: 2022.3rc4
By: Klugier on Sat, 24 December 2022 13:13
|
|
|
Re: 2022.3rc4
By: mirek on Sat, 24 December 2022 15:23
|
|
|
Re: 2022.3rc5
|
|
|
Re: 2022.3rc5
|
|
|
Re: 2022.3rc5
By: Klugier on Mon, 26 December 2022 22:44
|
|
|
Re: 2022.3rc5
By: mirek on Tue, 27 December 2022 12:23
|
|
|
Re: 2022.3rc5
By: Klugier on Tue, 27 December 2022 13:48
|
|
|
Re: 2022.3rc5
By: Oblivion on Mon, 26 December 2022 23:49
|
|
|
Re: 2022.3rc5
By: mirek on Tue, 27 December 2022 09:49
|
|
|
Re: 2022.3rc5
By: mirek on Tue, 27 December 2022 09:51
|
|
|
Re: 2022.3rc5
By: Oblivion on Sun, 05 February 2023 16:36
|
|
|
Re: 2022.3rc5
By: mirek on Sun, 05 February 2023 17:00
|
|
|
Re: 2022.3rc5
By: Oblivion on Mon, 06 February 2023 23:34
|
|
|
Re: 2022.3rc5
By: mirek on Tue, 07 February 2023 00:16
|
|
|
Re: 2022.3rc5
By: Oblivion on Wed, 08 February 2023 17:55
|
|
|
Re: 2022.3rc5
By: mirek on Wed, 08 February 2023 20:01
|
|
|
Re: 2022.3rc5
By: Oblivion on Wed, 08 February 2023 20:33
|
|
|
Re: 2022.3rc5
By: Oblivion on Thu, 09 February 2023 17:41
|
|
|
Re: 2022.3rc5
By: mirek on Thu, 09 February 2023 19:16
|
|
|
Re: 2022.3rc5
By: Oblivion on Thu, 09 February 2023 23:20
|
|
|
Re: 2022.3rc5
By: mirek on Fri, 10 February 2023 08:49
|
|
|
Re: 2022.3rc5
By: Oblivion on Fri, 10 February 2023 21:45
|
|
|
Re: 2022.3rc5
By: mirek on Fri, 10 February 2023 23:44
|
|
|
Re: 2022.3rc5
By: Oblivion on Sat, 11 February 2023 07:48
|
|
|
Re: 2022.3rc5
By: Silvan on Mon, 13 February 2023 11:21
|
|
|
Re: 2022.3rc5
By: mirek on Sun, 19 February 2023 10:06
|
|
|
Re: 2022.3rc5
By: Oblivion on Wed, 08 February 2023 20:50
|
|
|
Re: 2022.3rc5
By: Silvan on Thu, 09 February 2023 21:05
|
Goto Forum:
Current Time: Sun May 12 18:44:45 CEST 2024
Total time taken to generate the page: 0.02754 seconds
|