This relands #192397, which was reverted in #194106. The new version
includes the following fixes:
- Set an explicit triple in the `attr-alias.m` test because aliases are
not supported on Darwin.
- Relax the check to only diagnose mismatches in return types and
parameter lists, while ignoring exception specifications and other
attributes.
Original description follows:
Add checks to ensure that an alias and its target have compatible types:
- Generate an error if a function alias points to a variable or vice
versa.
- Issue a warning for mismatches in function types.
- Ignore type discrepancies for variables.
This behavior aligns with similar diagnostics in GCC.
Resolves: #47301