[clang] [StaticAnalyzer] Drop const from a return type (NFC) (PR #141414)

Kazu Hirata via cfe-commits cfe-commits at lists.llvm.org
Sun May 25 10:46:26 PDT 2025


================
@@ -537,7 +537,7 @@ class StdLibraryFunctionsChecker
     /// a later bug report created by ErrnoChecker.
     /// Empty return value means that 'errno' related bug may not happen from
     /// the current analyzed function.
-    virtual const std::string describe(CheckerContext &C) const { return ""; }
+    virtual std::string describe(CheckerContext &C) const { return ""; }
----------------
kazutakahirata wrote:

Yes, I considered that, but I sticked to `std::string` because the return value is assigned to `std::string` for further string manipulation.

https://github.com/llvm/llvm-project/pull/141414


More information about the cfe-commits mailing list