Hi,
It looks like the error is caused by the differences in the way gcc and clang handle the __VA_OPT__ syntax. ESP-IDF code was never tested with Clang, so it makes sense that it would trigger unexpected errors.
You can work around it by patching the definition of ESP_LOG_LEVEL_LOCAL() in esp_log.h as follows:
#ifdef __SYSPROGS_CODESENSE__
#define ESP_LOG_LEVEL_LOCAL(level, tag, format, ...)
#else
#define ESP_LOG_LEVEL_LOCAL(level, tag, format, ...) do { \
if ( LOG_LOCAL_LEVEL >= level ) ESP_LOG_LEVEL(level, tag, format, ##__VA_ARGS__); \
} while(0)
#endif
The __SYSPROGS_CODESENSE__ macro is only defined by Clang IntelliSense, so it won’t affect the actual build, but will prevent IntelliSense from trying to parse unsupported syntax.