[clang] [clang-tools-extra] [lldb] [llvm] [mlir] Remove unused variables in the monorepo (PR #204994)

Nikolas Klauser via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 23 07:19:11 PDT 2026


================
@@ -59,9 +59,9 @@ class GenericNamedTask : public RTTIExtends<GenericNamedTask, Task> {
 /// Generic task implementation.
 template <typename FnT> class GenericNamedTaskImpl : public GenericNamedTask {
 public:
-  GenericNamedTaskImpl(FnT &&Fn, std::string DescBuffer)
+  GenericNamedTaskImpl(FnT &&Fn, std::string InDescBuffer)
       : Fn(std::forward<FnT>(Fn)), Desc(DescBuffer.c_str()),
-        DescBuffer(std::move(DescBuffer)) {}
+        DescBuffer(std::move(InDescBuffer)) {}
----------------
philnik777 wrote:

The `DescBuffer` above referred to the input value before, which can result in a pointer to unrelated stack space. And not that I look at this again, this is still buggy, since `DescBuffer.c_str()` now always accesses uninitialized memory.

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


More information about the cfe-commits mailing list