Missing FoundDecl in ConceptReference. (original) (raw)

Given the following code, the FoundDecl is null in the Foo's AST node (ConceptReference).

namespace ns {
template<typename T> concept Foo = true;
}

using ns::Foo;
template<typename T>concept Bar = Foo<T>;  // reference `Foo` points to the underlying of ns::Foo, rather than the `using` decl.

This breaks some clang tools: include-cleaner will report the file of the underlying decl, rather than the one for using decl; clangd's go-to-def on Foo jumps to the underlying decl.