Don't capture DeclRefExpr::getNameInfo().getInfo(). It returns reference in temporary object.

DeclarationNameInfo::getInfo() returns reference, but DeclRefExpr::getNameInfo() returns temporary DeclarationNameInfo().

It triggered a local crash for me.

  Failing Tests (1):
      Clang :: SemaTemplate/instantiate-overload-candidates.cpp

  Assertion failed!
  Program: bin\clang.EXE
  File: clang/lib/Basic/SourceManager.cpp, Line 822
  Expression: 0 && "Invalid SLocOffset or bad function choice"