-
Notifications
You must be signed in to change notification settings - Fork 274
Closed
Description
I am using Sublime Text LSP in macOS.
The c file
#include <string.h>
// something else
void utf8_to_utf32_callback(int cp, int m, void* data, long i) {
uint32_t x = cp;
memcpy((char*) data + sizeof(uint32_t) * i, &x, sizeof(uint32_t));
}
Diagnostic
104:5 ccls warning implicitly declaring library function 'memcpy' with type 'void *(void *, const void *, unsigned long)'
utftools.c:104:5: note: include the header <string.h> or explicitly provide a declaration for 'memcpy'
104:5 ccls info include the header <string.h> or explicitly provide a declaration for 'memcpy'
When I check the ccls log file, I could see string.h is indexed.
10:01:30 pipeline.cc:389 I store index for /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/string.h (delta: 0)
But having a closer look of the string.h, it doesn't contain the definiation of memcpy but the following derivative
#include_next <string.h>
Does it mean that ccls is not following the #include_next derivative? I cannot see other string.h file being indexed except /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/string.h.
Please let me know if you need more information.
- ccls installed freshly from homebrew.
- the file could be compiled without problems.
Metadata
Metadata
Assignees
Labels
No labels