diff options
-rw-r--r-- | include/clang/AST/TextNodeDumper.h | 2 | ||||
-rw-r--r-- | lib/AST/TextNodeDumper.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/include/clang/AST/TextNodeDumper.h b/include/clang/AST/TextNodeDumper.h index ddf548e418..2c3cc7294c 100644 --- a/include/clang/AST/TextNodeDumper.h +++ b/include/clang/AST/TextNodeDumper.h @@ -160,7 +160,7 @@ public: void dumpAccessSpecifier(AccessSpecifier AS); void dumpCXXTemporary(const CXXTemporary *Temporary); - void dumpDeclRef(const Decl *D, const char *Label = nullptr); + void dumpDeclRef(const Decl *D, StringRef Label = {}); void visitTextComment(const comments::TextComment *C, const comments::FullComment *); diff --git a/lib/AST/TextNodeDumper.cpp b/lib/AST/TextNodeDumper.cpp index 2a240412a2..9c0496dd69 100644 --- a/lib/AST/TextNodeDumper.cpp +++ b/lib/AST/TextNodeDumper.cpp @@ -184,12 +184,12 @@ void TextNodeDumper::dumpCXXTemporary(const CXXTemporary *Temporary) { OS << ")"; } -void TextNodeDumper::dumpDeclRef(const Decl *D, const char *Label) { +void TextNodeDumper::dumpDeclRef(const Decl *D, StringRef Label) { if (!D) return; AddChild([=] { - if (Label) + if (!Label.empty()) OS << Label << ' '; dumpBareDeclRef(D); }); |