[clang] [APINotes] Diagnose invalid Where.Parameters selectors (PR #209408)

John Hui via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 27 00:27:41 PDT 2026


================
@@ -758,6 +761,10 @@ class APINotesReader::Implementation {
   /// The identifier table.
   std::unique_ptr<SerializedIdentifierTable> IdentifierTable;
 
+  /// Lazy reverse lookup cache from identifier ID to string.
+  bool IdentifierStringsInitialized = false;
+  llvm::DenseMap<uint32_t, llvm::StringRef> IdentifierStrings;
----------------
j-hui wrote:

If the flag is just guarding the initialization of `IdentifierStrings`, how about just putting it in an optional, i.e.,


```suggestion
  std::optional<llvm::DenseMap<uint32_t, llvm::StringRef>> IdentifierStrings;
```

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


More information about the cfe-commits mailing list