This patch allows qualifying methods with address spaces and extends some overloading rules to use those qualifiers.
The main use case is to prevent conversions to generic/default address space where it's requested by the programmer. More details can be found in:
http://lists.llvm.org/pipermail/cfe-dev/2018-December/060470.html
This patch doesn't enable the feature for C++ yet but it can easily be generalized if the overall flow is right.
This is enforcing a restriction that users write const __private, which seems unreasonable. It looks like ParseTypeQualifierList takes a flag saying not to parse attributes; try adding a new option to that enum allowing address-space attributes.
Collecting the attributes on the type-qualifiers DeclSpec rather than adding them as function attributes seems correct.