failed to find a case where an enum context would make a difference, but
found PR9007 on the way.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123871
91177308-0d34-0410-b5e6-
96231b3b80d8
// Find the context where we'll be declaring the tag.
// FIXME: We would like to maintain the current DeclContext as the
// lexical context,
- while (SearchDC->isRecord())
+ while (SearchDC->isRecord() || SearchDC->isTransparentContext())
SearchDC = SearchDC->getParent();
// Find the scope where we'll be declaring the tag.
--- /dev/null
+// RUN: %clang_cc1 -fsyntax-only %s
+extern "C" {
+ class bar {
+ friend struct foo;
+ static struct foo& baz ();
+ };
+ struct foo {
+ void zed () {
+ bar::baz();
+ }
+ };
+}