clang inserting random text

CodeLite installation/troubleshooting forum
shadoww
CodeLite Enthusiast
Posts: 23
Joined: Fri Mar 23, 2018 7:12 am
Genuine User: Yes
IDE Question: C++
Contact:

clang inserting random text

Post by shadoww »

When Clang fails to compile for the code completion i will sometimes insert random text. This is a bit unnerving.

Using
Clang 7.0.0-1
GCC 8.2.1
Codelite 12.0-1
on Linux Manjaro kde.

also..
Are you going to include red underlines for invalid code in the program at some point? This really just a nice to have I think codelite is the best editor out there for c++ ATM for Linux.
User avatar
eranif
CodeLite Plugin
Posts: 6367
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: clang inserting random text

Post by eranif »

When Clang fails to compile for the code completion i will sometimes insert random text
I am not sure what you mean here, can you give an example? or steps to reproduce?

Thanks!
Make sure you have read the HOW TO POST thread
shadoww
CodeLite Enthusiast
Posts: 23
Joined: Fri Mar 23, 2018 7:12 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: clang inserting random text

Post by shadoww »

I think I may have fixed it already. I had a few .h files that GCC could find but CLang could not. I added a few paths to the CLang include files and found that I had a lib with .h and .cpp files with the same name as my main program and that was causing major issues. After I fixed both, the code completion started to work like it should and CLang was happy.

What was happening was that a few of the error messages that CLang was writing to its log were actually written in random place in the .h or .cpp file for example:

Assert( rel != nullptr, "Relationship was null." );
would become
AssertCould Not Find .h File( rel != nullptr, "Relationship was null." );

Easy enough to fix but could cause headaches at some point.
User avatar
eranif
CodeLite Plugin
Posts: 6367
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: clang inserting random text

Post by eranif »

Can you post a screenshot of the original problem (I know that you fixed it, but just incase it's worth fixing)
Thanks
Make sure you have read the HOW TO POST thread
Post Reply