chandlerc wrote:

> I think i'd like to know more about the motivation. We want to keep the 
> implementation very close to the type traits implementation - ie. this is a 
> 1/1 mapping to `<type_traits>` - I'm not certain than avoiding the 
> duplication is desirable.
> 
> In particular, this uses Sema because access checks are done in the context 
> where the trait is used, which, afaik, is why we need Sema and do lookup. If 
> we could not do that, you'd be able to skip all of that.
> 
> Can C++ befriend carbon types? Presumably that would be one scenario where 
> this matter.

FWIW, I would definitely expect us to want to allow Carbon types in C++ friend 
declarations. =/ For example, if we migrate a type from C++ into Carbon that is 
already in friend declarations.

https://github.com/llvm/llvm-project/pull/238456
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to