[PATCH] D84599: [clang-index] Use NamedDecl::getDeclName() instead of NamedDecl::printName in USRGenerator::EmitDeclName

Bruno Ricci via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Jul 26 09:56:57 PDT 2020


riccibruno updated this revision to Diff 280734.
riccibruno added a comment.

Update a comment I originally missed.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D84599/new/

https://reviews.llvm.org/D84599

Files:
  clang/lib/Index/USRGeneration.cpp


Index: clang/lib/Index/USRGeneration.cpp
===================================================================
--- clang/lib/Index/USRGeneration.cpp
+++ clang/lib/Index/USRGeneration.cpp
@@ -167,8 +167,7 @@
   void VisitTemplateName(TemplateName Name);
   void VisitTemplateArgument(const TemplateArgument &Arg);
 
-  /// Emit a Decl's name using NamedDecl::printName() and return true if
-  ///  the decl had no name.
+  /// Emit a Decl's name and return true if the decl had no name.
   bool EmitDeclName(const NamedDecl *D);
 };
 } // end anonymous namespace
@@ -179,7 +178,7 @@
 
 bool USRGenerator::EmitDeclName(const NamedDecl *D) {
   const unsigned startSize = Buf.size();
-  D->printName(Out);
+  Out << D->getDeclName();
   const unsigned endSize = Buf.size();
   return startSize == endSize;
 }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D84599.280734.patch
Type: text/x-patch
Size: 804 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200726/401dd538/attachment-0001.bin>


More information about the cfe-commits mailing list