diff options
author | Stephen Kelly <steveire@gmail.com> | 2019-01-12 15:45:05 +0000 |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2019-01-12 15:45:05 +0000 |
commit | b5a64e2c24a16007c0faae3280d3262606ae2a0f (patch) | |
tree | c7b307a0691826d4a9120f8c95939ce409e1755f | |
parent | aed5ea036ab0d531bb54a24f96bc3d4adcd05ab2 (diff) |
[ASTDump] Change parameter to StringRef
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@351011 91177308-0d34-0410-b5e6-96231b3b80d8
-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); }); |