================ @@ -286,6 +280,31 @@ inline bool operator==(const ContextTableKey &lhs, const ContextTableKey &rhs) { lhs.contextKind == rhs.contextKind && lhs.contextID == rhs.contextID; } +/// A stored Objective-C or C++ declaration, represented by the ID of its parent +/// context, and the name of the declaration. +struct SingleDeclTableKey { + uint32_t parentContextID; + uint32_t nameID; + + SingleDeclTableKey() : parentContextID(-1), nameID(-1) {} + + SingleDeclTableKey(uint32_t ParentContextID, uint32_t NameID) + : parentContextID(ParentContextID), nameID(NameID) {} + + SingleDeclTableKey(std::optional<Context> ParentCtx, IdentifierID NameID) + : parentContextID(ParentCtx ? ParentCtx->id.Value : (uint32_t)-1), ---------------- compnerd wrote:
Would be nice to use the C++ casts. ```suggestion : parentContextID(ParentCtx ? ParentCtx->id.Value : static_cast<uint32_t>(-1)), ``` https://github.com/llvm/llvm-project/pull/99358 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits