Skip to content
Commit a691cf15 authored by Igor Kushnir's avatar Igor Kushnir Committed by Milian Wolff
Browse files

Prevent using item repositories without locking

Convert struct ItemRepositoryFor into a class to make repo() private in
template specializations. Convert itemRepositoryOp() function template
into op() static member function inside struct LockedItemRepository.
Make LockedItemRepository a friend of each ItemRepositoryFor
specialization to ensure that unlocked item repositories are accessed in
a single place and prevent accidental access without locking.

Add special-purpose safe access functions to the template
specializations as needed: to initialize declaration repositories and to
let IndexedIdentifier and IndexedQualifiedIdentifier share a mutex.
parent 6c3d9a27
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment