aboutsummaryrefslogtreecommitdiff
path: root/clang
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2019-01-12 15:45:05 +0000
committerStephen Kelly <steveire@gmail.com>2019-01-12 15:45:05 +0000
commit9bc90a28297adc95456893abd4eb2fa72139fced (patch)
tree16a7d08faa331ba1469592c398166e96123446ef /clang
parent7d65fe5cd55183dfed63a27f0f20e33e4b401e5b (diff)
[ASTDump] Change parameter to StringRef
llvm-svn: 351011
Diffstat (limited to 'clang')
-rw-r--r--clang/include/clang/AST/TextNodeDumper.h2
-rw-r--r--clang/lib/AST/TextNodeDumper.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/clang/include/clang/AST/TextNodeDumper.h b/clang/include/clang/AST/TextNodeDumper.h
index ddf548e41840..2c3cc7294c1b 100644
--- a/clang/include/clang/AST/TextNodeDumper.h
+++ b/clang/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/clang/lib/AST/TextNodeDumper.cpp b/clang/lib/AST/TextNodeDumper.cpp
index 2a240412a297..9c0496dd6936 100644
--- a/clang/lib/AST/TextNodeDumper.cpp
+++ b/clang/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);
});