forked from OSchip/llvm-project
Fix a bug in getFriendObjectKind where we would clear out all mask bits except IDNS_TagFriend and IDNS_OrdinaryFriend but then check for IDNS_Tag and IDNS_Ordinary.
llvm-svn: 81730
This commit is contained in:
parent
64f18eceaf
commit
40a90c8754
|
@ -443,7 +443,8 @@ public:
|
|||
unsigned mask
|
||||
= (IdentifierNamespace & (IDNS_TagFriend | IDNS_OrdinaryFriend));
|
||||
if (!mask) return FOK_None;
|
||||
return (mask & (IDNS_Tag | IDNS_Ordinary) ? FOK_Declared : FOK_Undeclared);
|
||||
return (IdentifierNamespace & (IDNS_Tag | IDNS_Ordinary) ?
|
||||
FOK_Declared : FOK_Undeclared);
|
||||
}
|
||||
|
||||
// Implement isa/cast/dyncast/etc.
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
// RUN: clang-cc -fsyntax-only -verify %s
|
||||
template<typename T> struct A {
|
||||
struct B { };
|
||||
|
||||
friend struct B;
|
||||
};
|
||||
|
||||
void f() {
|
||||
A<int>::B b;
|
||||
}
|
Loading…
Reference in New Issue