You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Clangd's include cleaner fails for symbols from one file forward-declared and aliased in a different file. In the following example, both "forward.h" and "impl.h" are required for the code to compile. Yet, clangd claims "impl.h" is unused. It's not unused since it's providing Foo::kValue.
impl.h
#pragma once
namespaceimpl {
enumclassFoo : int {
kValue = 0
};
}
forward.h
#pragma once
namespaceimpl {
enumclassFoo : int;
}
using impl::Foo;
main.cc
#include"forward.h"
#include"impl.h"// Clangd warns: "Included header impl.h is not used directly "intmain() {
Foo foo = Foo::kValue;
return1;
}
System information
Output of clangd --version:
clangd version 19.0.0git (https://github.com/llvm/llvm-project.git 55e59083cb610f30ad21fe8c8cdb9900534937ec)
Features: linux
Platform: x86_64-unknown-linux-gnu
Editor/LSP plugin:
VSCode
Operating system:
Linux
The text was updated successfully, but these errors were encountered:
Clangd's include cleaner fails for symbols from one file forward-declared and aliased in a different file. In the following example, both
"forward.h"
and"impl.h"
are required for the code to compile. Yet, clangd claims"impl.h"
is unused. It's not unused since it's providingFoo::kValue
.impl.h
forward.h
main.cc
System information
Output of
clangd --version
:clangd version 19.0.0git (https://github.com/llvm/llvm-project.git 55e59083cb610f30ad21fe8c8cdb9900534937ec)
Features: linux
Platform: x86_64-unknown-linux-gnu
Editor/LSP plugin:
VSCode
Operating system:
Linux
The text was updated successfully, but these errors were encountered: