================
@@ -88,12 +94,12 @@ class ScalarStorageLocation final : public StorageLocation {
 class RecordStorageLocation final : public StorageLocation {
 public:
   using FieldToLoc = llvm::DenseMap<const ValueDecl *, StorageLocation *>;
+  using SyntheticFieldMap = llvm::StringMap<StorageLocation *>;
----------------
martinboehme wrote:

This is an interesting idea, but I'm hesitant about mutating the 
`IdentifierTable` in something that is going to be used from a clang-tidy 
check, which will be sharing the `IdentifierTable` with other checks.

I suppose we could always create our own mapping from strings to integers or 
pointers of some sort, which could then serve as the keys for the 
`SyntheticFieldMap` -- but I would lean towards leaving this as a potential 
future optimization that we would do if this does indeed turn out to be a 
performance issue.

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

Reply via email to