where spouse or surviving spouse not United States citizen or long-term resident (i) In general Subparagraph (A) shall not apply if the spouse or surviving spouse of the decedent is not a citizen or long-term resident of the United States. (ii) Long-term resident For purposes of clause (i), the term long-term resident means any individual (other than a citizen of the United States) who is a lawful permanent resident of the United States— (I) for the taxable year in which the transfer described in subsection (a) occurs, and (II) in at least 8 taxable years during the period of 15 taxable years ending with the taxable year during which the transfer described in subsection (a) or (b)(1) occurs. For purposes of the preceding sentence, an individual shall not be treated as a lawful permanent resident for any taxable year if such individual is treated as a resident of a foreign country for the taxable year under the provisions of a tax treaty between the United States and the foreign country and does not waive the benefits of such treaty applicable to residents of the foreign country. (2) Gifts and bequests to charity (A) In general Subsection (a) shall not apply to any transfer if such transfer is made to or for the use of an organization described in section 170(c). (B) Special rule for split-interest trusts In the case of any transfer— (i) to a charitable remainder annuity trust (as defined in section 664) or a charitable remainder unitrust (as defined in section 664), or (ii) of an interest described in section 170(f)(2)(B), subsection (a) shall not apply to the portion of such transfer which is to or for the use of an organization described in section 170(c). (C) Special rule for pooled income funds In the case of any transfer to a pooled income fund (as defined in section 642(c)(5)), subsection (a) shall not apply to the portion of such transfer which is to or for the use of an organization described in section 170(b)(1)(A) (other than in clauses (vii) or (viii)). (3) Qualified disability trusts and cemetery