[cfe-commits] r112487 - in /cfe/trunk: lib/Sema/SemaExpr.cpp test/SemaTemplate/member-access-expr.cpp
Douglas Gregor
dgregor at apple.com
Mon Aug 30 09:00:47 PDT 2010
Author: dgregor
Date: Mon Aug 30 11:00:47 2010
New Revision: 112487
URL: http://llvm.org/viewvc/llvm-project?rev=112487&view=rev
Log:
Fix an corner-case assertion introduced by the refactoring in r112258;
when we're taking the address of a unresolvable value, it might be an
implicit member access. Fixes some Boost.Spirit regressions.
Modified:
cfe/trunk/lib/Sema/SemaExpr.cpp
cfe/trunk/test/SemaTemplate/member-access-expr.cpp
Modified: cfe/trunk/lib/Sema/SemaExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExpr.cpp?rev=112487&r1=112486&r2=112487&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExpr.cpp Mon Aug 30 11:00:47 2010
@@ -1263,6 +1263,8 @@
MightBeImplicitMember = false;
else if (R.isOverloadedResult())
MightBeImplicitMember = false;
+ else if (R.isUnresolvableResult())
+ MightBeImplicitMember = true;
else
MightBeImplicitMember = isa<FieldDecl>(R.getFoundDecl());
Modified: cfe/trunk/test/SemaTemplate/member-access-expr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaTemplate/member-access-expr.cpp?rev=112487&r1=112486&r2=112487&view=diff
==============================================================================
--- cfe/trunk/test/SemaTemplate/member-access-expr.cpp (original)
+++ cfe/trunk/test/SemaTemplate/member-access-expr.cpp Mon Aug 30 11:00:47 2010
@@ -121,3 +121,14 @@
}
};
}
+
+namespace test5 {
+ template<typename T>
+ struct X {
+ using T::value;
+
+ T &getValue() {
+ return &value;
+ }
+ };
+}
More information about the cfe-commits
mailing list