Preserve source locations when building offsetof expressions featuring

anonymous members.  Partial fix for PR 5390.

llvm-svn: 86796
This commit is contained in:
John McCall 2009-11-11 03:23:23 +00:00
parent 6a77f51520
commit 7e1d6d78d5
1 changed files with 1 additions and 1 deletions

View File

@ -5899,7 +5899,7 @@ Sema::OwningExprResult Sema::ActOnBuiltinOffsetOf(Scope *S,
// 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.