Page 1 of 1

Clangd not handling C++20 and headers

Posted: Wed Sep 01, 2021 4:18 am
by rudm

Ubuntu 20.04
CodeLite 15.0.0.0
clangd-12
GCC 11

Clangd is installed and running from the /usr/bin. It is configured in the language server plugin to run from there.

It flags errors that are valid C++20, The project builds with GCC without error. The compile_flags.txt file contains -std=C++20. Is there a way to get clangd to recognize C++20?

Examples:
A: A class inline variable which is flagged as a C++17 feature.
B: Namespace std:: is unknown (but not in all locations).
C: Lambda template flagged as error


Re: Clangd not handling C++20 and headers

Posted: Sat Sep 04, 2021 5:59 pm
by eranif

Make sure that there are no other compile_flags.txt available that may contain some invalid values
(I assume that clangd-12 supports C++20)