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"
llvm-svn: 220841
SourceLocation RBrace;
if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(Callee)) {
- DeclarationNameLoc &NameLoc = DRE->getNameInfo().getInfo();
+ DeclarationNameLoc NameLoc = DRE->getNameInfo().getInfo();
LBrace = SourceLocation::getFromRawEncoding(
NameLoc.CXXOperatorName.BeginOpNameLoc);
RBrace = SourceLocation::getFromRawEncoding(