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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124199 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Douglas Gregor 2011-01-25 17:51:48 +00:00
Родитель 73b3cf6503
Коммит ae201f75e5
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

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