forked from OSchip/llvm-project
Preserve source locations when building offsetof expressions featuring
anonymous members. Partial fix for PR 5390. llvm-svn: 86796
This commit is contained in:
parent
6a77f51520
commit
7e1d6d78d5
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue