https://github.com/kazutakahirata created 
https://github.com/llvm/llvm-project/pull/140665

None

>From 2aa8fa9aeebc55cafc24a29ca95de008799aeea2 Mon Sep 17 00:00:00 2001
From: Kazu Hirata <k...@google.com>
Date: Mon, 19 May 2025 20:13:08 -0700
Subject: [PATCH] [AST] Drop const from a return type (NFC)

---
 clang/lib/AST/ByteCode/Record.cpp | 2 +-
 clang/lib/AST/ByteCode/Record.h   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/clang/lib/AST/ByteCode/Record.cpp 
b/clang/lib/AST/ByteCode/Record.cpp
index 0c06bec7e5508..1d4ac7103cb76 100644
--- a/clang/lib/AST/ByteCode/Record.cpp
+++ b/clang/lib/AST/ByteCode/Record.cpp
@@ -29,7 +29,7 @@ Record::Record(const RecordDecl *Decl, BaseList &&SrcBases,
     VirtualBaseMap[V.Decl] = &V;
 }
 
-const std::string Record::getName() const {
+std::string Record::getName() const {
   std::string Ret;
   llvm::raw_string_ostream OS(Ret);
   Decl->getNameForDiagnostic(OS, Decl->getASTContext().getPrintingPolicy(),
diff --git a/clang/lib/AST/ByteCode/Record.h b/clang/lib/AST/ByteCode/Record.h
index 686b5dbc431d9..93ca43046180a 100644
--- a/clang/lib/AST/ByteCode/Record.h
+++ b/clang/lib/AST/ByteCode/Record.h
@@ -52,7 +52,7 @@ class Record final {
   /// Returns the underlying declaration.
   const RecordDecl *getDecl() const { return Decl; }
   /// Returns the name of the underlying declaration.
-  const std::string getName() const;
+  std::string getName() const;
   /// Checks if the record is a union.
   bool isUnion() const { return IsUnion; }
   /// Checks if the record is an anonymous union.

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to