From: Devang Patel Date: Tue, 12 Oct 2010 23:23:25 +0000 (+0000) Subject: Fix anon union member assignment expression's location. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a2c21a2ddd84a216bad48a005ccec12c7cfd1549;p=clang Fix anon union member assignment expression's location. This is tested by anon-union.exp in gdb testsuite. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116371 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp index 514d9ba3f2..68bb2b0723 100644 --- a/lib/Sema/SemaExpr.cpp +++ b/lib/Sema/SemaExpr.cpp @@ -570,7 +570,7 @@ Sema::BuildAnonymousStructUnionMemberReference(SourceLocation Loc, // therefore, not part of another non-anonymous record). MarkDeclarationReferenced(Loc, BaseObject); BaseObjectExpr = new (Context) DeclRefExpr(BaseObject,BaseObject->getType(), - SourceLocation()); + Loc); BaseQuals = Context.getCanonicalType(BaseObject->getType()).getQualifiers(); } else if (BaseObjectExpr) {