Be a bit more defensive about setting the temporary base location

during template instantiation. This code needs to eventually die, but
this little tweak fixes PR8629, where bad location information slipped
through to the location of a class template instantiation.

llvm-svn: 124199
This commit is contained in:
Douglas Gregor 2011-01-25 17:51:48 +00:00
parent 93b0c8b2aa
commit a518d5b3ac
1 changed files with 3 additions and 1 deletions

View File

@ -169,6 +169,8 @@ public:
DeclarationName Entity) : Self(Self) {
OldLocation = Self.getDerived().getBaseLocation();
OldEntity = Self.getDerived().getBaseEntity();
if (Location.isValid())
Self.getDerived().setBase(Location, Entity);
}