[llvm-branch-commits] [cfe-branch] r124412 - in /cfe/branches/Apple/sill: lib/Sema/SemaDecl.cpp test/SemaCXX/PR8884.cpp
Daniel Dunbar
daniel at zuster.org
Thu Jan 27 12:09:09 PST 2011
Author: ddunbar
Date: Thu Jan 27 14:09:09 2011
New Revision: 124412
URL: http://llvm.org/viewvc/llvm-project?rev=124412&view=rev
Log:
Merge r123871:
--
Author: Rafael Espindola <rafael.espindola at gmail.com>
Date: Thu Jan 20 02:26:24 2011 +0000
Fix PR8884 by skipping transparent contexts. The test is for LikageSpec. I
failed to find a case where an enum context would make a difference, but
found PR9007 on the way.
Added:
cfe/branches/Apple/sill/test/SemaCXX/PR8884.cpp
Modified:
cfe/branches/Apple/sill/lib/Sema/SemaDecl.cpp
Modified: cfe/branches/Apple/sill/lib/Sema/SemaDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/sill/lib/Sema/SemaDecl.cpp?rev=124412&r1=124411&r2=124412&view=diff
==============================================================================
--- cfe/branches/Apple/sill/lib/Sema/SemaDecl.cpp (original)
+++ cfe/branches/Apple/sill/lib/Sema/SemaDecl.cpp Thu Jan 27 14:09:09 2011
@@ -5733,7 +5733,7 @@
// 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.
Added: cfe/branches/Apple/sill/test/SemaCXX/PR8884.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/sill/test/SemaCXX/PR8884.cpp?rev=124412&view=auto
==============================================================================
--- cfe/branches/Apple/sill/test/SemaCXX/PR8884.cpp (added)
+++ cfe/branches/Apple/sill/test/SemaCXX/PR8884.cpp Thu Jan 27 14:09:09 2011
@@ -0,0 +1,12 @@
+// RUN: %clang_cc1 -fsyntax-only %s
+extern "C" {
+ class bar {
+ friend struct foo;
+ static struct foo& baz ();
+ };
+ struct foo {
+ void zed () {
+ bar::baz();
+ }
+ };
+}
More information about the llvm-branch-commits
mailing list