clang-concepts-monorepo
clang-concepts-monorepo copied to clipboard
Sema::getAssociatedConstraints incomplete result
Foo.h:
template<class T> concept ReturnTy = true;
template<class T>
concept MyConcept = requires (T t) {
{ t.foo } -> ReturnTy;
{ t.bar } -> int;
};
Foo.cpp:
#include "Foo.h"
template<MyConcept MC>
void func(MC mc) {}
Sema::getAssociatedConstraints
called for func
does not include the requirement { t.foo } -> ReturnTy;
(or others, where the returned type is a concept), but it does include { f.bar } -> int;
.
It works as expected for non-concept return types, or when MyConcept
or MyConcept
and ReturnTy
are defined in Foo.cpp.