forked from OSchip/llvm-project
For class template implicit instantiation, also update its location to point
to the pattern template that it came from, otherwise we had this situation: template <typename T1, typename T2> struct S { }; template <typename T> struct S<T, int> { }; void f() { S<int, int> s; // location of declaration "S<int, int>" was of "S<T1, T2>" not "S<T, int>" } llvm-svn: 150290
This commit is contained in:
parent
d4a7c123f3
commit
e378948c8a
|
@ -1863,6 +1863,7 @@ Sema::InstantiateClass(SourceLocation PointOfInstantiation,
|
|||
ActOnFinishDelayedMemberInitializers(Instantiation);
|
||||
|
||||
if (TSK == TSK_ImplicitInstantiation) {
|
||||
Instantiation->setLocation(Pattern->getLocation());
|
||||
Instantiation->setLocStart(Pattern->getInnerLocStart());
|
||||
Instantiation->setRBraceLoc(Pattern->getRBraceLoc());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue