mirror of
https://github.com/intel/llvm.git
synced 2026-01-30 05:55:35 +08:00
Preserve source locations when building offsetof expressions featuring
anonymous members. Partial fix for PR 5390. llvm-svn: 86796
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user