Indexer marking method "Invalid Arguments"... [message #1845018] |
Sun, 03 October 2021 05:20 |
David Lehrian Messages: 10 Registered: October 2021 |
Junior Member |
|
|
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 #1845054 is a reply to message #1845046] |
Mon, 04 October 2021 22:13 |
David Lehrian Messages: 10 Registered: October 2021 |
Junior Member |
|
|
Just to be clear, both the C and C++ files compile without error or warning. This just seems to be an issue with the Eclipse indexer not liking the C++ file.
As I look through the included headers they all seem to have a
Quote:
#ifdef __cplusplus
extern "C" {
#endif
at the top and a corresponding closure at the bottom. I will continue to investigate and see if this leads anywhere.
Interestingly, if I comment out
Quote:
#include <freertos/FreeRTOS.h>
at the top of the C++ file the error markers in Eclipse go away the file file will still compile.
[Updated on: Mon, 04 October 2021 22:17] Report message to a moderator
|
|
|
|
|
Re: Indexer marking method "Invalid Arguments"... [message #1845096 is a reply to message #1845084] |
Wed, 06 October 2021 16:37 |
David Lehrian Messages: 10 Registered: October 2021 |
Junior Member |
|
|
Sorry, didn't see your question. It uses it to extern "C" { a bunch of methods. \
/* *INDENT-OFF* */
#ifdef __cplusplus
extern "C" {
#endif
/* *INDENT-ON* */
EDIT: Actually it doesn't seem to be declaring any methods, it is conditionally including some other headers and creating some defines. I commented out the extern "C" and it still compiled fine and the error was still present. I'm going through all the included files and looking at them as well. They seem to be mostly conditional defines but I'm not through them all yet.
[Updated on: Wed, 06 October 2021 16:56] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05766 seconds