This patch fixes incorrect source positions of dependent c'tor initializers like in the following code:
template<typename MyBase>
struct Derived: MyBase::InnerIterator
{
Derived() : MyBase::InnerIterator() {} /// This line is problematic: all positions point to InnerIterator and nothing points to MyBase
};
Bug is described at https://bugs.llvm.org/show_bug.cgi?id=26195 in comments. The issue affects TypeLoc for 'MyBase', NestedNameSpecifierLoc for 'MyBase' and CXXCtorInitializer for MyBase::InnerIterator. Reproducing matcher and source codes for bad (dependent name) and good (indepent name) behaviors are attached. Reports of bad, good and bad with patch are given in comments for comparison.
The patch basically replicates code found later in routine for ElaboratedTypeLoc and adapted to DependentTypeLoc returned from CheckTypenameType().
This line violates the 80 columns. Please use clang-format!