http://bugzilla.opensuse.org/show_bug.cgi?id=1199943 http://bugzilla.opensuse.org/show_bug.cgi?id=1199943#c6 --- Comment #6 from Andreas Nordal <andreas_nordal_4@hotmail.com> --- Thanks, Aaron, and sorry, I messed up when reducing the problem. The confusing thing was that clangd defeated my sanity check (-Iweird_include worked when -std=c++17 did not). When reducing the problem again, it seems to be a header name collision between newlib and host headers (cross compilation). I thought I managed to minimize it down to a single header, sys/cdefs.h, but when renaming the include directory (just as a sanity check), the problem evaporated (as if clangd was stateful). New reproducer (not reduced to a single header): Install /usr/riscv64-elf/include zypper in cross-riscv64-newlib-devel /tmp/compile_commands.json: [{ "directory": "/tmp", "command": "clang++ -std=c++17 -isystem /usr/riscv64-elf/include -c takes_string_view.cpp -o takes_string_view.o", "file": "takes_string_view.cpp" }] /tmp/takes_string_view.cpp: #include <cstdlib> // Not relevant, but erases string_view. #include <string_view> void f(std::string_view str); // No member named 'string_view' in namespace 'std' -- You are receiving this mail because: You are on the CC list for the bug.