Previously, I thought that a relative pronoun becomes the subject of a relative clause when the relative clause modifies the subject of the main clause. In other words, it serves a double purpose. For example:
Rice, which still forms the staple diet of much of the world's population, grows best in hot, wet lands.
Here, "which" is both the connector and also subject of the relative clause.
However, in other cases, namely when the relative clause does not modify the subject of the main clause, the relative pronoun only becomes the connector of the main clause with the relative clause. For example:
I met the woman whom you mentioned.
Here, "whom" is the connector and "you" is the subject of the relative clause.
But then I encounter the following sentence:
Hail forms within large dense cumulonimbus clouds that develop on hot, humid summer days.
Here, the relative clause does not modify the subject of the main clause. However, "that" becomes the subject as well as the connector of the relative clause.
So, when does a relative pronoun become the subject of a relative clause and when does it not?
Edit:
Please note that this question is different from the one below:
That question asks whether the gap in the following is the object of think or the subject of might
- anything you think might be good for me
The OP there makes no reference to the syntactic function of the anything noun phrase within the larger clause it occurs in.