[PATCH] D15254: Fix crash when dumping NamedDecl with NULL getQualifier().
Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Dec 5 14:40:53 PST 2015
This revision was automatically updated to reflect the committed changes.
Closed by commit rL254867: Fix crash in ASTDumper when dumping NamedDecl with NULL getQualifier(). (authored by dperchik).
Changed prior to commit:
http://reviews.llvm.org/D15254?vs=41968&id=41996#toc
Repository:
rL LLVM
http://reviews.llvm.org/D15254
Files:
cfe/trunk/lib/AST/ASTDumper.cpp
Index: cfe/trunk/lib/AST/ASTDumper.cpp
===================================================================
--- cfe/trunk/lib/AST/ASTDumper.cpp
+++ cfe/trunk/lib/AST/ASTDumper.cpp
@@ -1385,20 +1385,23 @@
void ASTDumper::VisitUsingDecl(const UsingDecl *D) {
OS << ' ';
- D->getQualifier()->print(OS, D->getASTContext().getPrintingPolicy());
+ if (D->getQualifier())
+ D->getQualifier()->print(OS, D->getASTContext().getPrintingPolicy());
OS << D->getNameAsString();
}
void ASTDumper::VisitUnresolvedUsingTypenameDecl(
const UnresolvedUsingTypenameDecl *D) {
OS << ' ';
- D->getQualifier()->print(OS, D->getASTContext().getPrintingPolicy());
+ if (D->getQualifier())
+ D->getQualifier()->print(OS, D->getASTContext().getPrintingPolicy());
OS << D->getNameAsString();
}
void ASTDumper::VisitUnresolvedUsingValueDecl(const UnresolvedUsingValueDecl *D) {
OS << ' ';
- D->getQualifier()->print(OS, D->getASTContext().getPrintingPolicy());
+ if (D->getQualifier())
+ D->getQualifier()->print(OS, D->getASTContext().getPrintingPolicy());
OS << D->getNameAsString();
dumpType(D->getType());
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D15254.41996.patch
Type: text/x-patch
Size: 1136 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20151205/0a7580d9/attachment.bin>
More information about the cfe-commits
mailing list