================
@@ -525,14 +527,14 @@ class SymbolManager {
 
   static bool canSymbolicate(QualType T);
 
-  /// Make a unique symbol for MemRegion R according to its kind.
-  const SymbolRegionValue* getRegionValueSymbol(const TypedValueRegion* R);
+  template <typename T, typename... Args> const T *get(Args &&...args);
----------------
necto wrote:

> If somebody reads this generic declaration without any context, they won't 
> see any connection to symbols. Perhaps it would be good to either rename `T` 
> to something like `SymbolType` or add a brief comment to describe the role of 
> this method.

That makes sense. I'll do both once we agree on the next point

> đŸ¤” In fact, now that I write this, maybe it would be better to rename this 
> method to "`make`" or something similar to highlight that it's a factory 
> method that makes new symbol objects (as opposed to e.g. 
> `ProgramState::get<>()` which queries an existing state trait object from the 
> state).

I was considering "make" briefly, but it is not entirely correct: this function 
doesn't always make a `SymExpr`, sometimes it retrieves an existing one 
matching the arguments. Besides, most of the replaced member functions were 
called `get*`. How do you like `findOrCreate`, `createIfNone`, `ensureExists`, 
`obtain`, `acquire`, `procure`?

https://github.com/llvm/llvm-project/pull/121781
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to