forked from OSchip/llvm-project
Check whether DependentScopeDeclRefExpr's NestedNameSpecifier exists before accessing it, both for consistency (see StmtPrinter::VisitDeclRefExpr()) and for other use cases of dependent types.
llvm-svn: 124119
This commit is contained in:
parent
fa69024463
commit
20b2786524
|
@ -481,7 +481,8 @@ void StmtPrinter::VisitDeclRefExpr(DeclRefExpr *Node) {
|
|||
|
||||
void StmtPrinter::VisitDependentScopeDeclRefExpr(
|
||||
DependentScopeDeclRefExpr *Node) {
|
||||
Node->getQualifier()->print(OS, Policy);
|
||||
if (NestedNameSpecifier *Qualifier = Node->getQualifier())
|
||||
Qualifier->print(OS, Policy);
|
||||
OS << Node->getNameInfo();
|
||||
if (Node->hasExplicitTemplateArgs())
|
||||
OS << TemplateSpecializationType::PrintTemplateArgumentList(
|
||||
|
|
Loading…
Reference in New Issue