mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-17 15:56:40 +00:00

This patch attempts to fix https://github.com/llvm/llvm-project/issues/25708 Current access check missed qualifier(`NestedNameSpecifier`) in friend class checking. Add it to `Records` of `EffectiveContext` by changing the `DeclContext` makes `MatchesFriend` work. Co-authored-by: huqizhi <836744285@qq.com>
21 lines
268 B
C++
21 lines
268 B
C++
// RUN: %clang_cc1 -std=c++11 -verify %s
|
|
// expected-no-diagnostics
|
|
|
|
struct FooAccessor
|
|
{
|
|
template <typename T>
|
|
using Foo = typename T::Foo;
|
|
};
|
|
|
|
class Type
|
|
{
|
|
friend struct FooAccessor;
|
|
|
|
using Foo = int;
|
|
};
|
|
|
|
int main()
|
|
{
|
|
FooAccessor::Foo<Type> t;
|
|
}
|