From a2c21a2ddd84a216bad48a005ccec12c7cfd1549 Mon Sep 17 00:00:00 2001 From: Devang Patel Date: Tue, 12 Oct 2010 23:23:25 +0000 Subject: [PATCH] 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 --- lib/Sema/SemaExpr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { -- 2.40.0