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.
clang inserting random text
-
- CodeLite Enthusiast
- Posts: 23
- Joined: Fri Mar 23, 2018 7:12 am
- Genuine User: Yes
- IDE Question: C++
- Contact:
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: clang inserting random text
I am not sure what you mean here, can you give an example? or steps to reproduce?When Clang fails to compile for the code completion i will sometimes insert random text
Thanks!
Make sure you have read the HOW TO POST thread
-
- CodeLite Enthusiast
- Posts: 23
- Joined: Fri Mar 23, 2018 7:12 am
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: clang inserting random text
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.
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.
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: clang inserting random text
Can you post a screenshot of the original problem (I know that you fixed it, but just incase it's worth fixing)
Thanks
Thanks
Make sure you have read the HOW TO POST thread