Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Indexer/parser problems

Thanks for your suggestions Marc- André. I will have a look.

Axel

Marc-Andre Laperle <malaperle@xxxxxxxxx> schrieb am Fr., 16. Juli 2021, 06:17:
Hi,

Sometimes there are updates to the standard library as well that can affect the parsing. It happened quite a few times that a new compiler “built-in” starts to be used in the standard library, see https://clang.llvm.org/docs/LanguageExtensions.html#type-trait-primitives Some of those are easier to implement than others in the parser.

Since there is not a lot of expertise left for this part of CDT, it can take a long time to isolate an issue and develop a fix we can be confident with. So we should prioritize the bugs that seem to produce the most errors. I think the best thing to do on your end is to start with the most important bugs in the list and try to make stand-alone code samples reproducing the errors, without dependencies on external includes. I normally start by seeing if a single source file in my project reproduces the issue (excluding the other files in the project if necessary). Then remove code and includes that is not necessary in that file. Then I import needed std:: things into global namespace in this file and replace std:: usage and remove the std includes. Then I go through many iterations of simplifying the code, making sure it still compiles and produces the original error in each steps.

Once there is a stand-alone code sample, it’s also easier to test it against previous CDT versions and see if it’s a regression (e.g. works pre 2020-09).
That said, I don’t think there were many large changes in the last couple years, maybe mostly related to aggregate initialization.

You could also try to use Clangd using the language server integration in CDT. I don’t have much recent experience with it but I wrote a small FAQ section for the basic setup https://wiki.eclipse.org/CDT/User/FAQ#How_can_I_use_the_Clangd_language_server_inside_CDT.3F

Regards,
Marc-André

On Jul 15, 2021, at 12:16 PM, Axel Müller <axel.carl.mueller@xxxxxxxxx> wrote:

Hi,
I noticed some degradation of the indexer/parser. Usually nearly all of the files in my project (some several thousand C++ source code files, C++-17 set as standard, gcc 9 on Linux, makefile project based on cmake) are correctly indexed and I can happily and successfully parse and search my source code. In my opinion one of the strongest (if not *the* best) feature of Eclipse CDT.
However, for some releases (since 2020-09?) now I encounter many problems. Many of my source code files are full of red markers "invalid arguments..". Searching for symbol occurrences, generating call hierarchy, doing some refactoring etc. no longer works flawlessly.

Rebuilding the index does not help. Includes are resolved. The strange thing is that even basic functions, defines, classes are marked as invalid. There are even cases where a define is okay in one file but generates problems in other files
Rebuilding the index I identified some messages in the error log and created some bugzilla entries (or added my comments to existing ones):

I don't know if these errors are the only cause of the indexer/parser problems. Sometimes I guess the indexer stops somehow before it is completely finished. I have increased the memory for the indexer database but it did not help.

I am using Eclipse CDT now for more than 14 years on a daily basis and was able to solve many problems but now I am running out of ideas. And the poor quality of the indexer/parser makes me really think about switching the IDE because it makes my daily work very frustrating. Any ideas/help is welcome.

  Axel
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/cdt-dev

_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/cdt-dev

Back to the top