Indexer marking method "Invalid Arguments"... [message #1845018] |
Sun, 03 October 2021 01:20  |
Eclipse User |
|
|
|
I'm having an issue with the indexer in a C++ file marking a method as "Invalid Arguments" however it is not as the file compiles just fine. Furthermore the indexer does not complain about the same code in a regular C file. This is using the ESP32 tool chain and I posted this to their forum and have received not response in a month so I thought I would try here. Here is Eclipse with the code in a C file:

And here is Eclipse with the same code formatted in a CPP file.

I have also attempted to debug this using the the indexer debug options explained here https://www.eclipse.org/lists/cdt-dev/msg08941.html and when I request Index->Rebuild I see the files that I am including being processed so it is indeed finding them.
.
.
.
Indexer: adding file:/C:/Users/lehrian/Documents/esp-idf/components/freertos/include/freertos/FreeRTOS.h
Indexer: adding file:/C:/Users/lehrian/Documents/esp-idf/components/esp_hw_support/include/esp_intr_alloc.h
Indexer: adding file:/C:/Users/lehrian/Documents/esp-idf/components/esp_common/include/esp_types.h
Indexer: adding file:/C:/Users/lehrian/Documents/esp-idf/components/soc/esp32/include/soc/io_mux_reg.h
Indexer: adding file:/C:/Users/lehrian/Documents/esp-idf/components/soc/esp32/include/soc/gpio_struct.h
Indexer: adding file:/C:/Users/lehrian/Documents/esp-idf/components/soc/esp32/include/soc/gpio_reg.h
Indexer: adding file:/C:/Users/lehrian/Documents/esp-idf/components/soc/esp32/include/soc/gpio_sig_map.h
Indexer: adding file:/C:/Users/lehrian/Documents/esp-idf/components/soc/include/soc/gpio_periph.h
Indexer: adding file:/C:/Users/lehrian/Documents/esp-idf/components/hal/include/hal/gpio_types.h
Indexer: adding file:/C:/Users/lehrian/Documents/esp-idf/components/esp_rom/include/esp32/rom/gpio.h
Indexer: adding file:/C:/Users/lehrian/Documents/esp-idf/components/driver/include/driver/gpio.h
Indexer: adding file:/C:/Users/lehrian/Documents/ESP32/sample_project/main/TestClass.h
Indexer: adding file:/C:/Users/lehrian/Documents/ESP32/sample_project/main/TestClass.cpp
Indexer: processed \sample_project\main\TestClass.cpp [543 ms]
Indexer: parsing \sample_project\build\detect_compiler_builtins.cpp
[1,633,237,917,329] Parsed detect_compiler_builtins.cpp: 1 ms. Ambiguity resolution: 0 ms
Indexer: processed \sample_project\build\detect_compiler_builtins.cpp [1 ms]
Indexer: parsing \sample_project\build\bootloader\config\sdkconfig.h
[1,633,237,917,331] Parsed sdkconfig.h: 1 ms. Ambiguity resolution: 0 ms
Indexer: adding file:/C:/Users/lehrian/Documents/ESP32/sample_project/build/bootloader/config/sdkconfig.h
Indexer: processed \sample_project\build\bootloader\config\sdkconfig.h [2 ms]
C/C++ Indexer: Project 'sample_project' (7 sources, 253 headers)
Options: indexer='PDOMFastIndexer', parseAllFiles=true, unusedHeaders=useCPP, skipReferences=false, skipImplicitReferences=false, skipTypeReferences=false, skipMacroReferences=false.
Database: 4292608 bytes
Timings: 1239 total, 527 parser, 50 resolution, 379 index update.
Errors: 0 internal, 0 include, 0 scanner, 2 syntax errors.
Names: 7597 declarations, 10287 references, 0(0.00%) unresolved.
Cache[204MB]: 1673253 hits, 0(0.00%) misses.
Indexer: completed PDOMUpdateTask[1257ms]
Indexer: start PDOMFastIndexerTask
C/C++ Indexer: Project 'sample_project' (0 sources, 0 headers)
Options: indexer='PDOMFastIndexer', parseAllFiles=true, unusedHeaders=useCPP, skipReferences=false, skipImplicitReferences=false, skipTypeReferences=false, skipMacroReferences=false.
Database: 4292608 bytes
Timings: 1 total, 0 parser, 0 resolution, 0 index update.
Errors: 0 internal, 0 include, 0 scanner, 0 syntax errors.
Names: 0 declarations, 0 references, 0(0.00%) unresolved.
Cache[204MB]: 99 hits, 0(0.00%) misses.
As my code does compile I can do what I need to do, but it is difficult because I never know if the marker is an actual error or not until I attempt a compile. Any ideas what is wrong? Any ideas how to debug this? My next step would be running Eclipse in debug in Eclipse and seeing if I can catch the bug that way.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: Indexer marking method "Invalid Arguments"... [message #1863270 is a reply to message #1845018] |
Sun, 21 January 2024 18:34  |
Eclipse User |
|
|
|
I have had this problem in a freeRTOS project in 2024! Standard functions like setenv() and atoi() were red-lining complaining about the argument being invalid. The suggested hover-over fix was correct, and the program compiled without error and runs fine. But the error should not be there. F3 took me to the definition in stdlib.h as expected.
The problem went away when I put an #include <stdlib.h> as the first #include in the .cpp file. It didn't even need an index rebuild.
|
|
|
Powered by
FUDForum. Page generated in 0.05156 seconds