Warnings from macro expansions vs system headers

Hi all,

Is it expected that I get a warning from this, since the macro expansion happens in my source file, despite the "buggy" macro contents being in a system header? (I filed <rdar://12665902> against the header regardless BTW.)

Handling macros is generally tricky, because they tend to violate
abstraction layers in a way that normal declarations do not: e.g. you
might not want a diagnostic here, but you want one if you write
MIN(1<<31, 0). Occasionally, we will special-case certain
diagnostics, but we generally assume that if the expansion location is
in user code, we should warn as if it's user code. Realistically,
this sort of thing is rare, so we can get away with this.