]> granicus.if.org Git - clang/commitdiff
In BuildAnonymousStructUnionMemberReference, we shouldn't invalidate OpLoc when
authorTed Kremenek <kremenek@apple.com>
Fri, 27 Feb 2009 19:58:12 +0000 (19:58 +0000)
committerTed Kremenek <kremenek@apple.com>
Fri, 27 Feb 2009 19:58:12 +0000 (19:58 +0000)
building nested member expressions. This location is used to determine the range
of the entire expression, and the expression itself already has its location
inherited from its Base.

This fixes <rdar://problem/6629829>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65650 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaExpr.cpp

index 43cbe98d875d62eeea5b01397797cf66c94b3e44..8604670d6edf8333f76ecd145df96082908ce3dc 100644 (file)
@@ -600,7 +600,6 @@ Sema::BuildAnonymousStructUnionMemberReference(SourceLocation Loc,
                                       OpLoc, MemberType);
     BaseObjectIsPointer = false;
     ExtraQuals = Context.getCanonicalType(MemberType).getCVRQualifiers();
-    OpLoc = SourceLocation();
   }
 
   return Owned(Result);