[cfe-commits] r86796 - /cfe/trunk/lib/Sema/SemaExpr.cpp
John McCall
rjmccall at apple.com
Tue Nov 10 19:23:24 PST 2009
Author: rjmccall
Date: Tue Nov 10 21:23:23 2009
New Revision: 86796
URL: http://llvm.org/viewvc/llvm-project?rev=86796&view=rev
Log:
Preserve source locations when building offsetof expressions featuring
anonymous members. Partial fix for PR 5390.
Modified:
cfe/trunk/lib/Sema/SemaExpr.cpp
Modified: cfe/trunk/lib/Sema/SemaExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExpr.cpp?rev=86796&r1=86795&r2=86796&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExpr.cpp Tue Nov 10 21:23:23 2009
@@ -5899,7 +5899,7 @@
// FIXME: Verify that MemberDecl isn't a bitfield.
if (cast<RecordDecl>(MemberDecl->getDeclContext())->isAnonymousStructOrUnion()) {
Res = BuildAnonymousStructUnionMemberReference(
- SourceLocation(), MemberDecl, Res, SourceLocation()).takeAs<Expr>();
+ OC.LocEnd, MemberDecl, Res, OC.LocEnd).takeAs<Expr>();
} else {
// MemberDecl->getType() doesn't get the right qualifiers, but it
// doesn't matter here.
More information about the cfe-commits
mailing list