GabrielDosReis / ipr

Compiler-neutral Internal Program Representation for C++
BSD 3-Clause "New" or "Revised" License
222 stars 23 forks source link

Make `impl::singleton_overload` contain its declset #235

Closed GabrielDosReis closed 2 years ago

GabrielDosReis commented 2 years ago

The general model of a scope is that it is a sequence of declarations. The declarations are further divided into overload sets. Each overload set contains a declset : all the declarations in that scope for the same name with the same type.

The existing implementation impl::unique_decl contains singleton_overload, which is logically backward. Fixed with this patch. Now, a homogeneous_scope is a sequence of singleton_overload s. Each singleton_overload, in turn, contains a decl(set).