This change adds support for type attributes (for example, address_space) in pragmas, so that the following code now compiles correctly:
#pragma clang attribute push (__attribute__ ((address_space(1))), apply_to=variable(is_global)) int var; #pragma clang attribute pop
Since the attribute matching logic (attr::SubjectMatchRule) applies to an already constructed Decl, we first determine the declaration's type ignoring pragma attributes, then construct the Decl, and then recalculate its type if any type attribute was applied.
rdar://78269223
This looks like a bug -- address space attributes do not typically apply to a parameter: https://godbolt.org/z/rrfh5bnMe