-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Clang][Sema] Allow access to a public template alias declaration tha…
…t refers to friend's private nested type (#83847) This patch attempts to fix #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>
- Loading branch information
Showing
3 changed files
with
29 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// 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; | ||
} |