[llvm] ADT: Improve DenseMap documentation for insertion APIs (PR #172177)

via llvm-commits llvm-commits at lists.llvm.org
Sun Feb 1 03:30:46 PST 2026


================
@@ -208,9 +208,9 @@ class DenseMapBase : public DebugEpochBase {
     return ValueT();
   }
 
-  // Return the entry with the specified key, or \p Default. This variant is
-  // useful, because `lookup` cannot be used with non-default-constructible
-  // values.
+  /// Returns the mapped value for Val if present, otherwise Default.
----------------
aakarshbhardwaj08 wrote:

Good point — agreed. Renaming the parameter to `Key` improves clarity and
matches the naming used by other DenseMap APIs. I’ll update this accordingly.


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


More information about the llvm-commits mailing list