actually hidden before we check its linkage. This avoids computing the linkage
"too early" for an anonymous struct with a typedef name for linkage.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253012
91177308-0d34-0410-b5e6-
96231b3b80d8
if (!D->isInIdentifierNamespace(IDNS))
return nullptr;
- if (!D->isHidden() || isHiddenDeclarationVisible(D) ||
- isVisibleSlow(getSema(), D))
+ if (isVisible(getSema(), D) || isHiddenDeclarationVisible(D))
return D;
return getAcceptableDeclSlow(D);
#ifndef B
#error B is not defined
#endif
+
+// Ensure we don't compute the linkage of this struct before we find it has a
+// typedef name for linkage purposes.
+typedef struct {
+ int p;
+ void (*f)(int p);
+} name_for_linkage;