[clang] [clang]get non-injected-class before finding instantiated decl (PR #70886)
Henrik G. Olsson via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 1 07:11:57 PDT 2023
================
@@ -429,3 +429,19 @@ namespace qualified_friend_no_match {
friend void Y::f(double); // expected-error {{friend declaration of 'f' does not match any declaration in 'qualified_friend_no_match::Y'}}
};
}
+
+namespace gh21483 {
+template <typename I>
+struct B {
+ struct mixin {
+ int type;
+ friend void foo(B<I>::mixin it) {
+ (void)it.mixin::type;
----------------
hnrklssn wrote:
Ah I see it now after playing around with it a bit. In this case line 439 could have accessed the same value through `(void)it.type` since `mixin` doesn't inherit anything, but `it.mixin::type` is allowed regardless.
https://github.com/llvm/llvm-project/pull/70886
More information about the cfe-commits
mailing list